<!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>[40821] trunk/src/wp-admin/js/widgets: Widgets: Further refine WP JS coding style in media widgets code.</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 { 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/40821">40821</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/40821","name":"Review Commit"}}</script></dd>
<dt style="float: left; width: 6em; font-weight: bold">Author</dt> <dd>westonruter</dd>
<dt style="float: left; width: 6em; font-weight: bold">Date</dt> <dd>2017-05-22 22:04:03 +0000 (Mon, 22 May 2017)</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'>Widgets: Further refine WP JS coding style in media widgets code.

Props afercia.
See <a href="https://core.trac.wordpress.org/ticket/32417">#32417</a>.</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunksrcwpadminjswidgetsmediaaudiowidgetjs">trunk/src/wp-admin/js/widgets/media-audio-widget.js</a></li>
<li><a href="#trunksrcwpadminjswidgetsmediavideowidgetjs">trunk/src/wp-admin/js/widgets/media-video-widget.js</a></li>
<li><a href="#trunksrcwpadminjswidgetsmediawidgetsjs">trunk/src/wp-admin/js/widgets/media-widgets.js</a></li>
<li><a href="#trunksrcwpadminjswidgetstextwidgetsjs">trunk/src/wp-admin/js/widgets/text-widgets.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunksrcwpadminjswidgetsmediaaudiowidgetjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/widgets/media-audio-widget.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/widgets/media-audio-widget.js       2017-05-22 21:42:28 UTC (rev 40820)
+++ trunk/src/wp-admin/js/widgets/media-audio-widget.js 2017-05-22 22:04:03 UTC (rev 40821)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -19,18 +19,18 @@
</span><span class="cx" style="display: block; padding: 0 10px">                 */
</span><span class="cx" style="display: block; padding: 0 10px">                createStates: function createStates() {
</span><span class="cx" style="display: block; padding: 0 10px">                        this.states.add([
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                new wp.media.controller.AudioDetails( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         new wp.media.controller.AudioDetails({
</ins><span class="cx" style="display: block; padding: 0 10px">                                         media: this.media
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                } ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         }),
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                new wp.media.controller.MediaLibrary( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         new wp.media.controller.MediaLibrary({
</ins><span class="cx" style="display: block; padding: 0 10px">                                         type: 'audio',
</span><span class="cx" style="display: block; padding: 0 10px">                                        id: 'add-audio-source',
</span><span class="cx" style="display: block; padding: 0 10px">                                        title: wp.media.view.l10n.audioAddSourceTitle,
</span><span class="cx" style="display: block; padding: 0 10px">                                        toolbar: 'add-audio-source',
</span><span class="cx" style="display: block; padding: 0 10px">                                        media: this.media,
</span><span class="cx" style="display: block; padding: 0 10px">                                        menu: false
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                } )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         })
</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">        });
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -43,7 +43,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @class AudioWidgetModel
</span><span class="cx" style="display: block; padding: 0 10px">         * @constructor
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        AudioWidgetModel = component.MediaWidgetModel.extend( {} );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ AudioWidgetModel = component.MediaWidgetModel.extend({});
</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">         * Audio widget control.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -53,7 +53,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @class AudioWidgetModel
</span><span class="cx" style="display: block; padding: 0 10px">         * @constructor
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        AudioWidgetControl = component.MediaWidgetControl.extend( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ AudioWidgetControl = component.MediaWidgetControl.extend({
</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">                 * Show display settings.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -92,13 +92,13 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        previewContainer = control.$el.find( '.media-widget-preview' );
</span><span class="cx" style="display: block; padding: 0 10px">                        previewTemplate = wp.template( 'wp-media-widget-audio-preview' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        previewContainer.html( previewTemplate( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 previewContainer.html( previewTemplate({
</ins><span class="cx" style="display: block; padding: 0 10px">                                 model: {
</span><span class="cx" style="display: block; padding: 0 10px">                                        attachment_id: control.model.get( 'attachment_id' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        src: attachmentUrl
</span><span class="cx" style="display: block; padding: 0 10px">                                },
</span><span class="cx" style="display: block; padding: 0 10px">                                error: control.model.get( 'error' )
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 }));
</ins><span class="cx" style="display: block; padding: 0 10px">                         wp.mediaelement.initialize();
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -117,7 +117,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                frame: 'audio',
</span><span class="cx" style="display: block; padding: 0 10px">                                state: 'audio-details',
</span><span class="cx" style="display: block; padding: 0 10px">                                metadata: metadata
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 });
</ins><span class="cx" style="display: block; padding: 0 10px">                         wp.media.frame = mediaFrame;
</span><span class="cx" style="display: block; padding: 0 10px">                        mediaFrame.$el.addClass( 'media-widget' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -141,7 +141,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        mediaFrame.open();
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ });
</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">        component.controlConstructors.media_audio = AudioWidgetControl;
</span></span></pre></div>
<a id="trunksrcwpadminjswidgetsmediavideowidgetjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/widgets/media-video-widget.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/widgets/media-video-widget.js       2017-05-22 21:42:28 UTC (rev 40820)
+++ trunk/src/wp-admin/js/widgets/media-video-widget.js 2017-05-22 22:04:03 UTC (rev 40821)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -23,23 +23,23 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        media: this.media
</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">-                                new wp.media.controller.MediaLibrary( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         new wp.media.controller.MediaLibrary({
</ins><span class="cx" style="display: block; padding: 0 10px">                                         type: 'video',
</span><span class="cx" style="display: block; padding: 0 10px">                                        id: 'add-video-source',
</span><span class="cx" style="display: block; padding: 0 10px">                                        title: wp.media.view.l10n.videoAddSourceTitle,
</span><span class="cx" style="display: block; padding: 0 10px">                                        toolbar: 'add-video-source',
</span><span class="cx" style="display: block; padding: 0 10px">                                        media: this.media,
</span><span class="cx" style="display: block; padding: 0 10px">                                        menu: false
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                } ),
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         }),
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                new wp.media.controller.MediaLibrary( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         new wp.media.controller.MediaLibrary({
</ins><span class="cx" style="display: block; padding: 0 10px">                                         type: 'text',
</span><span class="cx" style="display: block; padding: 0 10px">                                        id: 'add-track',
</span><span class="cx" style="display: block; padding: 0 10px">                                        title: wp.media.view.l10n.videoAddTrackTitle,
</span><span class="cx" style="display: block; padding: 0 10px">                                        toolbar: 'add-track',
</span><span class="cx" style="display: block; padding: 0 10px">                                        media: this.media,
</span><span class="cx" style="display: block; padding: 0 10px">                                        menu: 'video-details'
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                } )
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         })
</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">        });
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -52,7 +52,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @class VideoWidgetModel
</span><span class="cx" style="display: block; padding: 0 10px">         * @constructor
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        VideoWidgetModel = component.MediaWidgetModel.extend( {} );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ VideoWidgetModel = component.MediaWidgetModel.extend({});
</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">         * Video widget control.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -62,7 +62,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">         * @class VideoWidgetControl
</span><span class="cx" style="display: block; padding: 0 10px">         * @constructor
</span><span class="cx" style="display: block; padding: 0 10px">         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        VideoWidgetControl = component.MediaWidgetControl.extend( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ VideoWidgetControl = component.MediaWidgetControl.extend({
</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">                 * Show display settings.
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -181,7 +181,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        previewContainer = control.$el.find( '.media-widget-preview' );
</span><span class="cx" style="display: block; padding: 0 10px">                        previewTemplate = wp.template( 'wp-media-widget-video-preview' );
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        previewContainer.html( previewTemplate( {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 previewContainer.html( previewTemplate({
</ins><span class="cx" style="display: block; padding: 0 10px">                                 model: {
</span><span class="cx" style="display: block; padding: 0 10px">                                        attachment_id: control.model.get( 'attachment_id' ),
</span><span class="cx" style="display: block; padding: 0 10px">                                        src: attachmentUrl,
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -189,7 +189,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                },
</span><span class="cx" style="display: block; padding: 0 10px">                                is_hosted_embed: isHostedEmbed,
</span><span class="cx" style="display: block; padding: 0 10px">                                error: error
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 }));
</ins><span class="cx" style="display: block; padding: 0 10px">                         wp.mediaelement.initialize();
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -232,7 +232,7 @@
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        mediaFrame.open();
</span><span class="cx" style="display: block; padding: 0 10px">                }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-        } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+ });
</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">        component.controlConstructors.media_video = VideoWidgetControl;
</span></span></pre></div>
<a id="trunksrcwpadminjswidgetsmediawidgetsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/widgets/media-widgets.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/widgets/media-widgets.js    2017-05-22 21:42:28 UTC (rev 40820)
+++ trunk/src/wp-admin/js/widgets/media-widgets.js      2017-05-22 22:04:03 UTC (rev 40821)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -134,7 +134,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                        noticeContainer.empty();
</span><span class="cx" style="display: block; padding: 0 10px">                                                        noticeContainer.append( $( '<p>', {
</span><span class="cx" style="display: block; padding: 0 10px">                                                                html: notice
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                                        } ) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                                 }));
</ins><span class="cx" style="display: block; padding: 0 10px">                                                         noticeContainer.slideDown( 'fast' );
</span><span class="cx" style="display: block; padding: 0 10px">                                                }
</span><span class="cx" style="display: block; padding: 0 10px">                                        },
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -217,7 +217,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                         *
</span><span class="cx" style="display: block; padding: 0 10px">                                         * @returns {void}
</span><span class="cx" style="display: block; padding: 0 10px">                                         */
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                        renderFail: function renderFail(  ) {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                                 renderFail: function renderFail() {
</ins><span class="cx" style="display: block; padding: 0 10px">                                                 var embedLinkView = this; // eslint-disable-line consistent-this
</span><span class="cx" style="display: block; padding: 0 10px">                                                $( '#embed-url-field' ).addClass( 'invalid' );
</span><span class="cx" style="display: block; padding: 0 10px">                                                embedLinkView.setErrorNotice( embedLinkView.controller.options.invalidEmbedTypeError || 'ERROR' );
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -230,7 +230,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                controller: this.controller,
</span><span class="cx" style="display: block; padding: 0 10px">                                model:      this.model.props,
</span><span class="cx" style="display: block; padding: 0 10px">                                priority:   40
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        }) );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 }));
</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"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -258,7 +258,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                mime = specificMimes.join( ',' );
</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">-                        this.states.add( [
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 this.states.add([
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                // Main states.
</span><span class="cx" style="display: block; padding: 0 10px">                                new component.PersistentDisplaySettingsLibrary({
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -287,7 +287,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        type: 'image' === this.options.mimeType ? 'image' : 'link',
</span><span class="cx" style="display: block; padding: 0 10px">                                        invalidEmbedTypeError: this.options.invalidEmbedTypeError
</span><span class="cx" style="display: block; padding: 0 10px">                                })
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        ] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 ]);
</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">                /**
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -643,7 +643,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                        var control = this, selection, mediaFrame, defaultSync, mediaFrameProps;
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        if ( control.isSelected() && 0 !== control.model.get( 'attachment_id' ) ) {
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                selection = new wp.media.model.Selection( [ control.selectedAttachment ] );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         selection = new wp.media.model.Selection([ control.selectedAttachment ]);
</ins><span class="cx" style="display: block; padding: 0 10px">                         } else {
</span><span class="cx" style="display: block; padding: 0 10px">                                selection = null;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -745,7 +745,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                        { attachment_id: 0 }, // Because some media frames use `attachment_id` not `id`.
</span><span class="cx" style="display: block; padding: 0 10px">                                        control.model.getEmbedResetProps()
</span><span class="cx" style="display: block; padding: 0 10px">                                );
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        }  else {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 } else {
</ins><span class="cx" style="display: block; padding: 0 10px">                                 throw new Error( 'Unexpected state: ' + state.get( 'id' ) );
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -760,7 +760,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                if ( ext in control.model.schema && modelProps.url !== modelProps[ ext ] ) {
</span><span class="cx" style="display: block; padding: 0 10px">                                        modelProps[ ext ] = '';
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                        } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                 });
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                        return modelProps;
</span><span class="cx" style="display: block; padding: 0 10px">                },
</span></span></pre></div>
<a id="trunksrcwpadminjswidgetstextwidgetsjs"></a>
<div class="modfile"><h4 style="background-color: #eee; color: inherit; margin: 1em 0; padding: 1.3em; font-size: 115%">Modified: trunk/src/wp-admin/js/widgets/text-widgets.js</h4>
<pre class="diff"><span>
<span class="info" style="display: block; padding: 0 10px; color: #888">--- trunk/src/wp-admin/js/widgets/text-widgets.js     2017-05-22 21:42:28 UTC (rev 40820)
+++ trunk/src/wp-admin/js/widgets/text-widgets.js       2017-05-22 22:04:03 UTC (rev 40821)
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -125,7 +125,7 @@
</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">                                // Destroy any existing editor so that it can be re-initialized after a widget-updated event.
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                if ( tinymce.get( id ) )    {
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         if ( tinymce.get( id ) ) {
</ins><span class="cx" style="display: block; padding: 0 10px">                                         restoreTextMode = tinymce.get( id ).isHidden();
</span><span class="cx" style="display: block; padding: 0 10px">                                        wp.editor.remove( id );
</span><span class="cx" style="display: block; padding: 0 10px">                                }
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -135,7 +135,7 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                                wpautop: true
</span><span class="cx" style="display: block; padding: 0 10px">                                        },
</span><span class="cx" style="display: block; padding: 0 10px">                                        quicktags: true
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         });
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                editor = window.tinymce.get( id );
</span><span class="cx" style="display: block; padding: 0 10px">                                if ( ! editor ) {
</span><span class="lines" style="display: block; padding: 0 10px; color: #888">@@ -190,12 +190,12 @@
</span><span class="cx" style="display: block; padding: 0 10px">                                };
</span><span class="cx" style="display: block; padding: 0 10px">                                editor.on( 'focus', function() {
</span><span class="cx" style="display: block; padding: 0 10px">                                        control.editorFocused = true;
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         });
</ins><span class="cx" style="display: block; padding: 0 10px">                                 editor.on( 'NodeChange', _.debounce( triggerChangeIfDirty, changeDebounceDelay ) );
</span><span class="cx" style="display: block; padding: 0 10px">                                editor.on( 'blur', function() {
</span><span class="cx" style="display: block; padding: 0 10px">                                        control.editorFocused = false;
</span><span class="cx" style="display: block; padding: 0 10px">                                        triggerChangeIfDirty();
</span><del style="background-color: #fdd; text-decoration:none; display:block; padding: 0 10px">-                                } );
</del><ins style="background-color: #dfd; text-decoration:none; display:block; padding: 0 10px">+                         });
</ins><span class="cx" style="display: block; padding: 0 10px"> 
</span><span class="cx" style="display: block; padding: 0 10px">                                control.editor = editor;
</span><span class="cx" style="display: block; padding: 0 10px">                        }
</span></span></pre>
</div>
</div>

</body>
</html>