Switch to using NOOP_Translations for untranslated sites. Fixes #10971 props nbachiyski.

git-svn-id: http://svn.automattic.com/wordpress/trunk@12080 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-10-21 07:09:00 +00:00
parent cd36d71ed9
commit 8a7d717bb5

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