1. 首页
  2. WordPress 函数手册

popuplinks()

popuplinks( string $text )

将元素属性添加到新选项卡中打开的链接。
Adds element attributes to open links in new tabs.

目录锚点:#参数#返回#源码#笔记


参数(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

笔记(Notes)

将输出
基本用法:

popuplinks() 为WP2原创文章,链接:https://www.wp2.cn/functions/popuplinks/

发表评论

您的电子邮箱地址不会被公开。