mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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:
parent
cd36d71ed9
commit
8a7d717bb5
@ -404,11 +404,10 @@ function load_theme_textdomain($domain, $path = false) {
|
||||
*/
|
||||
function &get_translations_for_domain( $domain ) {
|
||||
global $l10n;
|
||||
$empty = &new Translations;
|
||||
if ( isset($l10n[$domain]) )
|
||||
if ( !isset($l10n[$domain]) ) {
|
||||
$l10n[$domain] = &new NOOP_Translations;
|
||||
}
|
||||
return $l10n[$domain];
|
||||
else
|
||||
return $empty;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user