popuplinks( string $text ): string

This function has been deprecated.

Adds element attributes to open links in new tabs.

Parameters

$textstringrequired
Content to replace links to open in a new tab.

Return

string Content that has filtered links.

Source

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

Changelog

VersionDescription
4.5.0This function has been deprecated.
0.71Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.