Make WordPress Core

Ticket #19648: class-wp-editor.php.patch

File class-wp-editor.php.patch, 1.6 KB (added by azaozz, 13 years ago)

Almost the same as 20030.diff and 19648.patch but keep self::$ext_plugins .= $ext_plugins; in the code block that runs only once per load.

  • wp-includes/class-wp-editor.php

     
    166166                                self::$mce_locale = $mce_locale = ( '' == get_locale() ) ? 'en' : strtolower( substr(get_locale(), 0, 2) ); // only ISO 639-1
    167167                                $no_captions = (bool) apply_filters( 'disable_captions', '' );
    168168                                $plugins = array( 'inlinepopups', 'spellchecker', 'tabfocus', 'paste', 'media', 'fullscreen', 'wordpress', 'wpeditimage', 'wpgallery', 'wplink', 'wpdialogs' );
     169                                $ext_plugins = '';
    169170                                $first_run = true;
    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                                        /*
    176176                                        The following filter takes an associative array of external plugins for TinyMCE in the form 'plugin_name' => 'url'.
     
    181181                                        */
    182182                                        $mce_external_plugins = apply_filters('mce_external_plugins', array());
    183183
    184                                         $ext_plugins = '';
    185184                                        if ( ! empty($mce_external_plugins) ) {
    186185
    187186                                                /*
     
    247246
    248247                                                        $ext_plugins .= 'tinyMCEPreInit.load_ext("' . $plugurl . '", "' . $mce_locale . '");' . "\n";
    249248                                                        $ext_plugins .= 'tinymce.PluginManager.load("' . $name . '", "' . $url . '");' . "\n";
     249                                                }
    250250
    251                                                         self::$ext_plugins .= $ext_plugins;
    252                                                 }
     251                                                self::$ext_plugins .= $ext_plugins;
    253252                                        }
    254253
    255254                                        $plugins = array_unique( apply_filters('tiny_mce_plugins', $plugins) );