bsearch_short_term_score_field
Filter the short-term score SQL expression.
Type: filter
Since: 4.3.0
Source: includes/class-query-modifier.php line 1487
Parameters
| Type | Name | Description |
|---|---|---|
string | $score_sql | The score SQL (without AS alias). |
\WP_Query | $query | The WP_Query instance. |
\Better_Search_Core_Query | $instance | The Better_Search_Core_Query instance. |
int | $weight_title | Weight for title matches. |
int | $weight_content | Weight for content matches. |
Usage
add_filter( 'bsearch_short_term_score_field', function($score_sql, $query, $instance, $weight_title, $weight_content) {
// ...
return $score_sql;
} );