diff --git src/wp-includes/l10n.php src/wp-includes/l10n.php
index c017952..8cf0aef 100644
|
|
|
function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path |
| 681 | 681 | $path = WP_PLUGIN_DIR; |
| 682 | 682 | } |
| 683 | 683 | |
| 684 | | // Load the textdomain according to the plugin first |
| | 684 | /* |
| | 685 | * Load the plugin textdomain. |
| | 686 | * |
| | 687 | * Load from the languages directory first, |
| | 688 | * otherwise, load the textdomain according to the plugin. |
| | 689 | */ |
| 685 | 690 | $mofile = $domain . '-' . $locale . '.mo'; |
| 686 | | if ( $loaded = load_textdomain( $domain, $path . '/'. $mofile ) ) |
| 687 | | return $loaded; |
| | 691 | $loaded = load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ); |
| 688 | 692 | |
| 689 | | // Otherwise, load from the languages directory |
| 690 | | $mofile = WP_LANG_DIR . '/plugins/' . $mofile; |
| 691 | | return load_textdomain( $domain, $mofile ); |
| | 693 | return ( $loaded ) ? $loaded : load_textdomain( $domain, $path . '/' . $mofile ); |
| 692 | 694 | } |
| 693 | 695 | |
| 694 | 696 | /** |
| … |
… |
function load_theme_textdomain( $domain, $path = false ) { |
| 743 | 745 | */ |
| 744 | 746 | $locale = apply_filters( 'theme_locale', $locale, $domain ); |
| 745 | 747 | |
| 746 | | if ( ! $path ) |
| | 748 | if ( ! $path ) { |
| 747 | 749 | $path = get_template_directory(); |
| | 750 | } |
| 748 | 751 | |
| 749 | | // Load the textdomain according to the theme |
| 750 | | $mofile = untrailingslashit( $path ) . "/{$locale}.mo"; |
| 751 | | if ( $loaded = load_textdomain( $domain, $mofile ) ) |
| 752 | | return $loaded; |
| | 752 | /* |
| | 753 | * Load the theme textdomain. |
| | 754 | * |
| | 755 | * Load from the languages directory first, |
| | 756 | * otherwise, load the textdomain according to the theme. |
| | 757 | */ |
| | 758 | $mofile = $domain . '-' . $locale . '.mo'; |
| | 759 | $loaded = load_textdomain( $domain, WP_LANG_DIR . '/themes/' . $mofile ); |
| 753 | 760 | |
| 754 | | // Otherwise, load from the languages directory |
| 755 | | $mofile = WP_LANG_DIR . "/themes/{$domain}-{$locale}.mo"; |
| 756 | | return load_textdomain( $domain, $mofile ); |
| | 761 | return ( $loaded ) ? $loaded : load_textdomain( $domain, $path . '/' . $mofile ); |
| 757 | 762 | } |
| 758 | 763 | |
| 759 | 764 | /** |