searchwp\tokens\minimum_length
Da: 4.0.0
Indice
Controlla quale SearchWP utilizza come lunghezza minima del token (termine di ricerca).
Parametri
| Tipo | Parametro | Predefinito | Da |
|---|---|---|---|
| Intero | $length |
3 (1 se la casella di controllo per disabilitare la lunghezza minima dei caratteri è selezionata) |
4.0.0 |
Esempi
Tutti gli hook dovrebbero essere aggiunti al tuo plugin personalizzato SearchWP Customizations Plugin.
Riduci la lunghezza minima dei caratteri per i token (termini di ricerca)
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; | |
| } ); |
