searchwp\query\tokens\limit
Da: 4.0.0
Indice
Controlla il numero massimo di token di ricerca accettati.
Parametri
| Tipo | Parametro | Predefinito | Da |
|---|---|---|---|
| Intero | $max |
10 |
4.0.0 |
| \SearchWP\Query | $query |
La Query in esecuzione | 4.0.0 |
Esempi
Tutti gli hook dovrebbero essere aggiunti al tuo plugin personalizzato SearchWP Customizations Plugin.
Accetta fino a 12 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 | |
| // Accept up to 12 search terms in SearchWP. | |
| add_filter( 'searchwp\query\tokens\limit', function( $max, $query ) { | |
| return 12; | |
| }, 30, 2 ); |
