searchwp\valid_html_tags
Depuis : 4.0.0
Table des matières
Contrôlez quelles balises HTML SearchWP prendra en compte lors de l'extraction du contenu à indexer.
Paramètres
| Type | Paramètre | Défaut | Depuis |
|---|---|---|---|
| Tableau | $tags |
Tableau multidimensionnel de balises et d'attributs de balises | 4.0.0 |
Exemples
All hooks should be added to your custom SearchWP Customizations Plugin.
Empêcher l'indexation des attributs d'entrée (par exemple, placeholder)
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 | |
| // Prevent input attributes (e.g. placeholder) from being indexed by SearchWP. | |
| add_filter( 'searchwp\valid_html_tags', function( $tags ) { | |
| unset( $tags['input'] ); | |
| return $tags; | |
| } ); |

