From 723a9c8a190c7598617cd8b848f596fc3d11ee40 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adam=20Zieli=C5=84ski?= Date: Thu, 8 Jul 2021 12:14:36 +0200 Subject: [PATCH] Remove gutenberg_enqueue_wp_old_editor_compatibility_snippet --- lib/client-assets.php | 2 +- lib/widgets-customize.php | 1 - lib/widgets-page.php | 1 - 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/client-assets.php b/lib/client-assets.php index 1c0332c4512c02..1cc21e77d34b26 100644 --- a/lib/client-assets.php +++ b/lib/client-assets.php @@ -109,7 +109,7 @@ function gutenberg_override_script( $scripts, $handle, $src, $deps = array(), $v * Solution: fuse the two objects together to maintain backward compatibility. * For more context, see https://github.com/WordPress/gutenberg/issues/33203 */ - wp_add_inline_script( + $scripts->add_inline_script( 'wp-editor', 'Object.assign(window.wp.editor, window.wp.oldEditor);', 'after' diff --git a/lib/widgets-customize.php b/lib/widgets-customize.php index 5e0a614f105c3d..fce4d6dc576809 100644 --- a/lib/widgets-customize.php +++ b/lib/widgets-customize.php @@ -146,7 +146,6 @@ function gutenberg_customize_widgets_init() { wp_enqueue_style( 'wp-customize-widgets' ); wp_enqueue_script( 'wp-format-library' ); wp_enqueue_style( 'wp-format-library' ); - gutenberg_enqueue_wp_old_editor_compatibility_snippet(); do_action( 'enqueue_block_editor_assets' ); } diff --git a/lib/widgets-page.php b/lib/widgets-page.php index 23e7456984d814..067317a74299ad 100644 --- a/lib/widgets-page.php +++ b/lib/widgets-page.php @@ -76,7 +76,6 @@ function gutenberg_widgets_init( $hook ) { return; } - gutenberg_enqueue_wp_old_editor_compatibility_snippet(); add_filter( 'admin_body_class', 'gutenberg_widgets_editor_add_admin_body_classes' ); $widgets_editor_context = new WP_Block_Editor_Context();