wpseek.com
Eine auf WordPress spezialiserte Suchmaschine für Entwickler und Theme-Autoren
wp_rel_nofollow › WordPress Function
Seit1.5.0
Veraltetn/v
› wp_rel_nofollow ( $text )
| Parameter: |
|
| Gibt zurück: |
|
| Definiert in: |
|
| Codex: |
Adds `rel="nofollow"` string to all HTML A elements in content.
Ähnliche Funktionen: wp_rel_nofollow_callback, wp_kses_no_null, wp_rel_callback, wp_rel_ugc, wp_delete_file
Quellcode
function wp_rel_nofollow( $text ) {
// This is a pre-save filter, so text is already escaped.
$text = stripslashes( $text );
$text = preg_replace_callback(
'|<a (.+?)>|i',
static function ( $matches ) {
return wp_rel_callback( $matches, 'nofollow' );
},
$text
);
return wp_slash( $text );
}