WordPress at a glance

wp_rel_nofollow() WP 1.0

Adds rel nofollow string to all HTML A elements in content.

No Hooks.


String. Converted content.


wp_rel_nofollow( $text );
$text(string) (required)
Content that may contain HTML A elements.

Code of wp_rel_nofollow: wp-includes/formatting.php VER 4.9.8

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 );

Related Functions

From tag: sanitize_

More from category: Formatting

No comments
    Hello, !     Log In . Register