Make WordPress Core

Changeset 19913


Ignore:
Timestamp:
02/13/2012 06:05:04 PM (13 years ago)
Author:
duck_
Message:

Stop WP_Editor from outputting TinyMCE external plugins/languages multiple times. Props Cyapow. Fixes #19648.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/class-wp-editor.php

    r19912 r19913  
    168168                $plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' );
    169169                $first_run = true;
     170                $ext_plugins = '';
    170171
    171172                if ( $set['teeny'] ) {
    172173                    self::$plugins = $plugins = apply_filters( 'teeny_mce_plugins', array('inlinepopups', 'fullscreen', 'wordpress', 'wplink', 'wpdialogs'), $editor_id );
    173                     $ext_plugins = '';
    174174                } else {
    175175                    /*
     
    182182                    $mce_external_plugins = apply_filters('mce_external_plugins', array());
    183183
    184                     $ext_plugins = '';
    185184                    if ( ! empty($mce_external_plugins) ) {
    186185
     
    248247                            $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
    249248                            $ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
    250 
    251                             self::$ext_plugins .= $ext_plugins;
    252249                        }
    253250                    }
     
    260257
    261258                self::$plugins = $plugins;
     259                self::$ext_plugins = $ext_plugins;
    262260
    263261                /*
Note: See TracChangeset for help on using the changeset viewer.