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
All hooks should be added to your custom 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; | |
| } ); |

