From 94ffe0db5de8e7a50493ec2a85efac8433451441 Mon Sep 17 00:00:00 2001 From: desrosj Date: Thu, 13 Dec 2018 22:23:55 +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. Props pento. Merges [43758] to trunk. See #45113. Built from https://develop.svn.wordpress.org/trunk@44120 git-svn-id: http://core.svn.wordpress.org/trunk@43950 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 c96eb7c09f..a9e5e04f2e 100644 --- a/wp-includes/class-wp-editor.php +++ b/wp-includes/class-wp-editor.php @@ -82,7 +82,8 @@ final class _WP_Editors { $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 bcfe191e8a..2d750b239e 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.1-alpha-44119'; +$wp_version = '5.1-alpha-44120'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.