WordPress.org

Make WordPress Core


Ignore:
Timestamp:
11/23/2011 07:06:52 PM (9 years ago)
Author:
nacin
Message:

Move WP_Editor to a _WP_Editors encapsulation.

  • WP_Editor will return in 3.4 as a one true API for editor instances. Stick to wp_editor() for now.
  • TinyMCE can now be forced on with tinymce = true. It defaults to the value for user_can_richedit().
  • Restores wp_default_editor(), wp_link_query(), wp_link_dialog(), wp_fullscreen_html().

fixes #19320.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/includes/deprecated.php

    r19408 r19420  
    712712    _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
    713713
    714     global $wp_editor;
    715714    static $num = 1;
    716715
    717     if ( !is_a($wp_editor, 'WP_Editor') ) {
    718         if ( !class_exists('WP_Editor') )
    719             require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
    720 
    721         $wp_editor = new WP_Editor;
    722     }
    723 
    724     $editor_id = 'content' . $num;
    725     ++$num;
     716    if ( ! class_exists('_WP_Editors' ) )
     717        require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
     718
     719    $editor_id = 'content' . $num++;
    726720
    727721    $set = array(
     
    731725    );
    732726
    733     $set = $wp_editor->parse_settings($editor_id, $set);
    734     $wp_editor->editor_settings($editor_id, $set);
     727    $set = _WP_Editors::parse_settings($editor_id, $set);
     728    _WP_Editors::editor_settings($editor_id, $set);
    735729}
    736730
     
    759753 */
    760754function wp_quicktags() {
    761     _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
    762 }
    763 
    764 /**
    765  * @deprecated 3.3.0
    766  * @deprecated Use wp_editor()
    767  * @see wp_editor()
    768  */
    769 function wp_fullscreen_html() {
    770755    _deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
    771756}
Note: See TracChangeset for help on using the changeset viewer.