Recent

bsearch_did_you_mean_max_distance_ratiofilterPro only

bsearch_did_you_mean_max_distance_ratio

Filters how far a suggestion may differ from the search term.

The ratio is multiplied by the term length to give the maximum Levenshtein distance, so a higher value matches more loosely.

Type: filter
Since: 4.4.0
Source: includes/pro/class-fuzzy-search.php line 595

Parameters

Type Name Description
float $max_ratio Maximum edit distance as a fraction of the term length. Default 0.34.

Usage

add_filter( 'bsearch_did_you_mean_max_distance_ratio', function($max_ratio) {
    // ...
    return $max_ratio;
} );