searchwp\query\partial_matches\fuzzy\threshold
Desde: 4.0.0
Sumário
Controle o limite que determina se uma correspondência parcial fuzzy potencial é considerada uma correspondência.
Parâmetros
| Tipo | Parâmetro | Padrão | Desde |
|---|---|---|---|
| Inteiro | $threshold |
70 |
4.0.0 |
Exemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Tornar a correspondência difusa mais rigorosa
Aumente o limite para o que é considerado uma correspondência difusa, tornando a correspondência difusa mais 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; | |
| } ); |

