wp_rel_nofollow()
wp_rel_nofollow( string $text ) 向内容中的所有HTML A元素添加rel=“n…
wp_rel_nofollow( string $text )
向内容中的所有HTML A元素添加rel=“nofollow”字符串。
Adds rel=”nofollow” string to all HTML A elements in content.
目录锚点:#参数#源码
参数(Parameters)
| 参数 | 类型 | 说明 |
|---|---|---|
| $text | (string) | 可能包含HTML A元素的内容。 |
源码(Source)
/**
* Adds rel nofollow string to all HTML A elements in content.
*
* @since 1.5.0
*
* @param string $text Content that may contain HTML A elements.
* @return string Converted content.
*/
function wp_rel_nofollow( $text ) {
// This is a pre save filter, so text is already escaped.
$text = stripslashes($text);
$text = preg_replace_callback('||i', 'wp_rel_nofollow_callback', $text);
return wp_slash( $text );
}| 更新版本 | 源码位置 | 使用 | 被使用 |
|---|---|---|---|
| 1.5.0 | wp-includes/formatting.php | 12 | 4 |
类别:WordPress 函数手册、
本文收集自互联网,转载请注明来源。
如有侵权,请联系 wper_net@163.com 删除。



还没有任何评论,赶紧来占个楼吧!