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:
Peter Westwood 2009-10-21 07:09:00 +00:00
parent 889f15dfdb
commit a9b546be54
1 changed files with 4 additions and 5 deletions

View File

@ -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;
} }
/** /**