Avoid double path separators in load_theme_textdomain(). Fixes #29122. Props bradyvercher

Built from https://develop.svn.wordpress.org/trunk@29984


git-svn-id: http://core.svn.wordpress.org/trunk@29726 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
John Blackbourn 2014-10-21 17:58:18 +00:00
parent 9999820b64
commit ae7cb843a0

View File

@ -661,7 +661,7 @@ function load_theme_textdomain( $domain, $path = false ) {
$path = get_template_directory();
// Load the textdomain according to the theme
$mofile = "{$path}/{$locale}.mo";
$mofile = untrailingslashit( $path ) . "/{$locale}.mo";
if ( $loaded = load_textdomain( $domain, $mofile ) )
return $loaded;