将元素属性添加到新选项卡中打开的链接。
popuplinks(string $text)
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$text | (string) | 必需 | 替换要在新选项卡中打开的链接的内容。 |
返回(Return)
(string)已筛选链接的内容。
源码(Source)
/**
* Adds a element attributes to open links in new windows.
*
* Comment text in popup windows should be filtered through this. Right now it's
* a moderately dumb function, ideally it would detect whether a target or rel
* attribute was already there and adjust its actions accordingly.
*
* @since 0.71
*
* @param string $text Content to replace links to open in a new window.
* @return string Content that has filtered links.
*/
function popuplinks( $text ) {
$text = preg_replace('//i', "", $text);
return $text;
}
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
4.5.0 | wp-includes/deprecated.php:3754 | 0 | 1 function |