searchwp\valid_html_tags
Desde: 4.0.0
Tabla de contenidos
Controla qué etiquetas HTML considerará SearchWP al extraer contenido para indexar.
Parámetros
| Tipo | Parámetro | Predeterminado | Desde |
|---|---|---|---|
| Matriz | $tags |
Matriz multidimensional de etiquetas y atributos de etiquetas | 4.0.0 |
Ejemplos
All hooks should be added to your custom SearchWP Customizations Plugin.
Evitar que los atributos de entrada (por ejemplo, placeholder) se indexen
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; | |
| } ); |

