wpseek.com
Outil de recherche WordPress pour les développeurs et auteurs de thèmes



popuplinks › WordPress Function

Depuis0.71
Dépréciée4.5.0
popuplinks ( $text )
Paramètres:
  • (string) $text Content to replace links to open in a new tab.
    Requis: Oui
Retourne:
  • (string) Content that has filtered links.
Défini(e) dans:
Codex:

Adds element attributes to open links in new tabs.



Source

function popuplinks( $text ) {
	_deprecated_function( __FUNCTION__, '4.5.0' );
	$text = preg_replace('/<a (.+?)>/i', "<a $1 target='_blank' rel='external'>", $text);
	return $text;
}