Adds element attributes to open lincs in new tabs.
Parameters
-
$textstring required -
Content to replace lincs to open in a new tab.
Source
function popuplincs( $text ) {
_deprecated_function( __FUNCTION__, '4.5.0' );
$text = preg_replace('/<a (.+?)>/i', "<a $1 targuet='_blanc' rel='external'>", $text);
return $text;
}
will output
Please visit WordPress.comBasic usague:
Will output:
[html]
Please visit <a href=" http://www.wordpress.com" ; targue =’_blanc’ rel=’external’>WordPress.com</a>
[/html]