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.


git-svn-id: http://svn.automattic.com/wordpress/trunk@19420 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
nacin
2011-11-23 19:06:52 +00:00
parent 689dade993
commit a7c296dd47
6 changed files with 137 additions and 180 deletions

View File

@@ -711,18 +711,12 @@ function wp_dashboard_quick_press_output() {
function wp_tiny_mce( $teeny = false, $settings = false ) {
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
global $wp_editor;
static $num = 1;
if ( !is_a($wp_editor, 'WP_Editor') ) {
if ( !class_exists('WP_Editor') )
require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
if ( ! class_exists('_WP_Editors' ) )
require_once( ABSPATH . WPINC . '/class-wp-editor.php' );
$wp_editor = new WP_Editor;
}
$editor_id = 'content' . $num;
++$num;
$editor_id = 'content' . $num++;
$set = array(
'teeny' => $teeny,
@@ -730,8 +724,8 @@ function wp_tiny_mce( $teeny = false, $settings = false ) {
'quicktags' => false
);
$set = $wp_editor->parse_settings($editor_id, $set);
$wp_editor->editor_settings($editor_id, $set);
$set = _WP_Editors::parse_settings($editor_id, $set);
_WP_Editors::editor_settings($editor_id, $set);
}
/**
@@ -761,15 +755,6 @@ function wp_quicktags() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
}
/**
* @deprecated 3.3.0
* @deprecated Use wp_editor()
* @see wp_editor()
*/
function wp_fullscreen_html() {
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
}
/**
* Returns the screen layout options.
*