Skip to content

Commit

Permalink
Merge pull request #3121 from 10up/burhan/remove-unused-check
Browse files Browse the repository at this point in the history
Remove unnecessary check
  • Loading branch information
felipeelia authored Nov 8, 2022
2 parents e34c98b + 45a4f5b commit e7134a2
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions includes/classes/Feature/Search/Search.php
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

/**
Expand Down

0 comments on commit e7134a2

Please sign in to comment.