wpseek.com
Uma área de pesquisa sobre o WordPress para devs e autores do tema



wp_rel_nofollow › WordPress Function

Desde1.5.0
Obsoleton/a
wp_rel_nofollow ( $text )
Parâmetros:
  • (string) $text Content that may contain HTML A elements.
    Required: Yes
Retorna:
  • (string) Converted content.
Definido em:
Codex:

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



Fonte

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