wp_rel_nofollow( string $text )
Adds rel nofollow string to all HTML A elements in content.
Parameters
- $text
-
(Required) Content that may contain HTML A elements.
Return
(string) Converted content.
Source
File: wp-includes/formatting.php
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', 'wp_rel_nofollow_callback', $text);
return wp_slash( $text );
}
Changelog
Version | Description |
---|---|
WP-1.5.0 | Introduced. |