diff --git a/wp-admin/js/accordion.js b/wp-admin/js/accordion.js index 7eacbec966..c420e8ccb8 100644 --- a/wp-admin/js/accordion.js +++ b/wp-admin/js/accordion.js @@ -31,7 +31,7 @@ ( function( $ ){ - $( document ).ready( function () { + $( function () { // Expand/Collapse accordion sections on click. $( '.accordion-container' ).on( 'click keydown', '.accordion-section-title', function( e ) { diff --git a/wp-admin/js/accordion.min.js b/wp-admin/js/accordion.min.js index 6b8b468234..e38d98b733 100644 --- a/wp-admin/js/accordion.min.js +++ b/wp-admin/js/accordion.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(s){s(document).ready(function(){s(".accordion-container").on("click keydown",".accordion-section-title",function(e){var n,o,a,i,t;"keydown"===e.type&&13!==e.which||(e.preventDefault(),n=s(this),o=n.closest(".accordion-section"),a=o.find("[aria-expanded]").first(),i=o.closest(".accordion-container"),t=i.find(".open"),e=t.find("[aria-expanded]").first(),n=o.find(".accordion-section-content"),o.hasClass("cannot-expand")||(i.addClass("opening"),o.hasClass("open")?(o.toggleClass("open"),n.toggle(!0).slideToggle(150)):(e.attr("aria-expanded","false"),t.removeClass("open"),t.find(".accordion-section-content").show().slideUp(150),n.toggle(!1).slideToggle(150),o.toggleClass("open")),setTimeout(function(){i.removeClass("opening")},150),a&&a.attr("aria-expanded",String("false"===a.attr("aria-expanded")))))})})}(jQuery); \ No newline at end of file +!function(s){s(function(){s(".accordion-container").on("click keydown",".accordion-section-title",function(e){var n,o,a,i,t;"keydown"===e.type&&13!==e.which||(e.preventDefault(),n=s(this),o=n.closest(".accordion-section"),a=o.find("[aria-expanded]").first(),i=o.closest(".accordion-container"),t=i.find(".open"),e=t.find("[aria-expanded]").first(),n=o.find(".accordion-section-content"),o.hasClass("cannot-expand")||(i.addClass("opening"),o.hasClass("open")?(o.toggleClass("open"),n.toggle(!0).slideToggle(150)):(e.attr("aria-expanded","false"),t.removeClass("open"),t.find(".accordion-section-content").show().slideUp(150),n.toggle(!1).slideToggle(150),o.toggleClass("open")),setTimeout(function(){i.removeClass("opening")},150),a&&a.attr("aria-expanded",String("false"===a.attr("aria-expanded")))))})})}(jQuery); \ No newline at end of file diff --git a/wp-admin/js/color-picker.js b/wp-admin/js/color-picker.js index f41f00af18..600e0235b3 100644 --- a/wp-admin/js/color-picker.js +++ b/wp-admin/js/color-picker.js @@ -101,7 +101,7 @@ } // Bind the close event. - self.close = $.proxy( self.close, self ); + self.close = self.close.bind( self ); self.initialValue = el.val(); @@ -277,7 +277,7 @@ if ( me.hasClass( 'wp-picker-clear' ) ) { self.element.val( '' ); self.toggler.css( 'backgroundColor', '' ); - if ( $.isFunction( self.options.clear ) ) { + if ( typeof self.options.clear === 'function' ) { self.options.clear.call( this, event ); } } else if ( me.hasClass( 'wp-picker-default' ) ) { diff --git a/wp-admin/js/color-picker.min.js b/wp-admin/js/color-picker.min.js index 6162cd79ff..00867643e8 100644 --- a/wp-admin/js/color-picker.min.js +++ b/wp-admin/js/color-picker.min.js @@ -1,2 +1,2 @@ /*! This file is auto-generated */ -!function(i,t){var a=wp.i18n.__,e={options:{defaultColor:!1,change:!1,clear:!1,hide:!0,palettes:!0,width:255,mode:"hsv",type:"full",slider:"horizontal"},_createHueOnly:function(){var e,o=this,t=o.element;t.hide(),e="hsl("+t.val()+", 100, 50)",t.iris({mode:"hsl",type:"hue",hide:!1,color:e,change:function(e,t){"function"==typeof o.options.change&&o.options.change.call(this,e,t)},width:o.options.width,slider:o.options.slider})},_create:function(){if(i.support.iris){var o=this,e=o.element;if(i.extend(o.options,e.data()),"hue"===o.options.type)return o._createHueOnly();o.close=i.proxy(o.close,o),o.initialValue=e.val(),e.addClass("wp-color-picker"),e.parent("label").length||(e.wrap(""),o.wrappingLabelText=i('').insertBefore(e).text(a("Color value"))),o.wrappingLabel=e.parent(),o.wrappingLabel.wrap('
'),o.wrap=o.wrappingLabel.parent(),o.toggler=i('').insertBefore(o.wrappingLabel).css({backgroundColor:o.initialValue}),o.toggler.find(".wp-color-result-text").text(a("Select Color")),o.pickerContainer=i('
').insertAfter(o.wrappingLabel),o.button=i(''),o.options.defaultColor?o.button.addClass("wp-picker-default").val(a("Default")).attr("aria-label",a("Select default color")):o.button.addClass("wp-picker-clear").val(a("Clear")).attr("aria-label",a("Clear color")),o.wrappingLabel.wrap('