Fix path when loading translations for default TinyMCE plugins from the plugins directory, fixes #7994

git-svn-id: http://svn.automattic.com/wordpress/trunk@9497 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2008-11-03 18:21:00 +00:00
parent 10cace1135
commit bc3fc534cd
1 changed files with 2 additions and 2 deletions

View File

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