searchwp\query\partial_matches\minimum_length
Depuis : 4.0.0
Table des matières
Contrôler la longueur minimale pour les correspondances partielles.
Paramètres
| Type | Paramètre | Défaut | Depuis | |||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Entier | $longueur |
3 (searchwp\tokens\minimum_length est appliqué avant ce hook) |
4.0.0 |
|||||||||
| Tableau |
$args
|
4.0.0 |
||||||||||
Exemples
All hooks should be added to your custom SearchWP Customizations Plugin.
Personnaliser la longueur minimale des jetons de correspondance partielle
Personnaliser la longueur minimale des jetons de correspondance partielle
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 ); |

