Move load_muplugin_textdomain() to l10n.php
git-svn-id: https://develop.svn.wordpress.org/trunk@12840 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
dd519ac669
commit
66b9e3666f
|
@ -382,6 +382,28 @@ function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_pat
|
||||||
return load_textdomain( $domain, $mofile );
|
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.
|
* Loads the theme's translated strings.
|
||||||
*
|
*
|
||||||
|
|
|
@ -5,18 +5,6 @@
|
||||||
* @package WordPress
|
* @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
|
// @todo use update_blog_details
|
||||||
function wpmu_update_blogs_date() {
|
function wpmu_update_blogs_date() {
|
||||||
global $wpdb;
|
global $wpdb;
|
||||||
|
|
Loading…
Reference in New Issue