diff --git src/wp-includes/l10n.php src/wp-includes/l10n.php
index 4bfb989..5282a38 100644
|
|
|
function load_plugin_textdomain( $domain, $deprecated = false, $plugin_rel_path |
| 683 | 683 | $path = WP_PLUGIN_DIR; |
| 684 | 684 | } |
| 685 | 685 | |
| 686 | | // Load the textdomain according to the plugin first |
| | 686 | /* |
| | 687 | * Load the plugin textdomain. |
| | 688 | * |
| | 689 | * Load from the languages directory first, |
| | 690 | * otherwise, load the textdomain according to the plugin. |
| | 691 | */ |
| 687 | 692 | $mofile = $domain . '-' . $locale . '.mo'; |
| 688 | | if ( $loaded = load_textdomain( $domain, $path . '/'. $mofile ) ) |
| 689 | | return $loaded; |
| | 693 | $loaded = load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ); |
| 690 | 694 | |
| 691 | | // Otherwise, load from the languages directory |
| 692 | | $mofile = WP_LANG_DIR . '/plugins/' . $mofile; |
| 693 | | return load_textdomain( $domain, $mofile ); |
| | 695 | return ( $loaded ) ? $loaded : load_textdomain( $domain, $path . '/' . $mofile ); |
| 694 | 696 | } |
| 695 | 697 | |
| 696 | 698 | /** |
| … |
… |
function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { |
| 708 | 710 | $locale = apply_filters( 'plugin_locale', get_locale(), $domain ); |
| 709 | 711 | $path = trailingslashit( WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' ) ); |
| 710 | 712 | |
| 711 | | // Load the textdomain according to the plugin first |
| | 713 | /* |
| | 714 | * Load the plugin textdomain. |
| | 715 | * |
| | 716 | * Load from the languages directory first, |
| | 717 | * otherwise, load the textdomain according to the plugin. |
| | 718 | */ |
| 712 | 719 | $mofile = $domain . '-' . $locale . '.mo'; |
| 713 | | if ( $loaded = load_textdomain( $domain, $path . $mofile ) ) |
| 714 | | return $loaded; |
| | 720 | $loaded = load_textdomain( $domain, WP_LANG_DIR . '/plugins/' . $mofile ); |
| 715 | 721 | |
| 716 | | // Otherwise, load from the languages directory |
| 717 | | $mofile = WP_LANG_DIR . '/plugins/' . $mofile; |
| 718 | | return load_textdomain( $domain, $mofile ); |
| | 722 | return ( $loaded ) ? $loaded : load_textdomain( $domain, $path . '/' . $mofile ); |
| 719 | 723 | } |
| 720 | 724 | |
| 721 | 725 | /** |
| … |
… |
function load_theme_textdomain( $domain, $path = false ) { |
| 745 | 749 | */ |
| 746 | 750 | $locale = apply_filters( 'theme_locale', $locale, $domain ); |
| 747 | 751 | |
| 748 | | if ( ! $path ) |
| | 752 | if ( ! $path ) { |
| 749 | 753 | $path = get_template_directory(); |
| | 754 | } |
| 750 | 755 | |
| 751 | | // Load the textdomain according to the theme |
| 752 | | $mofile = untrailingslashit( $path ) . "/{$locale}.mo"; |
| 753 | | if ( $loaded = load_textdomain( $domain, $mofile ) ) |
| 754 | | return $loaded; |
| | 756 | /* |
| | 757 | * Load the theme textdomain. |
| | 758 | * |
| | 759 | * Load from the languages directory first, |
| | 760 | * otherwise, load the textdomain according to the theme. |
| | 761 | */ |
| | 762 | $mofile = $domain . '-' . $locale . '.mo'; |
| | 763 | $loaded = load_textdomain( $domain, WP_LANG_DIR . '/themes/' . $mofile ); |
| 755 | 764 | |
| 756 | | // Otherwise, load from the languages directory |
| 757 | | $mofile = WP_LANG_DIR . "/themes/{$domain}-{$locale}.mo"; |
| 758 | | return load_textdomain( $domain, $mofile ); |
| | 765 | return ( $loaded ) ? $loaded : load_textdomain( $domain, $path . '/' . $mofile ); |
| 759 | 766 | } |
| 760 | 767 | |
| 761 | 768 | /** |