_e()
_e( string $text, string $domain = ‘default’ )
显示翻译文本。
Display translated text.
参数(Parameters)
参数 | 类型 | 说明 |
---|---|---|
$text | (string) | 要翻译的文本。 |
$domain | (string) | 文本域。用于检索翻译字符串的唯一标识符。 |
源码(Source)
/** * Display translated text. * * @since 1.2.0 * * @param string $text Text to translate. * @param string $domain Optional. Text domain. Unique identifier for retrieving translated strings. */ function _e( $text, $domain = 'default' ) { echo translate( $text, $domain ); }
更新版本 | 源码位置 | 使用 | 被使用 |
---|---|---|---|
1.2.0 | wp-includes/l10n.php | 13 | 7 |
笔记(Notes)
基本示例
_e() 为WP2原创文章,链接:https://www.wp2.cn/functions/_e/