From 5ec329b4f1377af68d84f10120d3a5ef05e3372b Mon Sep 17 00:00:00 2001 From: ryan Date: Thu, 16 Oct 2008 20:44:39 +0000 Subject: [PATCH] Add optional path arg to load_theme_textdomain(). Props filosofo. fixes #6951 git-svn-id: http://svn.automattic.com/wordpress/trunk@9212 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index ae420bdda3..6b9484e2af 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -301,10 +301,12 @@ function load_plugin_textdomain($domain, $abs_rel_path = false, $plugin_rel_path * * @param string $domain Unique identifier for retrieving translated strings */ -function load_theme_textdomain($domain) { +function load_theme_textdomain($domain, $path = false) { $locale = get_locale(); - $mofile = get_template_directory() . "/$locale.mo"; + $path = ( empty( $path ) ) ? get_template_directory() : $path; + + $mofile = "$path/$locale.mo"; load_textdomain($domain, $mofile); }