diff --git wp-includes/l10n.php wp-includes/l10n.php
index 733f3a4..91d211f 100644
|
|
function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) { |
434 | 434 | /** |
435 | 435 | * Loads the theme's translated strings. |
436 | 436 | * |
437 | | * If the current locale exists as a .mo file in the theme's root directory, it |
438 | | * will be included in the translated strings by the $domain. |
| 437 | * If a .mo file is found, it will be included in the translated strings |
| 438 | * by the $domain. |
439 | 439 | * |
440 | 440 | * The .mo files must be named based on the locale exactly. |
441 | 441 | * |
442 | 442 | * @since 1.5.0 |
443 | 443 | * |
444 | 444 | * @param string $domain Unique identifier for retrieving translated strings |
| 445 | * @param string $path The path to the .mo file directory (optional) |
445 | 446 | */ |
446 | 447 | function load_theme_textdomain( $domain, $path = false ) { |
447 | 448 | $locale = apply_filters( 'theme_locale', get_locale(), $domain ); |
448 | 449 | |
449 | | $path = ( empty( $path ) ) ? get_template_directory() : $path; |
| 450 | $mofile = WP_LANG_DIR . "/themes/$domain-$locale.mo"; |
450 | 451 | |
451 | | $mofile = "$path/$locale.mo"; |
452 | | return load_textdomain($domain, $mofile); |
| 452 | if ( !is_readable( $mofile ) ) { |
| 453 | if ( empty( $path ) ) |
| 454 | $path = get_template_directory(); |
| 455 | $mofile = "$path/$locale.mo"; |
| 456 | } |
| 457 | |
| 458 | return load_textdomain( $domain, $mofile ); |
453 | 459 | } |
454 | 460 | |
455 | 461 | /** |