Changeset 22346
- Timestamp:
- 10/31/2012 09:30:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/l10n.php
r22113 r22346 460 460 $locale = apply_filters( 'theme_locale', get_locale(), $domain ); 461 461 462 $path = ( empty( $path ) ) ? get_template_directory() : $path; 463 464 $mofile = "$path/$locale.mo"; 462 if ( ! $path ) 463 $path = get_template_directory(); 464 465 // Load the textdomain from the Theme provided location, or theme directory first 466 $mofile = "{$path}/{$locale}.mo"; 467 if ( $loaded = load_textdomain($domain, $mofile) ) 468 return $loaded; 469 470 // Else, load textdomain from the Language directory 471 $mofile = WP_LANG_DIR . "/themes/{$domain}-{$locale}.mo"; 465 472 return load_textdomain($domain, $mofile); 466 473 } … … 479 486 */ 480 487 function load_child_theme_textdomain( $domain, $path = false ) { 481 $locale = apply_filters( 'theme_locale', get_locale(), $domain ); 482 483 $path = ( empty( $path ) ) ? get_stylesheet_directory() : $path; 484 485 $mofile = "$path/$locale.mo"; 486 return load_textdomain($domain, $mofile); 488 if ( ! $path ) 489 $path = get_stylesheet_directory(); 490 return load_theme_textdomain( $domain, $path ); 487 491 } 488 492
Note: See TracChangeset
for help on using the changeset viewer.