wpseek.com
WordPress开发者和主题制作者的搜索引擎
tag_escape › WordPress Function
Since2.5.0
已弃用n/a
› tag_escape ( $tag_name )
| 参数: |
|
| 返回: |
|
| 定义在: |
|
| 文档: | |
| Change Log: |
|
Escapes an HTML tag name.
源码
function tag_escape( $tag_name ) {
$safe_tag = strtolower( preg_replace( '/[^a-zA-Z0-9-_:]/', '', $tag_name ) );
/**
* Filters a string cleaned and escaped for output as an HTML tag.
*
* @since 2.8.0
*
* @param string $safe_tag The tag name after it has been escaped.
* @param string $tag_name The text before it was escaped.
*/
return apply_filters( 'tag_escape', $safe_tag, $tag_name );
}