mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-22 17:18:32 +01:00
Make the $path argument of load_muplugin_textdomain() functional -- relative to mu-plugins. Props uglyrobot, fixes #12875
git-svn-id: http://svn.automattic.com/wordpress/trunk@14186 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
55446491fa
commit
7c1255e433
@ -390,12 +390,13 @@ function load_plugin_textdomain( $domain, $abs_rel_path = false, $plugin_rel_pat
|
||||
* @since 3.0.0
|
||||
*
|
||||
* @param string $domain Unique identifier for retrieving translated strings
|
||||
* @param strings $mu_plugin_rel_path Relative to WPMU_PLUGIN_DIR directory in which
|
||||
* the MO file resides. Defaults is empty string.
|
||||
*/
|
||||
function load_muplugin_textdomain( $domain, $path = false ) {
|
||||
function load_muplugin_textdomain( $domain, $mu_plugin_rel_path = '' ) {
|
||||
$locale = apply_filters( 'plugin_locale', get_locale(), $domain );
|
||||
|
||||
$mofile = WPMU_PLUGIN_DIR . "/$domain-$locale.mo";
|
||||
load_textdomain( $domain, $mofile );
|
||||
$path = WPMU_PLUGIN_DIR . '/' . ltrim( $mu_plugin_rel_path, '/' );
|
||||
load_textdomain( $domain, trailingslashit( $path ) . "$domain-$locale.mo" );
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user