Always apply the posts_search filter. Restores 3.6 behavior.
props SergeyBiryukov. fixes #25664. git-svn-id: https://develop.svn.wordpress.org/trunk@25867 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
ea7d0de723
commit
d3981e2793
@ -1958,15 +1958,7 @@ class WP_Query {
|
|||||||
$search .= " AND ($wpdb->posts.post_password = '') ";
|
$search .= " AND ($wpdb->posts.post_password = '') ";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
return $search;
|
||||||
* Filter the search SQL that is used in the WHERE clause of WP_Query.
|
|
||||||
*
|
|
||||||
* @since 3.0.0
|
|
||||||
*
|
|
||||||
* @param string $search Search SQL for WHERE clause.
|
|
||||||
* @param WP_Query $this The current WP_Query object.
|
|
||||||
*/
|
|
||||||
return apply_filters_ref_array( 'posts_search', array( $search, &$this ) );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -2428,6 +2420,16 @@ class WP_Query {
|
|||||||
if ( ! empty( $q['s'] ) )
|
if ( ! empty( $q['s'] ) )
|
||||||
$search = $this->parse_search( $q );
|
$search = $this->parse_search( $q );
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Filter the search SQL that is used in the WHERE clause of WP_Query.
|
||||||
|
*
|
||||||
|
* @since 3.0.0
|
||||||
|
*
|
||||||
|
* @param string $search Search SQL for WHERE clause.
|
||||||
|
* @param WP_Query $this The current WP_Query object.
|
||||||
|
*/
|
||||||
|
$search = apply_filters_ref_array( 'posts_search', array( $search, &$this ) );
|
||||||
|
|
||||||
// Taxonomies
|
// Taxonomies
|
||||||
if ( !$this->is_singular ) {
|
if ( !$this->is_singular ) {
|
||||||
$this->parse_tax_query( $q );
|
$this->parse_tax_query( $q );
|
||||||
|
Loading…
Reference in New Issue
Block a user