A WordPress-centric search engine for devs and theme authors



popuplinks ›

Since0.71
Deprecated4.5.0
popuplinks ( $text )
Parameters:
  • (string) $text Content to replace links to open in a new window.
    Required: Yes
Returns:
  • (string) Content that has filtered links.
Defined at:
Codex:

Adds element attributes to open links in new windows.



Source

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