mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-23 01:27:36 +01:00
Editor: remove the format_for_editor filter from the_editor_content
after it runs as the next editor instance on the same page may not need it.
Props marcochiesi, azaozz. Fixes #28403. Built from https://develop.svn.wordpress.org/trunk@36062 git-svn-id: http://core.svn.wordpress.org/trunk@36027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
c1976fff71
commit
e7b3d9cd11
@ -251,7 +251,7 @@ final class _WP_Editors {
|
||||
'<textarea' . $editor_class . $height . $tabindex . $autocomplete . ' cols="40" name="' . esc_attr( $set['textarea_name'] ) . '" ' .
|
||||
'id="' . $editor_id_attr . '">%s</textarea></div>' );
|
||||
|
||||
// Prepare the content for the Visual or Text editor
|
||||
// Prepare the content for the Visual or Text editor, only when TinyMCE is used (back-compat).
|
||||
if ( self::$this_tinymce ) {
|
||||
add_filter( 'the_editor_content', 'format_for_editor', 10, 2 );
|
||||
}
|
||||
@ -267,6 +267,11 @@ final class _WP_Editors {
|
||||
*/
|
||||
$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' ) ) {
|
||||
// TODO: needs _deprecated_filter(), use _deprecated_function() as substitute for now
|
||||
|
@ -4,7 +4,7 @@
|
||||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.5-alpha-36061';
|
||||
$wp_version = '4.5-alpha-36062';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
Loading…
Reference in New Issue
Block a user