Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions src/wp-includes/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'
);
}

/**
Expand Down