Fix path when loading translations for default TinyMCE plugins from the plugins directory, fixes #7994
git-svn-id: https://develop.svn.wordpress.org/trunk@9497 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
43765e96e1
commit
97d9b36c2c
@ -1115,11 +1115,11 @@ function wp_tiny_mce( $teeny = false ) {
|
||||
$plugurl = dirname($url);
|
||||
$strings = $str1 = $str2 = '';
|
||||
if ( ! in_array($name, $loaded_langs) ) {
|
||||
$path = preg_replace( '|.+?' . basename(WP_PLUGIN_URL) . '|', '', $plugurl );
|
||||
$path = str_replace( WP_PLUGIN_URL, '', $plugurl );
|
||||
$path = WP_PLUGIN_DIR . $path . '/langs/';
|
||||
|
||||
if ( function_exists('realpath') )
|
||||
$plugpath = realpath($plugpath);
|
||||
$path = realpath($path);
|
||||
|
||||
if ( is_file($path . $mce_locale . '.js') )
|
||||
$strings .= @file_get_contents($path . $mce_locale . '.js');
|
||||
|
Loading…
Reference in New Issue
Block a user