WordPress.org

Make WordPress Core

Ticket #34213: 34213.patch

File 34213.patch, 843 bytes (added by sebastian.pisula, 4 years ago)
  • wp-includes/l10n.php

    IDEA additional info:
    Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP
    <+>UTF-8
     
    674674                $path = get_template_directory();
    675675
    676676        // Load the textdomain according to the theme
    677         $mofile = untrailingslashit( $path ) . "/{$locale}.mo";
     677        $mofile = WP_LANG_DIR . "/themes/{$domain}-{$locale}.mo";
    678678        if ( $loaded = load_textdomain( $domain, $mofile ) )
    679679                return $loaded;
    680680
    681681        // Otherwise, load from the languages directory
    682         $mofile = WP_LANG_DIR . "/themes/{$domain}-{$locale}.mo";
     682        $mofile = untrailingslashit( $path ) . "/{$locale}.mo";
    683683        return load_textdomain( $domain, $mofile );
    684684}
    685685