searchwp\valid_html_tags
Da: 4.0.0
Indice
Controlla quali tag HTML SearchWP considererà durante l'estrazione del contenuto da indicizzare.
Parametri
| Tipo | Parametro | Predefinito | Da |
|---|---|---|---|
| Array | $tags |
Array multidimensionale di tag e attributi dei tag | 4.0.0 |
Esempi
Tutti gli hook dovrebbero essere aggiunti al tuo plugin personalizzato SearchWP Customizations Plugin.
Impedisci l'indicizzazione degli attributi di input (ad es. 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; | |
| } ); |
