Restore back-compat with wp_tiny_mce(), see #19320

git-svn-id: http://svn.automattic.com/wordpress/trunk@19408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz
2011-11-22 21:47:01 +00:00
parent 34d1e6c8f2
commit fb79e5e64c
2 changed files with 61 additions and 38 deletions

View File

@@ -21,7 +21,7 @@
function tinymce_include() {
_deprecated_function( __FUNCTION__, '2.1', 'wp_editor()' );
wp_editor('', 'content');
wp_tiny_mce();
}
/**
@@ -708,10 +708,30 @@ function wp_dashboard_quick_press_output() {
* @deprecated Use wp_editor()
* @see wp_editor()
*/
function wp_tiny_mce() {
function wp_tiny_mce( $teeny = false, $settings = false ) {
_deprecated_function( __FUNCTION__, '3.3', 'wp_editor()' );
wp_editor('', 'content');
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' );
$wp_editor = new WP_Editor;
}
$editor_id = 'content' . $num;
++$num;
$set = array(
'teeny' => $teeny,
'tinymce' => $settings ? $settings : true,
'quicktags' => false
);
$set = $wp_editor->parse_settings($editor_id, $set);
$wp_editor->editor_settings($editor_id, $set);
}
/**
@@ -853,4 +873,4 @@ function type_url_form_video() {
function type_url_form_file() {
__deprecated_function( __FUNCTION__, '3.3', "wp_media_insert_url_form('file')" );
return wp_media_insert_url_form( 'file' );
}
}