mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-06 00:18:45 +01:00
Add variable path support to load_plugin_textdomain() in order to support subdir plugins. Props firas. fixes #1468
git-svn-id: http://svn.automattic.com/wordpress/trunk@2888 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
195206fbb4
commit
dccf85d6e1
@ -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