From 45a4f5bf189574fdf5792646512c07f477d3e9e1 Mon Sep 17 00:00:00 2001 From: Burhan Nasir Date: Tue, 8 Nov 2022 14:52:03 +0500 Subject: [PATCH] Remove unnecessary check --- includes/classes/Feature/Search/Search.php | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/includes/classes/Feature/Search/Search.php b/includes/classes/Feature/Search/Search.php index 1b7c519c3d..8210d541f9 100644 --- a/includes/classes/Feature/Search/Search.php +++ b/includes/classes/Feature/Search/Search.php @@ -587,17 +587,6 @@ public function integrate_search_queries( $enabled, $query ) { if ( method_exists( $query, 'is_search' ) && $query->is_search() && ! empty( $query->query_vars['s'] ) ) { $enabled = true; - - /** - * WordPress have to be version 4.6 or newer to have "fields" support - * since it requires the "posts_pre_query" filter. - * - * @see WP_Query::get_posts - */ - $fields = $query->get( 'fields' ); - if ( ! version_compare( get_bloginfo( 'version' ), '4.6', '>=' ) && ! empty( $fields ) ) { - $enabled = false; - } } /**