<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[51768] trunk/src: Editor: Revert [51748] and [51649].</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { white-space: pre-line; overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta" style="font-size: 105%">
<dt style="float: left; width: 6em; font-weight: bold">Revision</dt> <dd><a style="font-weight: bold" href="https://core.trac.wordpress.org/changeset/51768">51768</a><script type="application/ld+json">{"@context":"http://schema.org","@type":"EmailMessage","description":"Review this Commit","action":{"@type":"ViewAction","url":"https://core.trac.wordpress.org/changeset/51768","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>azaozz</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2021-09-08 23:28:43 +0000 (Wed, 08 Sep 2021)</dd>
</dl>
<pre style='padding-left: 1em; margin: 2em 0; border-left: 2px solid #ccc; line-height: 1.25; font-size: 105%; font-family: sans-serif'>Editor: Revert <a href="https://core.trac.wordpress.org/changeset/51748">[51748]</a> and <a href="https://core.trac.wordpress.org/changeset/51649">[51649]</a>. They intorduced a bug where `wp.editor` may be replaced with `wp.oldEditor` in certain cases.
Props desrosj, davidbinda, azaozz.
Fixes <a href="https://core.trac.wordpress.org/ticket/53762">#53762</a>.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcjs_enqueueslibquicktagsjs">trunk/src/js/_enqueues/lib/quicktags.js</a></li>
<li><a href="#trunksrcjs_enqueuesvendortinymcepluginswordpresspluginjs">trunk/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js</a></li>
<li><a href="#trunksrcjs_enqueueswpeditorbasejs">trunk/src/js/_enqueues/wp/editor/base.js</a></li>
<li><a href="#trunksrcjs_enqueueswpeditordfwjs">trunk/src/js/_enqueues/wp/editor/dfw.js</a></li>
<li><a href="#trunksrcwpincludesclasswpeditorphp">trunk/src/wp-includes/class-wp-editor.php</a></li>
<li><a href="#trunksrcwpincludesgeneraltemplatephp">trunk/src/wp-includes/general-template.php</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcjs_enqueueslibquicktagsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/lib/quicktags.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/lib/quicktags.js 2021-09-08 22:50:53 UTC (rev 51767)
+++ trunk/src/js/_enqueues/lib/quicktags.js 2021-09-08 23:28:43 UTC (rev 51768)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -435,7 +435,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> ariaLabel = this.attr && this.attr.ariaLabel ? ' aria-label="' + _escape( this.attr.ariaLabel ) + '"' : '',
</span><span class="cx" style="display: block; padding: 0 10px"> val = this.display ? ' value="' + _escape( this.display ) + '"' : '',
</span><span class="cx" style="display: block; padding: 0 10px"> id = this.id ? ' id="' + _escape( idPrefix + this.id ) + '"' : '',
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- dfw = ( wp = window.wp ) && wp.oldEditor && wp.oldEditor.dfw;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ dfw = ( wp = window.wp ) && wp.editor && wp.editor.dfw;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( this.id === 'fullscreen' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> return '<button type="button"' + id + ' class="ed_button qt-dfw qt-fullscreen"' + title + ariaLabel + '></button>';
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -681,11 +681,11 @@
</span><span class="cx" style="display: block; padding: 0 10px"> qt.DFWButton.prototype.callback = function() {
</span><span class="cx" style="display: block; padding: 0 10px"> var wp;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! ( wp = window.wp ) || ! wp.oldEditor || ! wp.oldEditor.dfw ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! ( wp = window.wp ) || ! wp.editor || ! wp.editor.dfw ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- window.wp.oldEditor.dfw.toggle();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ window.wp.editor.dfw.toggle();
</ins><span class="cx" style="display: block; padding: 0 10px"> };
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> qt.TextDirectionButton = function() {
</span></span></pre></div>
<a id="trunksrcjs_enqueuesvendortinymcepluginswordpresspluginjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js 2021-09-08 22:50:53 UTC (rev 51767)
+++ trunk/src/js/_enqueues/vendor/tinymce/plugins/wordpress/plugin.js 2021-09-08 23:28:43 UTC (rev 51768)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -12,7 +12,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> __ = editor.editorManager.i18n.translate,
</span><span class="cx" style="display: block; padding: 0 10px"> $ = window.jQuery,
</span><span class="cx" style="display: block; padding: 0 10px"> wp = window.wp,
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- hasWpautop = ( wp && wp.oldEditor && wp.oldEditor.autop && editor.getParam( 'wpautop', true ) ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ hasWpautop = ( wp && wp.editor && wp.editor.autop && editor.getParam( 'wpautop', true ) ),
</ins><span class="cx" style="display: block; padding: 0 10px"> wpTooltips = false;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( $ ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -130,7 +130,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( event.load && event.format !== 'raw' ) {
</span><span class="cx" style="display: block; padding: 0 10px"> if ( hasWpautop ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- event.content = wp.oldEditor.autop( event.content );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ event.content = wp.editor.autop( event.content );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // Prevent creation of paragraphs out of multiple HTML comments.
</span><span class="cx" style="display: block; padding: 0 10px"> event.content = event.content.replace( /-->\s+<!--/g, '--><!--' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -601,7 +601,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> event.content = event.content.replace( /<p>(?:<br ?\/?>|\u00a0|\uFEFF| )*<\/p>/g, '<p> </p>' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( hasWpautop ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- event.content = wp.oldEditor.removep( event.content );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ event.content = wp.editor.removep( event.content );
</ins><span class="cx" style="display: block; padding: 0 10px"> } else {
</span><span class="cx" style="display: block; padding: 0 10px"> // Restore formatting of block boundaries.
</span><span class="cx" style="display: block; padding: 0 10px"> event.content = event.content.replace( /-->\s*<!-- wp:/g, '-->\n\n<!-- wp:' );
</span></span></pre></div>
<a id="trunksrcjs_enqueueswpeditorbasejs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/wp/editor/base.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/wp/editor/base.js 2021-09-08 22:50:53 UTC (rev 51767)
+++ trunk/src/js/_enqueues/wp/editor/base.js 2021-09-08 23:28:43 UTC (rev 51768)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -5,7 +5,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> window.wp = window.wp || {};
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> ( function( $, wp ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.editor = wp.oldEditor = wp.oldEditor || {};
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.editor = wp.editor || {};
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Utility functions for the editor.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1191,8 +1191,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> } );
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.oldEditor.autop = wpautop;
- wp.oldEditor.removep = pre_wpautop;
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.editor.autop = wpautop;
+ wp.editor.removep = pre_wpautop;
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> exports = {
</span><span class="cx" style="display: block; padding: 0 10px"> go: switchEditor,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1241,15 +1241,15 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> * }
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.oldEditor.initialize = function( id, settings ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.editor.initialize = function( id, settings ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> var init;
</span><span class="cx" style="display: block; padding: 0 10px"> var defaults;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- if ( ! $ || ! id || ! wp.oldEditor.getDefaultSettings ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ if ( ! $ || ! id || ! wp.editor.getDefaultSettings ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> return;
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- defaults = wp.oldEditor.getDefaultSettings();
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ defaults = wp.editor.getDefaultSettings();
</ins><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> // Initialize TinyMCE by default.
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! settings ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1349,13 +1349,13 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Remove one editor instance.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Intended for use with editors that were initialized with wp.oldEditor.initialize().
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Intended for use with editors that were initialized with wp.editor.initialize().
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.8.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} id The HTML id of the editor textarea.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.oldEditor.remove = function( id ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.editor.remove = function( id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> var mceInstance, qtInstance,
</span><span class="cx" style="display: block; padding: 0 10px"> $wrap = $( '#wp-' + id + '-wrap' );
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1388,7 +1388,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> /**
</span><span class="cx" style="display: block; padding: 0 10px"> * Get the editor content.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * Intended for use with editors that were initialized with wp.oldEditor.initialize().
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * Intended for use with editors that were initialized with wp.editor.initialize().
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.8.0
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1395,7 +1395,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * @param {string} id The HTML id of the editor textarea.
</span><span class="cx" style="display: block; padding: 0 10px"> * @return The editor content.
</span><span class="cx" style="display: block; padding: 0 10px"> */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- wp.oldEditor.getContent = function( id ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ wp.editor.getContent = function( id ) {
</ins><span class="cx" style="display: block; padding: 0 10px"> var editor;
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> if ( ! $ || ! id ) {
</span></span></pre></div>
<a id="trunksrcjs_enqueueswpeditordfwjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/js/_enqueues/wp/editor/dfw.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/js/_enqueues/wp/editor/dfw.js 2021-09-08 22:50:53 UTC (rev 51767)
+++ trunk/src/js/_enqueues/wp/editor/dfw.js 2021-09-08 23:28:43 UTC (rev 51768)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -33,7 +33,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> $sideSortables = $( '#side-sortables' ),
</span><span class="cx" style="display: block; padding: 0 10px"> $postboxContainer = $( '#postbox-container-1' ),
</span><span class="cx" style="display: block; padding: 0 10px"> $postBody = $('#post-body'),
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- fullscreen = window.wp.oldEditor && window.wp.oldEditor.fullscreen,
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ fullscreen = window.wp.editor && window.wp.editor.fullscreen,
</ins><span class="cx" style="display: block; padding: 0 10px"> mceEditor,
</span><span class="cx" style="display: block; padding: 0 10px"> mceBind = function(){},
</span><span class="cx" style="display: block; padding: 0 10px"> mceUnbind = function(){},
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -1603,8 +1603,8 @@
</span><span class="cx" style="display: block; padding: 0 10px"> }
</span><span class="cx" style="display: block; padding: 0 10px">
</span><span class="cx" style="display: block; padding: 0 10px"> window.wp = window.wp || {};
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- window.wp.oldEditor = window.wp.oldEditor || {};
- window.wp.oldEditor.dfw = {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ window.wp.editor = window.wp.editor || {};
+ window.wp.editor.dfw = {
</ins><span class="cx" style="display: block; padding: 0 10px"> activate: activate,
</span><span class="cx" style="display: block; padding: 0 10px"> deactivate: deactivate,
</span><span class="cx" style="display: block; padding: 0 10px"> isActive: isActive,
</span></span></pre></div>
<a id="trunksrcwpincludesclasswpeditorphp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/class-wp-editor.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/class-wp-editor.php 2021-09-08 22:50:53 UTC (rev 51767)
+++ trunk/src/wp-includes/class-wp-editor.php 2021-09-08 23:28:43 UTC (rev 51768)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -970,11 +970,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> <script type="text/javascript">
</span><span class="cx" style="display: block; padding: 0 10px"> window.wp = window.wp || {};
</span><span class="cx" style="display: block; padding: 0 10px"> window.wp.editor = window.wp.editor || {};
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- 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() {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ window.wp.editor.getDefaultSettings = function() {
</ins><span class="cx" style="display: block; padding: 0 10px"> return {
</span><span class="cx" style="display: block; padding: 0 10px"> tinymce: <?php echo $settings; ?>,
</span><span class="cx" style="display: block; padding: 0 10px"> quicktags: {
</span></span></pre></div>
<a id="trunksrcwpincludesgeneraltemplatephp"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-includes/general-template.php</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-includes/general-template.php 2021-09-08 22:50:53 UTC (rev 51767)
+++ trunk/src/wp-includes/general-template.php 2021-09-08 23:28:43 UTC (rev 51768)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -3524,7 +3524,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> * Outputs the editor scripts, stylesheets, and default settings.
</span><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * The editor can be initialized when needed after page load.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">- * See wp.oldEditor.initialize() in wp-admin/js/editor.js for initialization options.
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ * See wp.editor.initialize() in wp-admin/js/editor.js for initialization options.
</ins><span class="cx" style="display: block; padding: 0 10px"> *
</span><span class="cx" style="display: block; padding: 0 10px"> * @uses _WP_Editors
</span><span class="cx" style="display: block; padding: 0 10px"> * @since 4.8.0
</span></span></pre>
</div>
</div>
</body>
</html>