popuplinks()

最后更新于:2021-11-27 18:49:11

popuplinks( string$text)

Adds element attributes to open links in new tabs.

参数

$text

(string) (Required) Content to replace links to open in a new tab.

响应

(string) Content that has filtered links.

源文件

文件: gc-includes/deprecated.php

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