get_translations_for_domain
函数
get_translations_for_domain ( $domain )
- 参数
-
-
(string)
$domain
Text domain. Unique identifier for retrieving translated strings.- Required: 是
-
(string)
- 返回值
-
- (Translations|NOOP_Translations) A Translations instance.
- 定义位置
-
-
wp-includes/l10n.php
, line 1301
-
wp-includes/l10n.php
- 引入
- 2.8.0
- 弃用
- –
Returns the Translations instance for a text domain.
If there isn’t one, returns empty Translations instance.
function get_translations_for_domain( $domain ) { global $l10n; if ( isset( $l10n[ $domain ] ) || ( _load_textdomain_just_in_time( $domain ) && isset( $l10n[ $domain ] ) ) ) { return $l10n[ $domain ]; } static $noop_translations = null; if ( null === $noop_translations ) { $noop_translations = new NOOP_Translations; } return $noop_translations; }
声明:本站所有文章,如无特殊说明或标注,均为本站原创发布。任何个人或组织,在未征得本站同意时,禁止复制、盗用、采集、发布本站内容到任何网站、书籍等各类媒体平台。如若本站内容侵犯了原著者的合法权益,可联系我们进行处理。