posts_search хук-фильтр . WP 3.0.0
Filters the search SQL that is used in the WHERE clause of WP_Query.
Использование
add_filter( 'posts_search', 'filter_function_name_9730', 10, 2 ); function filter_function_name_9730( $search, $this ){ // filter... return $search; }
- $search(строка)
- Search SQL for WHERE clause.
- $this(WP_Query)
- The current WP_Query object.
Список изменений
С версии 3.0.0 | Введена. |
Где вызывается хук
posts_search
wp-includes/class-wp-query.php 2126
$search = apply_filters_ref_array( 'posts_search', array( $search, &$this ) );