popuplinks

函数
popuplinks ( $text )
参数
  • (string) $text Content to replace links to open in a new tab.
    Required:
返回值
  • (string) Content that has filtered links.
定义位置
相关方法
populate_optionscomments_popup_linkwp_paused_pluginspost_permalinkwp_update_link
引入
0.71
弃用
4.5.0

popuplinks: 这个函数用来给所有在新窗口打开的链接添加”弹出”类。

添加元素属性以在新标签中打开链接。

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

常见问题

FAQs
查看更多 >
闪电侠

(工作日 10:00 - 18:30 为您服务)

2025-12-06 14:33:20

您好,无论是售前、售后、意见建议……均可通过联系工单与我们取得联系。

您也可选择聊天工具与我们即时沟通或点击查看:

您的工单我们已经收到,我们将会尽快跟您联系!
取消
选择聊天工具: