Recent

better_search_query_pro_field_weight_clausesfilterPro only

better_search_query_pro_field_weight_clauses

Filter the weighted score clauses for slug, meta, author and comment matches.

Type: filter
Since: 4.5.0
Source: includes/pro/class-query-modifier.php line 378

Parameters

Type Name Description
string[] $clauses Array of prepared SQL score expressions keyed by field.
array $weights Array of weights.
\Better_Search_Core_Query $instance The Better_Search_Core_Query instance.
\WP_Query|\Better_Search_Query $query The WP_Query instance.

Usage

add_filter( 'better_search_query_pro_field_weight_clauses', function($clauses, $weights, $instance, $query) {
    // ...
    return $clauses;
} );