From bc3fc534cd37fdc39582c22d7ba538d4485b0630 Mon Sep 17 00:00:00 2001 From: azaozz Date: Mon, 3 Nov 2008 18:21:00 +0000 Subject: [PATCH] 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 --- wp-admin/includes/post.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-admin/includes/post.php b/wp-admin/includes/post.php index 2ec2f46d31..8319809c11 100644 --- a/wp-admin/includes/post.php +++ b/wp-admin/includes/post.php @@ -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');