函数原型
esc_attr_e( string $text, string $domain = ‘default’ )
函数描述
Displays translated text that has been escaped for safe use in an attribute.
是否弃用
未弃用
函数参数
-
$text
string
Required - Text to translate.
-
$domain
string
Optional - Text domain. Unique identifier for retrieving translated strings.
Default'default'.Default:
'default'
函数返回值
无
函数位置
File: wp-includes/l10n.php.
函数源码
function esc_attr_e( $text, $domain = 'default' ) {
echo esc_attr( translate( $text, $domain ) );
}
源码链接
变更日志
| Version | Description |
|---|---|
| 2.8.0 | Introduced. |

