attribute_escape
apply_filters( ‘attribute_escape’, string $safe_text , string $text )
过滤器::过滤已清理并转义的字符串,以便在HTML属性中输出。
Filter Hook: Filters a string cleaned and escaped for output in an HTML attribute.
说明(Description)
在输出之前,传递给esc_attr()的文本将删除无效字符或特殊字符。
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$safe_text | (string) | 转义后的文本。 |
$text | (string) | 在被转义之前的文本。 |
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.0.6 | wp-includes/formatting.php:4495 | 1 | 0 |
attribute_escape 为WP2原创文章,链接:https://www.wp2.cn/hook/attribute_escape/