diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index 640d1c3f77..b870e87a8f 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -381,6 +381,16 @@ function wp_default_packages_inline_scripts( $scripts ) { 'window.wp.oldEditor = window.wp.editor;', 'after' ); + + // wp-editor module is exposed as window.wp.editor + // Problem: there is quite some code expecting window.wp.oldEditor object available under window.wp.editor + // Solution: fuse the two objects together to maintain backward compatibility + // For more context, see https://github.com/WordPress/gutenberg/issues/33203 + $scripts->add_inline_script( + 'wp-editor', + 'Object.assign( window.wp.editor, window.wp.oldEditor );', + 'after' + ); } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 20530f337e..3c4976b855 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.8-RC2-51386'; +$wp_version = '5.8-RC2-51392'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.