From 692cdf0c7b8a8f0452641537edd8446ce0b4081e Mon Sep 17 00:00:00 2001 From: ryan Date: Tue, 26 Jan 2010 17:25:31 +0000 Subject: [PATCH] Move load_muplugin_textdomain() to l10n.php git-svn-id: http://svn.automattic.com/wordpress/trunk@12840 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/l10n.php | 22 ++++++++++++++++++++++ wp-includes/ms-functions.php | 12 ------------ 2 files changed, 22 insertions(+), 12 deletions(-) diff --git a/wp-includes/l10n.php b/wp-includes/l10n.php index 8205d3ff9..4c8da78ed 100644 --- a/wp-includes/l10n.php +++ b/wp-includes/l10n.php @@ -382,6 +382,28 @@ function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_pat return load_textdomain( $domain, $mofile ); } +/** + * Load the translated strings for a plugin residing in the mu-plugins dir. + * + * @since 3.0 + * + * @param string $domain Unique identifier for retrieving translated strings + */ +function load_muplugin_textdomain($domain, $path = false) { + $locale = get_locale(); + if ( empty($locale) ) + $locale = 'en_US'; + + /* @todo $path is not used. Was it ever used and was it expected to be an arbitrary absolute dir? + * Ideally, it should be relative to WPMU_PLUGIN_DUR. + if ( false === $path ) + $path = WPMU_PLUGIN_DIR; + */ + + $mofile = WPMU_PLUGIN_DIR . "/$domain-$locale.mo"; + load_textdomain($domain, $mofile); +} + /** * Loads the theme's translated strings. * diff --git a/wp-includes/ms-functions.php b/wp-includes/ms-functions.php index 7ec2cbc12..b30634b66 100644 --- a/wp-includes/ms-functions.php +++ b/wp-includes/ms-functions.php @@ -5,18 +5,6 @@ * @package WordPress */ -function load_muplugin_textdomain($domain, $path = false) { - $locale = get_locale(); - if ( empty($locale) ) - $locale = 'en_US'; - - if ( false === $path ) - $path = WPMU_PLUGIN_DIR; - - $mofile = WPMU_PLUGIN_DIR . "/$domain-$locale.mo"; - load_textdomain($domain, $mofile); -} - // @todo use update_blog_details function wpmu_update_blogs_date() { global $wpdb;