searchwp\tokens\regex_patterns\only_full_matches
Depuis : 4.0.0
Table des matières
Par défaut, SearchWP ne traite que les correspondances complètes pour ses motifs d'expressions régulières. Si vous souhaitez que SearchWP prenne également en compte les correspondances partielles, vous pouvez activer ce comportement avec ce hook.
Paramètres
| Type | Paramètre | Défaut | Depuis |
|---|---|---|---|
| Booléen | $enabled |
true |
4.0.0 |
Exemples
All hooks should be added to your custom SearchWP Customizations Plugin.
Permettre la prise en compte des correspondances partielles de motifs regex
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 | |
| // Allow partial regex pattern matches to be considered in SearchWP. | |
| add_filter( 'searchwp\tokens\regex_patterns\only_full_matches', '__return_false' ); |

