Move load_muplugin_textdomain() to l10n.php

git-svn-id: http://svn.automattic.com/wordpress/trunk@12840 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-01-26 17:25:31 +00:00
parent 8d48c939fa
commit 692cdf0c7b
2 changed files with 22 additions and 12 deletions

View File

@ -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.
*

View File

@ -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;