Make WordPress Core

Ticket #19103: class-wp-editor.diff

File class-wp-editor.diff, 1.1 KB (added by amereservant, 13 years ago)

Proposed 'the_editor_settings' filter patch for class-wp-editor.php

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

     
    4747         */
    4848        function editor( $content, $editor_id, $settings = array() ) {
    4949
    50                 $set = wp_parse_args( $settings,  array(
     50                $set = apply_filters( 'the_editor_settings', wp_parse_args( $settings,  array(
    5151                        'wpautop' => true, // use wpautop?
    5252                        'media_buttons' => true, // show insert/upload button(s)
    5353                        'textarea_name' => $editor_id, // set the textarea name to something different, square brackets [] can be used here
     
    5959                        'dfw' => false, // replace the default fullscreen with DFW (needs specific DOM elements and css)
    6060                        'tinymce' => true, // load TinyMCE, can be used to pass settings directly to TinyMCE using an array()
    6161                        'quicktags' => true // load Quicktags, can be used to pass settings directly to Quicktags using an array()
    62                 ) );
     62                ) ) );
    6363
    6464                $this->this_tinymce = !empty($set['tinymce']) && $this->can_richedit;
    6565                $this->this_quicktags = !empty($set['quicktags']);