$content =
apply_filters( 'the_editor_content',
$content,
$default_editor );
// Remove the filter as the next editor on the same page may not need it.
if ( self::
$this_tinymce ) { remove_filter( 'the_editor_content', 'format_for_editor'
);
} // Back-compat for the `htmledit_pre` and `richedit_pre` filters.
if ( 'html' ===
$default_editor &&
has_filter( 'htmledit_pre'
) ) { /** This filter is documented in wp-includes/deprecated.php */
$content =
apply_filters_deprecated( 'htmledit_pre', array
( $content ), '4.3.0', 'format_for_editor'
);
} elseif ( 'tinymce' ===
$default_editor &&
has_filter( 'richedit_pre'
) ) { /** This filter is documented in wp-includes/deprecated.php */
$content =
apply_filters_deprecated( 'richedit_pre', array
( $content ), '4.3.0', 'format_for_editor'
);
} if ( false !==
stripos( $content, 'textarea'
) ) { $content =
preg_replace( '%</textarea%i', '</textarea',
$content );
} printf( $the_editor,
$content );
echo "\n</div>\n\n";