searchwp\valid_html_tags
Desde: 4.0.0
Sumário
Controle quais tags HTML o SearchWP considerará ao extrair conteúdo para indexar.
Parâmetros
| Tipo | Parâmetro | Padrão | Desde |
|---|---|---|---|
| Array | $tags |
Array multidimensional de tags e atributos de tag | 4.0.0 |
Exemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Impedir que atributos de entrada (por exemplo, placeholder) sejam indexados
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; | |
| } ); |

