wpseek.com
A WordPress-centric search engine for devs and theme authors



popuplinks › WordPress Function

Since0.71
Deprecated4.5.0
popuplinks ( $text )
Parameters:
  • (string) $text Content to replace links to open in a new tab.
    Required: Yes
Returns:
  • (string) Content that has filtered links.
Defined at:
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;
}