fix search deactivation and cleaning #62

This commit is contained in:
Leo Germani 2018-07-26 18:20:30 -03:00
parent 5b4a78a937
commit bf201f96c1
1 changed files with 2 additions and 2 deletions

View File

@ -30,7 +30,7 @@ class Search_Engine {
$this->ajax_request = $ajax_query ? true : false;
$this->options = [];
if (!defined('TAINACAN_DISABLE_DEFAULT_SEARCH_ENGINE') || TAINACAN_DISABLE_DEFAULT_SEARCH_ENGINE !== false) {
if (!defined('TAINACAN_DISABLE_DEFAULT_SEARCH_ENGINE') || TAINACAN_DISABLE_DEFAULT_SEARCH_ENGINE !== true) {
$this->search_hooks();
}
}
@ -76,7 +76,7 @@ class Search_Engine {
function init_tainacan_search_vars() {
if (!$this->query_instance->is_search()) {
if (!$this->query_instance->is_search() || empty($this->query_instance->query_vars['s']) ) {
$this->is_tainacan_search = false;
return;
}