better_search_query_posts_distinct
Filters the DISTINCT clause of the Better_Search.
Type: filter
Since: 3.0.0
Source: includes/class-better-search-core-query.php line 1220
Changelog
| Version | Description |
|---|---|
4.2.0 |
Added $instance parameter. |
3.0.0 |
Introduced. |
Parameters
| Type | Name | Description |
|---|---|---|
string |
$distinct |
The DISTINCT clause of the query. |
\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_distinct', function($distinct, $query, $instance) {
// ...
return $distinct;
} );