searchwp\query\partial_matches\fuzzy\threshold
Da: 4.0.0
Indice
Controlla la soglia che determina se una potenziale corrispondenza parziale fuzzy è considerata una corrispondenza.
Parametri
| Tipo | Parametro | Predefinito | Da |
|---|---|---|---|
| Intero | $threshold |
70 |
4.0.0 |
Esempi
All hooks should be added to your custom SearchWP Customizations Plugin.
Rendi la corrispondenza fuzzy più rigorosa
Aumenta la soglia per ciò che è considerato una corrispondenza fuzzy, rendendo la corrispondenza fuzzy più rigorosa
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; | |
| } ); |

