WordPress.org

Make WordPress Core

Ticket #6951: theme_l10n_directory.diff

File theme_l10n_directory.diff, 610 bytes (added by filosofo, 10 years ago)
  • wp-includes/l10n.php

     
    309309 *
    310310 * @param string $domain Unique identifier for retrieving translated strings
    311311 */
    312 function load_theme_textdomain($domain) {
     312function load_theme_textdomain($domain, $path = false) {
    313313        $locale = get_locale();
    314314
    315         $mofile = get_template_directory() . "/$locale.mo";
     315        $path = ( empty( $path ) ) ? get_template_directory() : $path;
     316
     317        $mofile = "$path/$locale.mo";
    316318        load_textdomain($domain, $mofile);
    317319}
    318320