searchwp\query\partial_matches\fuzzy\threshold
Desde: 4.0.0
Tabla de contenidos
Controla el umbral que determina si una posible coincidencia parcial difusa se considera una coincidencia.
Parámetros
| Tipo | Parámetro | Predeterminado | Desde |
|---|---|---|---|
| Entero | $umbral |
70 |
4.0.0 |
Ejemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Haz que la coincidencia difusa sea más estricta
Aumenta el umbral de lo que se considera una coincidencia difusa, haciendo que la coincidencia difusa sea más estricta
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; | |
| } ); |

