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:
Ryan Boren 2008-06-03 17:19:47 +00:00
parent a099e4c12f
commit 9ce7676e72
1 changed files with 4 additions and 2 deletions

View File

@ -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);
}