常用函数-populinks()

0条评论

常用函数-populinks()

说明

为所有HTML的anchor标签添加 target='_blank' and rel='external'代码,以在新窗口中打开链接。

该函数可过滤弹出窗口中的注释文本。目前该函数没有多大用途,但在理想情况下它可以判断目标或rel属性是否存在并相应调整操作。

用法

<?php popuplinks( $text ) ?>

参数

$text

(字符串)(必需)用来替换新窗口中链接的文本

默认值:None

返回的值

(字符串)

经过过滤的链接文本

示例

注释

修改记录

自0.71版本后

源文件

popuplinks() 位于 wp-includes/formatting.php.中。

发表新评论

此内容将保密,不会被其他人看见。
  • 自动将网址与电子邮件地址转变为链接。
  • 允许HTML标签:<a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • 自动断行和分段。

更多关於格式化选项的信息

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.