searchwp\query\partial_matches\fuzzy\threshold
Depuis : 4.0.0
Table des matières
Contrôler le seuil qui détermine si une correspondance partielle floue potentielle est considérée comme une correspondance.
Paramètres
| Type | Paramètre | Défaut | Depuis |
|---|---|---|---|
| Entier | $seuil |
70 |
4.0.0 |
Exemples
All hooks should be added to your custom SearchWP Customizations Plugin.
Rendre la correspondance floue plus stricte
Augmentez le seuil de ce qui est considéré comme une correspondance floue, rendant la correspondance floue plus stricte
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| // Make SearchWP's fuzzy matching more strict. | |
| // The scale is 0-100 going from furthest match (lowest, 0) | |
| // to closest match (highest, 100). | |
| add_filter( 'searchwp\query\partial_matches\fuzzy\threshold', function( $threshold ) { | |
| return 80; | |
| } ); |

