Make load_plugin_textdomain() work with WP_CONTENT_DIR. Props sambauers. see #6938
git-svn-id: https://develop.svn.wordpress.org/trunk@8041 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
a099e4c12f
commit
9ce7676e72
@ -291,9 +291,11 @@ function load_plugin_textdomain($domain, $path = false) {
|
||||
$locale = get_locale();
|
||||
|
||||
if ( false === $path )
|
||||
$path = WP_PLUGIN_DIR;
|
||||
$path = '';
|
||||
else
|
||||
$path = '/' . trim(trim($path), '/');
|
||||
|
||||
$mofile = $path . '/'. $domain . '-' . $locale . '.mo';
|
||||
$mofile = WP_PLUGIN_DIR . $path . '/'. $domain . '-' . $locale . '.mo';
|
||||
load_textdomain($domain, $mofile);
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user