From 97d9b36c2c900eb0ed0676229ecd5c9d1268e79b Mon Sep 17 00:00:00 2001 From: Andrew Ozz 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: https://develop.svn.wordpress.org/trunk@9497 602fd350-edb4-49c9-b593-d223f7449a82 --- 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');