mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
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:
parent
51591b778b
commit
4f3b306abe
@ -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