wpseek.com
WordPress开发者和主题制作者的搜索引擎
get_translations_for_domain › WordPress Function
Since2.8.0
已弃用n/a
› get_translations_for_domain ( $domain )
| 参数: |
|
| 返回: |
|
| 定义在: |
|
| 文档: |
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();
}
$l10n[ $domain ] = &$noop_translations;
return $noop_translations;
}