wpseek.com
WordPress开发者和主题制作者的搜索引擎



esc_html_e › WordPress Function

Since2.8.0
已弃用n/a
esc_html_e ( $text, $domain = 'default' )
参数: (2)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    默认: 'default'
定义在:
文档:

Displays translated text that has been escaped for safe use in HTML output.

If there is no translation, or the text domain isn't loaded, the original text is escaped and displayed. If you need the value for use in PHP, use esc_html__().


源码

function esc_html_e( $text, $domain = 'default' ) {
	echo esc_html( translate( $text, $domain ) );
}