searchwp\valid_html_tags
Seit: 4.0.0
Steuert, welche HTML-Tags SearchWP bei der Extraktion von zu indizierendem Inhalt berücksichtigt.
Parameter
| Typ | Parameter | Standard | Seit |
|---|---|---|---|
| Array | $tags |
Mehrdimensionales Array von Tags und Tag-Attributen | 4.0.0 |
Beispiele
All hooks should be added to your custom SearchWP Customizations Plugin.
Verhindern Sie, dass Eingabeattribute (z. B. Platzhalter) indiziert werden
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; | |
| } ); |

