Editor: Revert [51748] and [51649]. They intorduced a bug where wp.editor may be replaced with wp.oldEditor in certain cases.

Props desrosj, davidbinda, azaozz.
Fixes #53762.

git-svn-id: https://develop.svn.wordpress.org/trunk@51768 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Andrew Ozz
2021-09-08 23:28:43 +00:00
parent 46c9b70265
commit 0bf7d5ea0d
6 changed files with 21 additions and 25 deletions

View File

@@ -970,11 +970,7 @@ final class _WP_Editors {
<script type="text/javascript">
window.wp = window.wp || {};
window.wp.editor = window.wp.editor || {};
window.wp.oldEditor = window.wp.oldEditor || {};
// Add getDefaultSettings() to both wp.editor and wp.oldEditor for back compat.
// Use of wp.editor for "old editor" functionality should be deprecated.
window.wp.editor.getDefaultSettings = window.wp.oldEditor.getDefaultSettings = function() {
window.wp.editor.getDefaultSettings = function() {
return {
tinymce: <?php echo $settings; ?>,
quicktags: {