searchwp\tokens\minimum_length
Desde: 4.0.0
Tabla de contenidos
Controlar qué usa SearchWP como longitud mínima de token (término de búsqueda).
Parámetros
| Tipo | Parámetro | Predeterminado | Desde |
|---|---|---|---|
| Entero | $length |
3 (1 si la casilla para deshabilitar la longitud mínima de caracteres está marcada) |
4.0.0 |
Ejemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Reducir la longitud mínima de caracteres para los tokens (términos de búsqueda)
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 | |
| // Reduce SearchWP's minimum character length to 2 (default is 3). | |
| add_filter( 'searchwp\tokens\minimum_length', function( $min ) { | |
| return 2; | |
| } ); |

