Make load_plugin_textdomain() work with WP_CONTENT_DIR. Props sambauers. see #6938

git-svn-id: http://svn.automattic.com/wordpress/trunk@8041 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2008-06-03 17:19:47 +00:00
parent 51591b778b
commit 4f3b306abe
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);
}