函数原型
popuplinks( string $text ): string
函数描述
Adds element attributes to open links in new tabs.
是否弃用
Warning: This function has been deprecated.
函数参数
-
$text
string
Required - Content to replace links to open in a new tab.
函数返回值
string Content that has filtered links.
函数位置
File: wp-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;
}
源码链接
变更日志
| Version | Description |
|---|---|
| 4.5.0 | This function has been deprecated. |
| 0.71 | Introduced. |

