searchwp\query\partial_matches\minimum_length
Desde: 4.0.0
Tabla de contenidos
Controla la longitud mínima para las coincidencias parciales.
Parámetros
| Tipo | Parámetro | Predeterminado | Desde | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Entero | $length |
3 (searchwp\tokens\minimum_length se aplica antes de este hook) |
4.0.0 |
|||||||||
| Matriz |
$args
|
4.0.0 |
||||||||||
Ejemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Personaliza la longitud mínima de los tokens de coincidencia parcial
Personaliza la longitud mínima de los tokens de coincidencia parcial
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 | |
| // Customize the minimum length of partial match tokens in SearchWP. | |
| add_filter( 'searchwp\query\partial_matches\minimum_length', function( $length, $args ) { | |
| return 5; | |
| }, 20, 2 ); |

