diff --git a/src/wp-admin/css/customize-controls.css b/src/wp-admin/css/customize-controls.css index 9b5bbd2b9e..82713f4dc2 100644 --- a/src/wp-admin/css/customize-controls.css +++ b/src/wp-admin/css/customize-controls.css @@ -835,11 +835,6 @@ p.customize-section-description { 100% { opacity: 1; } } -@-moz-keyframes customize-reload { - 0% { opacity: 0; } - 100% { opacity: 1; } -} - @keyframes customize-reload { 0% { opacity: 0; } 100% { opacity: 1; } @@ -849,7 +844,6 @@ p.customize-section-description { .wp-customizer .customize-loading #customize-container { display: block; -webkit-animation: customize-reload .75s; /* Can't use `transition` because `display` changes here. */ - -moz-animation: customize-reload .75s; animation: customize-reload .75s; } diff --git a/src/wp-admin/js/customize-controls.js b/src/wp-admin/js/customize-controls.js index d8688ca7b5..d95287c366 100644 --- a/src/wp-admin/js/customize-controls.js +++ b/src/wp-admin/js/customize-controls.js @@ -570,7 +570,7 @@ * @since 4.2.0 */ attachEvents: function () { - var meta, section = this; + var section = this; // Expand/Collapse section/panel. section.container.find( '.accordion-section-title' ).on( 'click keydown', function( event ) { @@ -636,9 +636,12 @@ }); section.container.on( 'input', '#themes-filter', function( event ) { - var term = event.currentTarget.value.toLowerCase().trim().replace( '-', ' ' ), + var count, + term = event.currentTarget.value.toLowerCase().trim().replace( '-', ' ' ), controls = section.controls(); + controls.pop(); // Remove the last control (the add-new control). + _.each( controls, function( control ) { control.filter( term ); }); @@ -828,7 +831,7 @@ * * @since 4.2.0 */ - closeDetails: function ( theme ) { + closeDetails: function () { $( 'body' ).removeClass( 'modal-open' ); this.overlay.fadeOut( 'fast' ); api.control( 'theme_' + this.currentTheme ).focus(); @@ -1798,10 +1801,10 @@ */ filter: function( term ) { var control = this, - haystack = control.params.theme.name + ' ' - + control.params.theme.description + ' ' - + control.params.theme.tags + ' ' - + control.params.theme.author; + haystack = control.params.theme.name + ' ' + + control.params.theme.description + ' ' + + control.params.theme.tags + ' ' + + control.params.theme.author; haystack = haystack.toLowerCase().replace( '-', ' ' ); if ( -1 !== haystack.search( term ) ) { control.activate(); @@ -2678,7 +2681,7 @@ // Prompt user with AYS dialog if leaving the Customizer with unsaved changes $( window ).on( 'beforeunload', function () { if ( ! api.state( 'saved' )() ) { - var timeout = setTimeout( function() { + setTimeout( function() { overlay.removeClass( 'customize-loading' ); }, 1 ); return api.l10n.saveAlert; diff --git a/src/wp-admin/js/post.js b/src/wp-admin/js/post.js index 1b0782dda6..178deb3516 100644 --- a/src/wp-admin/js/post.js +++ b/src/wp-admin/js/post.js @@ -1,7 +1,7 @@ /* global postL10n, ajaxurl, wpAjax, setPostThumbnailL10n, postboxes, pagenow, tinymce, alert, deleteUserSetting */ /* global theList:true, theExtraList:true, getUserSetting, setUserSetting */ -var tagBox, commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink; +var commentsBox, WPSetThumbnailHTML, WPSetThumbnailID, WPRemoveThumbnail, wptitlehint, makeSlugeditClickable, editPermalink; // Back-compat: prevent fatal errors makeSlugeditClickable = editPermalink = function(){}; diff --git a/src/wp-admin/js/press-this.js b/src/wp-admin/js/press-this.js index 08b8862632..d594afef39 100644 --- a/src/wp-admin/js/press-this.js +++ b/src/wp-admin/js/press-this.js @@ -6,7 +6,6 @@ var PressThis = function() { var editor, saveAlert = false, - $div = $( '
' ), siteConfig = window.wpPressThisConfig || {}, data = window.wpPressThisData || {}, smallestWidth = 128, @@ -64,11 +63,6 @@ .replace( /<\/?[a-z][^>]*>/ig, '' ); } - // TODO: needed? - function entityEncode( text ) { - return $div.text( text ).html(); - } - /** * Strip HTML tags and entity encode some of the HTML special chars. * @@ -1027,7 +1021,7 @@ renderNotice: renderNotice, renderError: renderError }; - } + }; window.wp = window.wp || {}; window.wp.pressThis = new PressThis(); diff --git a/src/wp-admin/js/tags-box.js b/src/wp-admin/js/tags-box.js index 0cf97b53ed..04c99f0a48 100644 --- a/src/wp-admin/js/tags-box.js +++ b/src/wp-admin/js/tags-box.js @@ -1,17 +1,6 @@ /* jshint curly: false, eqeqeq: false */ -/* global ajaxurl, wpAjax */ +/* global ajaxurl */ -/** - * The functions and classes in that code are a straight cut-and-paste out of - * /wp-admin/js/post.js, coupled with Press This' usage of the post_tags_meta_box() - * PHP function. - * - * If Press This makes it into core, we can refactor that code out of post.js and - * make it more reusable, as well as improve it to work better, everywhere. - * - * Copied-and-pasted instead of enqueuing post.js because the latter has much more, - * and has processing instead of just functions/classes. - */ var tagBox, array_unique_noempty; ( function( $ ) { @@ -28,7 +17,7 @@ var tagBox, array_unique_noempty; } ); return out; - } + }; tagBox = { clean : function(tags) { @@ -46,7 +35,7 @@ var tagBox, array_unique_noempty; num = id.split('-check-num-')[1], taxbox = $(el).closest('.tagsdiv'), thetags = taxbox.find('.the-tags'), - comma = window.tagsBoxL10n.tagDelimiter; + comma = window.tagsBoxL10n.tagDelimiter, current_tags = thetags.val().split( comma ), new_tags = [];