Recent

better_search_query_posts_pre_queryfilter

better_search_query_posts_pre_query

Filters the posts_pre_query of Better_Search after processing and before returning.

Type: filter
Since: 3.2.0
Source: includes/class-better-search-core-query.php line 1487

Changelog

Version Description
4.2.0 Added $instance parameter.
3.2.0 Introduced.

Parameters

Type Name Description
\WP_Post[] $posts Array of post data.
\WP_Query $query The WP_Query instance.
Better_Search_Core_Query $instance The Better_Search_Core_Query instance (passed by reference).

Usage

add_filter( 'better_search_query_posts_pre_query', function($posts, $query, $instance) {
    // ...
    return $posts;
} );