WordPress.org

Make WordPress Core

Changeset 12080


Ignore:
Timestamp:
10/21/2009 07:09:00 AM (12 years ago)
Author:
westi
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/l10n.php

    r11780 r12080  
    405405function &get_translations_for_domain( $domain ) {
    406406    global $l10n;
    407     $empty = &new Translations;
    408     if ( isset($l10n[$domain]) )
    409         return $l10n[$domain];
    410     else
    411         return $empty;
     407    if ( !isset($l10n[$domain]) ) {
     408        $l10n[$domain] = &new NOOP_Translations;
     409    }
     410    return $l10n[$domain];
    412411}
    413412
Note: See TracChangeset for help on using the changeset viewer.