esc_html_e()
esc_html_e( string $text, string $domain = ‘default’ )
显示已转义以便在HTML输出 安全使用的翻译文本,安全函数
Display translated text that has been escaped for safe use in HTML output.
说明(Description)
如果没有翻译,或者没有加载文本域,则会转义并显示原始文本。
如果需要在PHP中使用该值,请使用escu htmluu()。
参数(Parameters)
参数 | 类型 | 必填 | 说明 |
---|---|---|---|
$text | (string) | 必需 | 要翻译的文本。 |
$domain | (string) | 可选 | 文本域。检索转换字符串的唯一标识符。 |
返回(Return)
无返回值
源码(Source)
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
2.8.0 | wp-includes/l10n.php:335 | 16 | 2 |
笔记(Notes)
转义并回显(显示)已翻译的文本。
esc_html_e() 为WP2原创文章,链接:https://www.wp2.cn/functions/esc_html_e/