From 294cb1ec53307d7f3eadc3d23d36a1b4268c48a5 Mon Sep 17 00:00:00 2001 From: John Blackbourn Date: Tue, 21 Oct 2014 17:57:41 +0000 Subject: [PATCH] Avoid double path separators in `load_theme_textdomain()`. Fixes #29122. Props bradyvercher git-svn-id: https://develop.svn.wordpress.org/trunk@29984 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/l10n.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/l10n.php b/src/wp-includes/l10n.php index ed5b2248ed..071920110b 100644 --- a/src/wp-includes/l10n.php +++ b/src/wp-includes/l10n.php @@ -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;