Add variable path support to load_plugin_textdomain() in order to support subdir plugins. Props firas. fixes #1468
git-svn-id: https://develop.svn.wordpress.org/trunk@2888 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
6d4f063c69
commit
02623729ae
@ -86,10 +86,10 @@ function load_default_textdomain() {
|
||||
load_textdomain('default', $mofile);
|
||||
}
|
||||
|
||||
function load_plugin_textdomain($domain) {
|
||||
function load_plugin_textdomain($domain, $path = 'wp-content/plugins') {
|
||||
$locale = get_locale();
|
||||
|
||||
$mofile = ABSPATH . "wp-content/plugins/$domain-$locale.mo";
|
||||
$mofile = ABSPATH . "$path/$domain-$locale.mo";
|
||||
load_textdomain($domain, $mofile);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user