mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
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:
parent
8d48c939fa
commit
692cdf0c7b
@ -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
Block a user