Switch to using NOOP_Translations for untranslated sites. Fixes #10971 props nbachiyski.
git-svn-id: https://develop.svn.wordpress.org/trunk@12080 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
889f15dfdb
commit
a9b546be54
@ -404,11 +404,10 @@ function load_theme_textdomain($domain, $path = false) {
|
|||||||
*/
|
*/
|
||||||
function &get_translations_for_domain( $domain ) {
|
function &get_translations_for_domain( $domain ) {
|
||||||
global $l10n;
|
global $l10n;
|
||||||
$empty = &new Translations;
|
if ( !isset($l10n[$domain]) ) {
|
||||||
if ( isset($l10n[$domain]) )
|
$l10n[$domain] = &new NOOP_Translations;
|
||||||
return $l10n[$domain];
|
}
|
||||||
else
|
return $l10n[$domain];
|
||||||
return $empty;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
Loading…
Reference in New Issue
Block a user