Created
August 22, 2018 20:04
-
-
Save doublecompile/3d01da42aa82b13239b3de738be679bf to your computer and use it in GitHub Desktop.
Fixes Search Everything problem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/wp-content/plugins/search-everything/search-everything.php b/wp-content/plugins/search-everything/search-everything.php | |
index d39281c5..a3fa4d63 100644 | |
--- a/wp-content/plugins/search-everything/search-everything.php | |
+++ b/wp-content/plugins/search-everything/search-everything.php | |
@@ -275,7 +275,8 @@ class SearchEverything { | |
$searchQuery .= $this->se_search_authors(); | |
} | |
- if ( $searchQuery != '' ) { | |
+ $searchQuery = trim($searchQuery); | |
+ if ( $searchQuery != '' && $searchQuery != '()' ) { | |
// lets use _OUR_ query instead of WP's, as we have posts already included in our query as well(assuming it's not empty which we check for) | |
$where = " AND ((" . $searchQuery . ")) "; | |
} | |
@@ -933,4 +934,3 @@ function se_post_publish_ping($post_id) { | |
} | |
add_action( 'publish_post', 'se_post_publish_ping' ); | |
- |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment