From dbb5cd996014db8740bf9f4d60f911b6d104ee30 Mon Sep 17 00:00:00 2001 From: Gary Pendergast Date: Fri, 19 Oct 2018 01:43:26 +0000 Subject: [PATCH] Classic Editor: Disable the wpautop TinyMCE plugin on block posts. As the block editor adds its own `

` tags, disabling the wpautop stops the classic editor from removing them. See #45113. Built from https://develop.svn.wordpress.org/branches/5.0@43758 git-svn-id: http://core.svn.wordpress.org/branches/5.0@43587 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/class-wp-editor.php | 3 ++- wp-includes/version.php | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/wp-includes/class-wp-editor.php b/wp-includes/class-wp-editor.php index 2de6e97a73..b085592754 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -81,7 +81,8 @@ final class _WP_Editors { $settings = apply_filters( 'wp_editor_settings', $settings, $editor_id ); $set = wp_parse_args( $settings, array( - 'wpautop' => true, + // Disable autop if the current post has blocks in it. + 'wpautop' => ! has_blocks(), 'media_buttons' => true, 'default_editor' => '', 'drag_drop_upload' => false, diff --git a/wp-includes/version.php b/wp-includes/version.php index 2112f572ac..310ae4b022 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-43757'; +$wp_version = '5.0-alpha-43758'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.