esc_attr_x()
最后更新于:2021-11-26 04:02:53
esc_attr_x( string$text, string$context, string$domain=’default’)Translate string with gettext context, and escapes it for safe use in an attribute.
参数
- $text
-
(string) (Required) Text to translate.
- $context
-
(string) (Required) Context information for the translators.
- $domain
-
(string) (Optional) Text domain. Unique identifier for retrieving translated strings.
Default value: ‘default’
响应
(string) Translated text.
源文件
文件: gc-includes/l10n.php
function esc_attr_x( $text, $context, $domain = 'default' ) {
return esc_attr( translate_with_gettext_context( $text, $context, $domain ) );
}