From aeff5194b525381c92cc10564c6109839825cdc4 Mon Sep 17 00:00:00 2001 From: Jon Cave Date: Mon, 13 Feb 2012 18:05:04 +0000 Subject: [PATCH] Stop WP_Editor from outputting TinyMCE external plugins/languages multiple times. Props Cyapow. Fixes #19648. git-svn-id: https://develop.svn.wordpress.org/trunk@19913 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-includes/class-wp-editor.php | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 88a131e1d5..f74c117ea7 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -167,10 +167,10 @@ final class _WP_Editors { $no_captions = (bool) apply_filters( 'disable_captions', '' ); $plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' ); $first_run = true; + $ext_plugins = ''; if ( $set['teeny'] ) { self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs'), $editor_id ); - $ext_plugins = ''; } else { /* The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'. @@ -181,7 +181,6 @@ final class _WP_Editors { */ $mce_external_plugins = apply_filters('mce_external_plugins', array()); - $ext_plugins = ''; if ( ! empty($mce_external_plugins) ) { /* @@ -247,8 +246,6 @@ final class _WP_Editors { $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n"; $ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n"; - - self::$ext_plugins .= $ext_plugins; } } @@ -259,6 +256,7 @@ final class _WP_Editors { $plugins[] = 'wpfullscreen'; self::$plugins = $plugins; + self::$ext_plugins = $ext_plugins; /* translators: These languages show up in the spellchecker drop-down menu, in the order specified, and with the first