esc_attr__()
最后更新于:2021-11-26 04:03:01
esc_attr__( string$text, string$domain=’default’)Retrieve the translation of $text and escapes it for safe use in an attribute.
参数
- $text
-
(string) (Required) Text to translate.
- $domain
-
(string) (Optional) Text domain. Unique identifier for retrieving translated strings.
Default value: ‘default’
响应
(string) Translated text on success, original text on failure.
源文件
文件: gc-includes/l10n.php
function esc_attr__( $text, $domain = 'default' ) {
return esc_attr( translate( $text, $domain ) );
}