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



esc_html_x ›

Since2.9.0
已弃用n/a
esc_html_x ( $text, $context, $domain = 'default' )
参数: (3)
  • (string) $text Text to translate.
    Required: Yes
  • (string) $context Context information for the translators.
    Required: Yes
  • (string) $domain Optional. Text domain. Unique identifier for retrieving translated strings. Default 'default'.
    Required: No
    默认: 'default'
返回:
  • (string) Translated text.
定义在:
文档:

Translate string with gettext context, and escapes it for safe use in HTML output.



源码

function esc_html_x( $text, $context, $domain = 'default' ) {
	return esc_html( translate_with_gettext_context( $text, $context, $domain ) );
}