posts_search filter-hook . WP 3.0.0
Filters the search SQL that is used in the WHERE clause of WP_Query.
Usage
add_filter( 'posts_search', 'filter_function_name_5114', 10, 2 ); function filter_function_name_5114( $search, $this ){ // filter... return $search; }
- $search(string)
- Search SQL for WHERE clause.
- $this(WP_Query)
- The current WP_Query object.
Changelog
Since 3.0.0 | Introduced. |
Where the hook is called
posts_search
wp-includes/class-wp-query.php 2126
$search = apply_filters_ref_array( 'posts_search', array( $search, &$this ) );