Filters the search SQL that is used in the WHERE clause of WP_Query.
Parameters
Source
$search = apply_filters_ref_array( 'posts_search', array( $search, &$this ) );
Changelog
Version | Description |
---|---|
3.0.0 | Introduced. |
CARVIEW |
Filters the search SQL that is used in the WHERE clause of WP_Query.
Since version 3.0.0, the posts_search
filter is used to filter the search SQL that is used in the WHERE
clause of WP_Query.
$search = apply_filters_ref_array( 'posts_search', array( $search, &$this ) );
Used by | Description |
---|---|
WP_Query::get_posts()wp-includes/class-wp-query.php | Retrieves an array of posts based on query variables. |
Version | Description |
---|---|
3.0.0 | Introduced. |
You must log in before being able to contribute a note or feedback.
Example function search by title only: