diff --git a/wp-admin/js/common.js b/wp-admin/js/common.js index 9569405..4a96314 100644 --- a/wp-admin/js/common.js +++ b/wp-admin/js/common.js @@ -1080,7 +1080,7 @@ $( function() { * @return {void} */ }).find( 'li.wp-has-submenu.wp-not-current-submenu' ).on( 'focusin.adminmenu', function() { - adjustSubmenu( $( this ) ); + adjustSubmenu( $( this )[0] ); }); } diff --git a/wp-admin/js/common.min.js b/wp-admin/js/common.min.js index c6dce6c..2a6393f 100644 --- a/wp-admin/js/common.min.js +++ b/wp-admin/js/common.min.js @@ -1 +1 @@ -!function(e,t){var n=e(document),i=e(t),o=e(document.body),a=wp.i18n.__,s=wp.i18n.sprintf;function r(e,n,i){var o;o=void 0!==i?s(a("%1$s is deprecated since version %2$s! Use %3$s instead."),e,n,i):s(a("%1$s is deprecated since version %2$s with no alternative available."),e,n),t.console.warn(o)}function l(e,t,n){var i={};return Object.keys(t).forEach((function(o){var a=t[o],s=e+"."+o;"object"==typeof a?Object.defineProperty(i,o,{get:function(){return r(s,n,a.alternative),a.func()}}):Object.defineProperty(i,o,{get:function(){return r(s,n,"wp.i18n"),a}})})),i}t.wp.deprecateL10nObject=l,t.commonL10n=t.commonL10n||{warnDelete:"",dismiss:"",collapseMenu:"",expandMenu:""},t.commonL10n=l("commonL10n",t.commonL10n,"5.5.0"),t.wpPointerL10n=t.wpPointerL10n||{dismiss:""},t.wpPointerL10n=l("wpPointerL10n",t.wpPointerL10n,"5.5.0"),t.userProfileL10n=t.userProfileL10n||{warn:"",warnWeak:"",show:"",hide:"",cancel:"",ariaShow:"",ariaHide:""},t.userProfileL10n=l("userProfileL10n",t.userProfileL10n,"5.5.0"),t.privacyToolsL10n=t.privacyToolsL10n||{noDataFound:"",foundAndRemoved:"",noneRemoved:"",someNotRemoved:"",removalError:"",emailSent:"",noExportFile:"",exportError:""},t.privacyToolsL10n=l("privacyToolsL10n",t.privacyToolsL10n,"5.5.0"),t.authcheckL10n={beforeunload:""},t.authcheckL10n=t.authcheckL10n||l("authcheckL10n",t.authcheckL10n,"5.5.0"),t.tagsl10n={noPerm:"",broken:""},t.tagsl10n=t.tagsl10n||l("tagsl10n",t.tagsl10n,"5.5.0"),t.adminCommentsL10n=t.adminCommentsL10n||{hotkeys_highlight_first:{alternative:"window.adminCommentsSettings.hotkeys_highlight_first",func:function(){return t.adminCommentsSettings.hotkeys_highlight_first}},hotkeys_highlight_last:{alternative:"window.adminCommentsSettings.hotkeys_highlight_last",func:function(){return t.adminCommentsSettings.hotkeys_highlight_last}},replyApprove:"",reply:"",warnQuickEdit:"",warnCommentChanges:"",docTitleComments:"",docTitleCommentsCount:""},t.adminCommentsL10n=l("adminCommentsL10n",t.adminCommentsL10n,"5.5.0"),t.tagsSuggestL10n=t.tagsSuggestL10n||{tagDelimiter:"",removeTerm:"",termSelected:"",termAdded:"",termRemoved:""},t.tagsSuggestL10n=l("tagsSuggestL10n",t.tagsSuggestL10n,"5.5.0"),t.wpColorPickerL10n=t.wpColorPickerL10n||{clear:"",clearAriaLabel:"",defaultString:"",defaultAriaLabel:"",pick:"",defaultLabel:""},t.wpColorPickerL10n=l("wpColorPickerL10n",t.wpColorPickerL10n,"5.5.0"),t.attachMediaBoxL10n=t.attachMediaBoxL10n||{error:""},t.attachMediaBoxL10n=l("attachMediaBoxL10n",t.attachMediaBoxL10n,"5.5.0"),t.postL10n=t.postL10n||{ok:"",cancel:"",publishOn:"",publishOnFuture:"",publishOnPast:"",dateFormat:"",showcomm:"",endcomm:"",publish:"",schedule:"",update:"",savePending:"",saveDraft:"","private":"","public":"",publicSticky:"",password:"",privatelyPublished:"",published:"",saveAlert:"",savingText:"",permalinkSaved:""},t.postL10n=l("postL10n",t.postL10n,"5.5.0"),t.inlineEditL10n=t.inlineEditL10n||{error:"",ntdeltitle:"",notitle:"",comma:"",saved:""},t.inlineEditL10n=l("inlineEditL10n",t.inlineEditL10n,"5.5.0"),t.plugininstallL10n=t.plugininstallL10n||{plugin_information:"",plugin_modal_label:"",ays:""},t.plugininstallL10n=l("plugininstallL10n",t.plugininstallL10n,"5.5.0"),t.navMenuL10n=t.navMenuL10n||{noResultsFound:"",warnDeleteMenu:"",saveAlert:"",untitled:""},t.navMenuL10n=l("navMenuL10n",t.navMenuL10n,"5.5.0"),t.commentL10n=t.commentL10n||{submittedOn:"",dateFormat:""},t.commentL10n=l("commentL10n",t.commentL10n,"5.5.0"),t.setPostThumbnailL10n=t.setPostThumbnailL10n||{setThumbnail:"",saving:"",error:"",done:""},t.setPostThumbnailL10n=l("setPostThumbnailL10n",t.setPostThumbnailL10n,"5.5.0"),t.adminMenu={init:function(){},fold:function(){},restoreMenuState:function(){},toggle:function(){},favorites:function(){}},t.columns={init:function(){var t=this;e(".hide-column-tog","#adv-settings").on("click",(function(){var n=e(this),i=n.val();n.prop("checked")?t.checked(i):t.unchecked(i),columns.saveManageColumnsState()}))},saveManageColumnsState:function(){var t=this.hidden();e.post(ajaxurl,{action:"hidden-columns",hidden:t,screenoptionnonce:e("#screenoptionnonce").val(),page:pagenow})},checked:function(t){e(".column-"+t).removeClass("hidden"),this.colSpanChange(1)},unchecked:function(t){e(".column-"+t).addClass("hidden"),this.colSpanChange(-1)},hidden:function(){return e(".manage-column[id]").filter(".hidden").map((function(){return this.id})).get().join(",")},useCheckboxesForHidden:function(){this.hidden=function(){return e(".hide-column-tog").not(":checked").map((function(){var e=this.id;return e.substring(e,e.length-5)})).get().join(",")}},colSpanChange:function(t){var n,i=e("table").find(".colspanchange");i.length&&(n=parseInt(i.attr("colspan"),10)+t,i.attr("colspan",n.toString()))}},e((function(){columns.init()})),t.validateForm=function(t){return!e(t).find(".form-required").filter((function(){return""===e(":input:visible",this).val()})).addClass("form-invalid").find(":input:visible").on("change",(function(){e(this).closest(".form-invalid").removeClass("form-invalid")})).length},t.showNotice={warn:function(){return!!confirm(a("You are about to permanently delete these items from your site.\nThis action cannot be undone.\n'Cancel' to stop, 'OK' to delete."))},note:function(e){alert(e)}},t.screenMeta={element:null,toggles:null,page:null,init:function(){this.element=e("#screen-meta"),this.toggles=e("#screen-meta-links").find(".show-settings"),this.page=e("#wpcontent"),this.toggles.on("click",this.toggleEvent)},toggleEvent:function(){var t=e("#"+e(this).attr("aria-controls"));t.length&&(t.is(":visible")?screenMeta.close(t,e(this)):screenMeta.open(t,e(this)))},open:function(t,i){e("#screen-meta-links").find(".screen-meta-toggle").not(i.parent()).css("visibility","hidden"),t.parent().show(),t.slideDown("fast",(function(){t.removeClass("hidden").trigger("focus"),i.addClass("screen-meta-active").attr("aria-expanded",!0)})),n.trigger("screen:options:open")},close:function(t,i){t.slideUp("fast",(function(){i.removeClass("screen-meta-active").attr("aria-expanded",!1),e(".screen-meta-toggle").css("visibility",""),t.parent().hide(),t.addClass("hidden")})),n.trigger("screen:options:close")}},e(".contextual-help-tabs").on("click","a",(function(t){var n,i=e(this);if(t.preventDefault(),i.is(".active a"))return!1;e(".contextual-help-tabs .active").removeClass("active"),i.parent("li").addClass("active"),n=e(i.attr("href")),e(".help-tab-content").not(n).removeClass("active").hide(),n.addClass("active").show()}));var c=!1,u=e("#permalink_structure"),d=e(".permalink-structure input:radio"),p=e("#custom_selection"),m=e(".form-table.permalink-structure .available-structure-tags button");function h(e){-1!==u.val().indexOf(e.text().trim())?(e.attr("data-label",e.attr("aria-label")),e.attr("aria-label",e.attr("data-used")),e.attr("aria-pressed",!0),e.addClass("active")):e.attr("data-label")&&(e.attr("aria-label",e.attr("data-label")),e.attr("aria-pressed",!1),e.removeClass("active"))}d.on("change",(function(){"custom"!==this.value&&(u.val(this.value),m.each((function(){h(e(this))})))})),u.on("click input",(function(){p.prop("checked",!0)})),u.on("focus",(function(t){c=!0,e(this).off(t)})),m.each((function(){h(e(this))})),u.on("change",(function(){m.each((function(){h(e(this))}))})),m.on("click",(function(){var t,n,i=u.val(),o=u[0].selectionStart,a=u[0].selectionEnd,s=e(this).text().trim();if(t=e(this).hasClass("active")?e(this).attr("data-removed"):e(this).attr("data-added"),-1!==i.indexOf(s))return i=i.replace(s+"/",""),u.val("/"===i?"":i),e("#custom_selection_updated").text(t),void h(e(this));c||0!==o||0!==a||(o=a=i.length),p.prop("checked",!0),"/"!==i.substr(0,o).substr(-1)&&(s="/"+s),"/"!==i.substr(a,1)&&(s+="/"),u.val(i.substr(0,o)+s+i.substr(a)),e("#custom_selection_updated").text(t),h(e(this)),c&&u[0].setSelectionRange&&(n=(i.substr(0,o)+s).length,u[0].setSelectionRange(n,n),u.trigger("focus"))})),e((function(){var s,r,l,c,u,d,p,m,h,f,g=!1,v=e("input.current-page"),b=v.val(),w=/iPhone|iPad|iPod/.test(navigator.userAgent),k=-1!==navigator.userAgent.indexOf("Android"),L=e("#adminmenuwrap"),C=e("#wpwrap"),y=e("#adminmenu"),x=e("#wp-responsive-overlay"),S=e("#wp-toolbar"),T=S.find('a[aria-haspopup="true"]'),P=e(".meta-box-sortables"),E=!1,_=e("#wpadminbar"),D=0,M=!1,A=!1,O=0,j=!1,R={window:i.height(),wpwrap:C.height(),adminbar:_.height(),menu:L.height()},B=e(".wp-header-end"),N=document.body.className.includes("wp-admin")&&y[0]?y[0].querySelectorAll("li.wp-has-submenu"):[];function F(){var t=e("a.wp-has-current-submenu");"folded"===f?t.attr("aria-haspopup","true"):t.attr("aria-haspopup","false")}function U(t){var n,o,a,s,r,l,c,u,d=t.querySelector(".wp-submenu");c=t.getBoundingClientRect(),u=t.ownerDocument.defaultView,l=(s=c.top+u.pageYOffset)-(r=document.scrollingElement.scrollTop)-30,o=60+(n=s+d.getBoundingClientRect().height+1)-C.height(),(a=i.height()+r-50)l&&(o=l),o>1&&e("#wp-admin-bar-menu-toggle").is(":hidden")?d.style.marginTop="-"+o+"px":d.style.marginTop=""}function K(){e(".notice.is-dismissible").each((function(){var t=e(this),n=e('');t.find(".notice-dismiss").length||(n.find(".screen-reader-text").text(a("Dismiss this notice.")),n.on("click.wp-dismiss-notice",(function(e){e.preventDefault(),t.fadeTo(100,0,(function(){t.slideUp(100,(function(){t.remove()}))}))})),t.append(n))}))}function q(t,n,i,o){i.on("change",(function(){t.val(e(this).val())})),t.on("change",(function(){i.val(e(this).val())})),o.on("click",(function(e){e.preventDefault(),e.stopPropagation(),n.trigger("click")}))}function z(e){var t=i.scrollTop(),o=!e||"scroll"!==e.type;if(!w&&!y.data("wp-responsive"))if(R.menu+R.adminbarR.wpwrap)W();else{if(j=!0,R.menu+R.adminbar>R.window){if(t<0)return void(M||(M=!0,A=!1,L.css({position:"fixed",top:"",bottom:""})));if(t+R.window>n.height()-1)return void(A||(A=!0,M=!1,L.css({position:"fixed",top:"",bottom:0})));t>D?M?(M=!1,(O=L.offset().top-R.adminbar-(t-D))+R.menu+R.adminbart+R.window&&(O=t),L.css({position:"absolute",top:O,bottom:""})):!M&&L.offset().top>=t+R.adminbar&&(M=!0,L.css({position:"fixed",top:"",bottom:""})):o&&(M=A=!1,(O=t+R.window-R.menu-R.adminbar-1)>0?L.css({position:"absolute",top:O,bottom:""}):W())}D=t}}function I(){R={window:i.height(),wpwrap:C.height(),adminbar:_.height(),menu:L.height()}}function W(){!w&&j&&(M=A=j=!1,L.css({position:"",top:"",bottom:""}))}function $(){I(),y.data("wp-responsive")?(o.removeClass("sticky-menu"),W()):R.menu+R.adminbar>R.window?(z(),o.removeClass("sticky-menu")):(o.addClass("sticky-menu"),W())}function Q(){e(".aria-button-if-js").attr("role","button")}function V(){var e=!1;return t.innerWidth&&(e=Math.max(t.innerWidth,document.documentElement.clientWidth)),e}function H(){var e=V()||961;f=e<=782?"responsive":o.hasClass("folded")||o.hasClass("auto-fold")&&e<=960&&e>782?"folded":"open",n.trigger("wp-menu-state-set",{state:f})}y.on("click.wp-submenu-head",".wp-submenu-head",(function(t){e(t.target).parent().siblings("a").get(0).click()})),e("#collapse-button").on("click.collapse-menu",(function(){var t=V()||961;e("#adminmenu div.wp-submenu").css("margin-top",""),t<=960?o.hasClass("auto-fold")?(o.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),f="open"):(o.addClass("auto-fold"),setUserSetting("unfold",0),f="folded"):o.hasClass("folded")?(o.removeClass("folded"),setUserSetting("mfold","o"),f="open"):(o.addClass("folded"),setUserSetting("mfold","f"),f="folded"),n.trigger("wp-collapse-menu",{state:f})})),n.on("wp-menu-state-set wp-collapse-menu wp-responsive-activate wp-responsive-deactivate",F),("ontouchstart"in t||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(u=w?"touchstart":"click",o.on(u+".wp-mobile-hover",(function(t){y.data("wp-responsive")||e(t.target).closest("#adminmenu").length||y.find("li.opensub").removeClass("opensub")})),y.find("a.wp-has-submenu").on(u+".wp-mobile-hover",(function(e){var t=this.parentNode;y.data("wp-responsive")||t.className.includes("opensub")||t.className.includes("wp-menu-open")&&!(t.getBoundingClientRect().width<40)||(e.preventDefault(),U(t),y.find("li.opensub").removeClass("opensub"),t.classList.add("opensub"))}))),w||k||(N.forEach((function(e){e.addEventListener("mouseenter",(function(){var t=e.querySelector(".wp-submenu").getBoundingClientRect().top;isNaN(t)||t>-5||y.data("wp-responsive")||(clearTimeout(h),U(e),N.forEach((function(e){e.classList.remove("opensub")})),m=setTimeout((function(){e.classList.add("opensub")}),200))})),e.addEventListener("mouseleave",(function(){clearTimeout(m),h=setTimeout((function(){e.classList.remove("opensub")}),90)}))})),y.on("focus.adminmenu",".wp-submenu a",(function(t){y.data("wp-responsive")||e(t.target).closest("li.menu-top").addClass("opensub")})).on("blur.adminmenu",".wp-submenu a",(function(t){y.data("wp-responsive")||e(t.target).closest("li.menu-top").removeClass("opensub")})).find("li.wp-has-submenu.wp-not-current-submenu").on("focusin.adminmenu",(function(){U(e(this))}))),B.length||(B=e(".wrap h1, .wrap h2").first()),e("div.updated, div.error, div.notice").not(".inline, .below-h2").insertAfter(B),n.on("wp-updates-notice-added wp-plugin-install-error wp-plugin-update-error wp-plugin-delete-error wp-theme-install-error wp-theme-delete-error",K),screenMeta.init(),o.on("click","tbody > tr > .check-column :checkbox",(function(t){if("undefined"==t.shiftKey)return!0;if(t.shiftKey){if(!g)return!0;s=e(g).closest("form").find(":checkbox").filter(":visible:enabled"),r=s.index(g),l=s.index(this),c=e(this).prop("checked"),0r?s.slice(r,l):s.slice(l,r)).prop("checked",(function(){return!!e(this).closest("tr").is(":visible")&&c}))}g=this;var n=e(this).closest("tbody").find(":checkbox").filter(":visible:enabled").not(":checked");return e(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",(function(){return 0===n.length})),!0})),o.on("click.wp-toggle-checkboxes","thead .check-column :checkbox, tfoot .check-column :checkbox",(function(t){var n=e(this),i=n.closest("table"),o=n.prop("checked"),a=t.shiftKey||n.data("wp-toggle");i.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",(function(){return!e(this).is(":hidden,:disabled")&&(a?!e(this).prop("checked"):!!o)})),i.children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",(function(){return!a&&!!o}))})),q(e("#bulk-action-selector-top"),e("#doaction"),e("#bulk-action-selector-bottom"),e("#doaction2")),q(e("#new_role"),e("#changeit"),e("#new_role2"),e("#changeit2")),e("#wpbody-content").on({focusin:function(){clearTimeout(d),p=e(this).find(".row-actions"),e(".row-actions").not(this).removeClass("visible"),p.addClass("visible")},focusout:function(){d=setTimeout((function(){p.removeClass("visible")}),30)}},".table-view-list .has-row-actions"),e("tbody").on("click",".toggle-row",(function(){e(this).closest("tr").toggleClass("is-expanded")})),e("#default-password-nag-no").on("click",(function(){return setUserSetting("default_password_nag","hide"),e("div.default-password-nag").hide(),!1})),e("#newcontent").on("keydown.wpevent_InsertTab",(function(t){var n,i,o,a,s=t.target;if(27==t.keyCode)return t.preventDefault(),void e(s).data("tab-out",!0);9!=t.keyCode||t.ctrlKey||t.altKey||t.shiftKey||(e(s).data("tab-out")?e(s).data("tab-out",!1):(n=s.selectionStart,i=s.selectionEnd,o=s.value,document.selection?(s.focus(),document.selection.createRange().text="\t"):n>=0&&(a=this.scrollTop,s.value=o.substring(0,n).concat("\t",o.substring(i)),s.selectionStart=s.selectionEnd=n+1,this.scrollTop=a),t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()))})),v.length&&v.closest("form").on("submit",(function(){-1==e('select[name="action"]').val()&&v.val()==b&&v.val("1")})),e('.search-box input[type="search"], .search-box input[type="submit"]').on("mousedown",(function(){e('select[name^="action"]').val("-1")})),e("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",(function(e){e.target.scrollIntoView&&e.target.scrollIntoView(!1)})),function(){var t,n,i=e("form.wp-upload-form");function o(){t.prop("disabled",""===n.map((function(){return e(this).val()})).get().join(""))}i.length&&(t=i.find('input[type="submit"]'),n=i.find('input[type="file"]'),o(),n.on("change",o))}(),w||(i.on("scroll.pin-menu",z),n.on("tinymce-editor-init.pin-menu",(function(e,t){t.on("wp-autoresize",I)}))),t.wpResponsive={init:function(){var t=this;this.maybeDisableSortables=this.maybeDisableSortables.bind(this),n.on("wp-responsive-activate.wp-responsive",(function(){t.activate()})).on("wp-responsive-deactivate.wp-responsive",(function(){t.deactivate()})),e("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),e("#wp-admin-bar-menu-toggle").on("click.wp-responsive",(function(t){t.preventDefault(),_.find(".hover").removeClass("hover"),C.toggleClass("wp-responsive-open"),C.hasClass("wp-responsive-open")?(e(this).find("a").attr("aria-expanded","true"),e("#adminmenu a:first").trigger("focus")):e(this).find("a").attr("aria-expanded","false")})),e("#wp-admin-bar-menu-toggle, #adminmenumain").on("focusout",(function(){var t,n;C.hasClass("wp-responsive-open")&&document.hasFocus()&&setTimeout((function(){t=e.contains(e("#wp-admin-bar-menu-toggle")[0],e(":focus")[0]),n=e.contains(e("#adminmenumain")[0],e(":focus")[0]),t||n||e("#wp-admin-bar-menu-toggle").trigger("click.wp-responsive")}),10)})),y.on("click.wp-responsive","li.wp-has-submenu > a",(function(t){y.data("wp-responsive")&&(e(this).parent("li").toggleClass("selected"),e(this).trigger("focus"),t.preventDefault())})),t.trigger(),n.on("wp-window-resized.wp-responsive",this.trigger.bind(this)),i.on("load.wp-responsive",this.maybeDisableSortables),n.on("postbox-toggled",this.maybeDisableSortables),e("#screen-options-wrap input").on("click",this.maybeDisableSortables)},maybeDisableSortables:function(){(navigator.userAgent.indexOf("AppleWebKit/")>-1?i.width():t.innerWidth)<=782||1>=P.find(".ui-sortable-handle:visible").length&&jQuery(".columns-prefs-1 input").prop("checked")?this.disableSortables():this.enableSortables()},activate:function(){$(),o.hasClass("auto-fold")||o.addClass("auto-fold"),y.data("wp-responsive",1),this.disableSortables()},deactivate:function(){$(),y.removeData("wp-responsive"),this.maybeDisableSortables()},trigger:function(){var e=V();e&&(e<=782?E||(n.trigger("wp-responsive-activate"),E=!0):E&&(n.trigger("wp-responsive-deactivate"),E=!1),e<=480?this.enableOverlay():this.disableOverlay(),this.maybeDisableSortables())},enableOverlay:function(){0===x.length&&(x=e('
').insertAfter("#wpcontent").hide().on("click.wp-responsive",(function(){S.find(".menupop.hover").removeClass("hover"),e(this).hide()}))),T.on("click.wp-responsive",(function(){x.show()}))},disableOverlay:function(){T.off("click.wp-responsive"),x.hide()},disableSortables:function(){if(P.length)try{P.sortable("disable"),P.find(".ui-sortable-handle").addClass("is-non-sortable")}catch(e){}},enableSortables:function(){if(P.length)try{P.sortable("enable"),P.find(".ui-sortable-handle").removeClass("is-non-sortable")}catch(e){}}},e(document).on("ajaxComplete",(function(){Q()})),n.on("wp-window-resized.set-menu-state",H),n.on("wp-menu-state-set wp-collapse-menu",(function(t,n){var i,o,s=e("#collapse-button");"folded"===n.state?(i="false",o=a("Expand Main menu")):(i="true",o=a("Collapse Main menu")),s.attr({"aria-expanded":i,"aria-label":o})})),t.wpResponsive.init(),$(),H(),F(),K(),Q(),n.on("wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu",$),e(".wp-initial-focus").trigger("focus"),o.on("click",".js-update-details-toggle",(function(){var t=e(this).closest(".js-update-details"),n=e("#"+t.data("update-details"));n.hasClass("update-details-moved")||n.insertAfter(t).addClass("update-details-moved"),n.toggle(),e(this).attr("aria-expanded",n.is(":visible"))}))})),e((function(e){var n,i;o.hasClass("update-php")&&(n=e("a.update-from-upload-overwrite"),i=e(".update-from-upload-expired"),n.length&&i.length&&t.setTimeout((function(){n.hide(),i.removeClass("hidden"),t.wp&&t.wp.a11y&&t.wp.a11y.speak(i.text())}),714e4))})),function(){var e;function o(){n.trigger("wp-window-resized")}i.on("resize.wp-fire-once",(function(){t.clearTimeout(e),e=t.setTimeout(o,200)}))}(),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var e=document.createElement("style");e.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(e)}}()}(jQuery,window),document.querySelectorAll("details").forEach((function(e){e.addEventListener("toggle",(function(){var t,n;if(e.hasAttribute("open"))e.querySelectorAll("[inert]").forEach((function(e){e.removeAttribute("inert")}));else for(t=1,n=e.children.length;tl&&(o=l),o>1&&e("#wp-admin-bar-menu-toggle").is(":hidden")?d.style.marginTop="-"+o+"px":d.style.marginTop=""}function K(){e(".notice.is-dismissible").each((function(){var t=e(this),n=e('');t.find(".notice-dismiss").length||(n.find(".screen-reader-text").text(a("Dismiss this notice.")),n.on("click.wp-dismiss-notice",(function(e){e.preventDefault(),t.fadeTo(100,0,(function(){t.slideUp(100,(function(){t.remove()}))}))})),t.append(n))}))}function q(t,n,i,o){i.on("change",(function(){t.val(e(this).val())})),t.on("change",(function(){i.val(e(this).val())})),o.on("click",(function(e){e.preventDefault(),e.stopPropagation(),n.trigger("click")}))}function z(e){var t=i.scrollTop(),o=!e||"scroll"!==e.type;if(!w&&!y.data("wp-responsive"))if(R.menu+R.adminbarR.wpwrap)W();else{if(j=!0,R.menu+R.adminbar>R.window){if(t<0)return void(M||(M=!0,A=!1,L.css({position:"fixed",top:"",bottom:""})));if(t+R.window>n.height()-1)return void(A||(A=!0,M=!1,L.css({position:"fixed",top:"",bottom:0})));t>D?M?(M=!1,(O=L.offset().top-R.adminbar-(t-D))+R.menu+R.adminbart+R.window&&(O=t),L.css({position:"absolute",top:O,bottom:""})):!M&&L.offset().top>=t+R.adminbar&&(M=!0,L.css({position:"fixed",top:"",bottom:""})):o&&(M=A=!1,(O=t+R.window-R.menu-R.adminbar-1)>0?L.css({position:"absolute",top:O,bottom:""}):W())}D=t}}function I(){R={window:i.height(),wpwrap:C.height(),adminbar:_.height(),menu:L.height()}}function W(){!w&&j&&(M=A=j=!1,L.css({position:"",top:"",bottom:""}))}function $(){I(),y.data("wp-responsive")?(o.removeClass("sticky-menu"),W()):R.menu+R.adminbar>R.window?(z(),o.removeClass("sticky-menu")):(o.addClass("sticky-menu"),W())}function Q(){e(".aria-button-if-js").attr("role","button")}function V(){var e=!1;return t.innerWidth&&(e=Math.max(t.innerWidth,document.documentElement.clientWidth)),e}function H(){var e=V()||961;f=e<=782?"responsive":o.hasClass("folded")||o.hasClass("auto-fold")&&e<=960&&e>782?"folded":"open",n.trigger("wp-menu-state-set",{state:f})}y.on("click.wp-submenu-head",".wp-submenu-head",(function(t){e(t.target).parent().siblings("a").get(0).click()})),e("#collapse-button").on("click.collapse-menu",(function(){var t=V()||961;e("#adminmenu div.wp-submenu").css("margin-top",""),t<=960?o.hasClass("auto-fold")?(o.removeClass("auto-fold").removeClass("folded"),setUserSetting("unfold",1),setUserSetting("mfold","o"),f="open"):(o.addClass("auto-fold"),setUserSetting("unfold",0),f="folded"):o.hasClass("folded")?(o.removeClass("folded"),setUserSetting("mfold","o"),f="open"):(o.addClass("folded"),setUserSetting("mfold","f"),f="folded"),n.trigger("wp-collapse-menu",{state:f})})),n.on("wp-menu-state-set wp-collapse-menu wp-responsive-activate wp-responsive-deactivate",F),("ontouchstart"in t||/IEMobile\/[1-9]/.test(navigator.userAgent))&&(u=w?"touchstart":"click",o.on(u+".wp-mobile-hover",(function(t){y.data("wp-responsive")||e(t.target).closest("#adminmenu").length||y.find("li.opensub").removeClass("opensub")})),y.find("a.wp-has-submenu").on(u+".wp-mobile-hover",(function(e){var t=this.parentNode;y.data("wp-responsive")||t.className.includes("opensub")||t.className.includes("wp-menu-open")&&!(t.getBoundingClientRect().width<40)||(e.preventDefault(),U(t),y.find("li.opensub").removeClass("opensub"),t.classList.add("opensub"))}))),w||k||(N.forEach((function(e){e.addEventListener("mouseenter",(function(){var t=e.querySelector(".wp-submenu").getBoundingClientRect().top;isNaN(t)||t>-5||y.data("wp-responsive")||(clearTimeout(h),U(e),N.forEach((function(e){e.classList.remove("opensub")})),m=setTimeout((function(){e.classList.add("opensub")}),200))})),e.addEventListener("mouseleave",(function(){clearTimeout(m),h=setTimeout((function(){e.classList.remove("opensub")}),90)}))})),y.on("focus.adminmenu",".wp-submenu a",(function(t){y.data("wp-responsive")||e(t.target).closest("li.menu-top").addClass("opensub")})).on("blur.adminmenu",".wp-submenu a",(function(t){y.data("wp-responsive")||e(t.target).closest("li.menu-top").removeClass("opensub")})).find("li.wp-has-submenu.wp-not-current-submenu").on("focusin.adminmenu",(function(){U(e(this)[0])}))),B.length||(B=e(".wrap h1, .wrap h2").first()),e("div.updated, div.error, div.notice").not(".inline, .below-h2").insertAfter(B),n.on("wp-updates-notice-added wp-plugin-install-error wp-plugin-update-error wp-plugin-delete-error wp-theme-install-error wp-theme-delete-error",K),screenMeta.init(),o.on("click","tbody > tr > .check-column :checkbox",(function(t){if("undefined"==t.shiftKey)return!0;if(t.shiftKey){if(!g)return!0;s=e(g).closest("form").find(":checkbox").filter(":visible:enabled"),r=s.index(g),l=s.index(this),c=e(this).prop("checked"),0r?s.slice(r,l):s.slice(l,r)).prop("checked",(function(){return!!e(this).closest("tr").is(":visible")&&c}))}g=this;var n=e(this).closest("tbody").find(":checkbox").filter(":visible:enabled").not(":checked");return e(this).closest("table").children("thead, tfoot").find(":checkbox").prop("checked",(function(){return 0===n.length})),!0})),o.on("click.wp-toggle-checkboxes","thead .check-column :checkbox, tfoot .check-column :checkbox",(function(t){var n=e(this),i=n.closest("table"),o=n.prop("checked"),a=t.shiftKey||n.data("wp-toggle");i.children("tbody").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",(function(){return!e(this).is(":hidden,:disabled")&&(a?!e(this).prop("checked"):!!o)})),i.children("thead, tfoot").filter(":visible").children().children(".check-column").find(":checkbox").prop("checked",(function(){return!a&&!!o}))})),q(e("#bulk-action-selector-top"),e("#doaction"),e("#bulk-action-selector-bottom"),e("#doaction2")),q(e("#new_role"),e("#changeit"),e("#new_role2"),e("#changeit2")),e("#wpbody-content").on({focusin:function(){clearTimeout(d),p=e(this).find(".row-actions"),e(".row-actions").not(this).removeClass("visible"),p.addClass("visible")},focusout:function(){d=setTimeout((function(){p.removeClass("visible")}),30)}},".table-view-list .has-row-actions"),e("tbody").on("click",".toggle-row",(function(){e(this).closest("tr").toggleClass("is-expanded")})),e("#default-password-nag-no").on("click",(function(){return setUserSetting("default_password_nag","hide"),e("div.default-password-nag").hide(),!1})),e("#newcontent").on("keydown.wpevent_InsertTab",(function(t){var n,i,o,a,s=t.target;if(27==t.keyCode)return t.preventDefault(),void e(s).data("tab-out",!0);9!=t.keyCode||t.ctrlKey||t.altKey||t.shiftKey||(e(s).data("tab-out")?e(s).data("tab-out",!1):(n=s.selectionStart,i=s.selectionEnd,o=s.value,document.selection?(s.focus(),document.selection.createRange().text="\t"):n>=0&&(a=this.scrollTop,s.value=o.substring(0,n).concat("\t",o.substring(i)),s.selectionStart=s.selectionEnd=n+1,this.scrollTop=a),t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault()))})),v.length&&v.closest("form").on("submit",(function(){-1==e('select[name="action"]').val()&&v.val()==b&&v.val("1")})),e('.search-box input[type="search"], .search-box input[type="submit"]').on("mousedown",(function(){e('select[name^="action"]').val("-1")})),e("#contextual-help-link, #show-settings-link").on("focus.scroll-into-view",(function(e){e.target.scrollIntoView&&e.target.scrollIntoView(!1)})),function(){var t,n,i=e("form.wp-upload-form");function o(){t.prop("disabled",""===n.map((function(){return e(this).val()})).get().join(""))}i.length&&(t=i.find('input[type="submit"]'),n=i.find('input[type="file"]'),o(),n.on("change",o))}(),w||(i.on("scroll.pin-menu",z),n.on("tinymce-editor-init.pin-menu",(function(e,t){t.on("wp-autoresize",I)}))),t.wpResponsive={init:function(){var t=this;this.maybeDisableSortables=this.maybeDisableSortables.bind(this),n.on("wp-responsive-activate.wp-responsive",(function(){t.activate()})).on("wp-responsive-deactivate.wp-responsive",(function(){t.deactivate()})),e("#wp-admin-bar-menu-toggle a").attr("aria-expanded","false"),e("#wp-admin-bar-menu-toggle").on("click.wp-responsive",(function(t){t.preventDefault(),_.find(".hover").removeClass("hover"),C.toggleClass("wp-responsive-open"),C.hasClass("wp-responsive-open")?(e(this).find("a").attr("aria-expanded","true"),e("#adminmenu a:first").trigger("focus")):e(this).find("a").attr("aria-expanded","false")})),e("#wp-admin-bar-menu-toggle, #adminmenumain").on("focusout",(function(){var t,n;C.hasClass("wp-responsive-open")&&document.hasFocus()&&setTimeout((function(){t=e.contains(e("#wp-admin-bar-menu-toggle")[0],e(":focus")[0]),n=e.contains(e("#adminmenumain")[0],e(":focus")[0]),t||n||e("#wp-admin-bar-menu-toggle").trigger("click.wp-responsive")}),10)})),y.on("click.wp-responsive","li.wp-has-submenu > a",(function(t){y.data("wp-responsive")&&(e(this).parent("li").toggleClass("selected"),e(this).trigger("focus"),t.preventDefault())})),t.trigger(),n.on("wp-window-resized.wp-responsive",this.trigger.bind(this)),i.on("load.wp-responsive",this.maybeDisableSortables),n.on("postbox-toggled",this.maybeDisableSortables),e("#screen-options-wrap input").on("click",this.maybeDisableSortables)},maybeDisableSortables:function(){(navigator.userAgent.indexOf("AppleWebKit/")>-1?i.width():t.innerWidth)<=782||1>=P.find(".ui-sortable-handle:visible").length&&jQuery(".columns-prefs-1 input").prop("checked")?this.disableSortables():this.enableSortables()},activate:function(){$(),o.hasClass("auto-fold")||o.addClass("auto-fold"),y.data("wp-responsive",1),this.disableSortables()},deactivate:function(){$(),y.removeData("wp-responsive"),this.maybeDisableSortables()},trigger:function(){var e=V();e&&(e<=782?E||(n.trigger("wp-responsive-activate"),E=!0):E&&(n.trigger("wp-responsive-deactivate"),E=!1),e<=480?this.enableOverlay():this.disableOverlay(),this.maybeDisableSortables())},enableOverlay:function(){0===x.length&&(x=e('
').insertAfter("#wpcontent").hide().on("click.wp-responsive",(function(){S.find(".menupop.hover").removeClass("hover"),e(this).hide()}))),T.on("click.wp-responsive",(function(){x.show()}))},disableOverlay:function(){T.off("click.wp-responsive"),x.hide()},disableSortables:function(){if(P.length)try{P.sortable("disable"),P.find(".ui-sortable-handle").addClass("is-non-sortable")}catch(e){}},enableSortables:function(){if(P.length)try{P.sortable("enable"),P.find(".ui-sortable-handle").removeClass("is-non-sortable")}catch(e){}}},e(document).on("ajaxComplete",(function(){Q()})),n.on("wp-window-resized.set-menu-state",H),n.on("wp-menu-state-set wp-collapse-menu",(function(t,n){var i,o,s=e("#collapse-button");"folded"===n.state?(i="false",o=a("Expand Main menu")):(i="true",o=a("Collapse Main menu")),s.attr({"aria-expanded":i,"aria-label":o})})),t.wpResponsive.init(),$(),H(),F(),K(),Q(),n.on("wp-pin-menu wp-window-resized.pin-menu postboxes-columnchange.pin-menu postbox-toggled.pin-menu wp-collapse-menu.pin-menu wp-scroll-start.pin-menu",$),e(".wp-initial-focus").trigger("focus"),o.on("click",".js-update-details-toggle",(function(){var t=e(this).closest(".js-update-details"),n=e("#"+t.data("update-details"));n.hasClass("update-details-moved")||n.insertAfter(t).addClass("update-details-moved"),n.toggle(),e(this).attr("aria-expanded",n.is(":visible"))}))})),e((function(e){var n,i;o.hasClass("update-php")&&(n=e("a.update-from-upload-overwrite"),i=e(".update-from-upload-expired"),n.length&&i.length&&t.setTimeout((function(){n.hide(),i.removeClass("hidden"),t.wp&&t.wp.a11y&&t.wp.a11y.speak(i.text())}),714e4))})),function(){var e;function o(){n.trigger("wp-window-resized")}i.on("resize.wp-fire-once",(function(){t.clearTimeout(e),e=t.setTimeout(o,200)}))}(),function(){if("-ms-user-select"in document.documentElement.style&&navigator.userAgent.match(/IEMobile\/10\.0/)){var e=document.createElement("style");e.appendChild(document.createTextNode("@-ms-viewport{width:auto!important}")),document.getElementsByTagName("head")[0].appendChild(e)}}()}(jQuery,window),document.querySelectorAll("details").forEach((function(e){e.addEventListener("toggle",(function(){var t,n;if(e.hasAttribute("open"))e.querySelectorAll("[inert]").forEach((function(e){e.removeAttribute("inert")}));else for(t=1,n=e.children.length;t (options, next) => { /* harmony default export */ var root_url = (createRootURLMiddleware); ;// ./node_modules/@wordpress/url/build-module/normalize-path.js +/* wp:polyfill */ /** * Given a path, returns a normalized path where equal query parameter values * will be treated as identical, regardless of order they appear in the original @@ -2333,6 +2337,7 @@ function getQueryString(url) { } ;// ./node_modules/@wordpress/url/build-module/get-query-args.js +/* wp:polyfill */ /** * Internal dependencies */ @@ -2421,6 +2426,7 @@ function getQueryArgs(url) { } ;// ./node_modules/@wordpress/url/build-module/build-query-string.js +/* wp:polyfill */ /** * Generates URL-encoded query string using input query data. * @@ -2520,6 +2526,7 @@ function addQueryArgs(url = '', args) { } ;// ./node_modules/@wordpress/api-fetch/build-module/middlewares/preloading.js +/* wp:polyfill */ /** * WordPress dependencies */ @@ -2711,7 +2718,6 @@ const fetchAllMiddleware = async (options, next) => { /* harmony default export */ var fetch_all_middleware = (fetchAllMiddleware); ;// ./node_modules/@wordpress/api-fetch/build-module/middlewares/http-v1.js -/* wp:polyfill */ /** * Set of HTTP methods which are eligible to be overridden. * @@ -2993,6 +2999,7 @@ const mediaUploadMiddleware = (options, next) => { /* harmony default export */ var media_upload = (mediaUploadMiddleware); ;// ./node_modules/@wordpress/url/build-module/remove-query-args.js +/* wp:polyfill */ /** * Internal dependencies */ diff --git a/wp-includes/js/dist/hooks.js b/wp-includes/js/dist/hooks.js index aa169a2..ef60a77 100644 --- a/wp-includes/js/dist/hooks.js +++ b/wp-includes/js/dist/hooks.js @@ -118,6 +118,7 @@ function validateHookName(hookName) { /* harmony default export */ var build_module_validateHookName = (validateHookName); ;// ./node_modules/@wordpress/hooks/build-module/createAddHook.js +/* wp:polyfill */ /** * Internal dependencies */ @@ -212,6 +213,7 @@ function createAddHook(hooks, storeKey) { /* harmony default export */ var build_module_createAddHook = (createAddHook); ;// ./node_modules/@wordpress/hooks/build-module/createRemoveHook.js +/* wp:polyfill */ /** * Internal dependencies */ @@ -292,6 +294,7 @@ function createRemoveHook(hooks, storeKey, removeAll = false) { /* harmony default export */ var build_module_createRemoveHook = (createRemoveHook); ;// ./node_modules/@wordpress/hooks/build-module/createHasHook.js +/* wp:polyfill */ /** * @callback HasHook * @@ -421,6 +424,7 @@ function createCurrentHook(hooks, storeKey) { /* harmony default export */ var build_module_createCurrentHook = (createCurrentHook); ;// ./node_modules/@wordpress/hooks/build-module/createDoingHook.js +/* wp:polyfill */ /** * @callback DoingHook * Returns whether a hook is currently being executed. @@ -493,7 +497,6 @@ function createDidHook(hooks, storeKey) { /* harmony default export */ var build_module_createDidHook = (createDidHook); ;// ./node_modules/@wordpress/hooks/build-module/createHooks.js -/* wp:polyfill */ /** * Internal dependencies */ diff --git a/wp-includes/js/dist/i18n.js b/wp-includes/js/dist/i18n.js index a7268f7..4ff4785 100644 --- a/wp-includes/js/dist/i18n.js +++ b/wp-includes/js/dist/i18n.js @@ -68,6 +68,7 @@ function validateHookName(hookName) { /* harmony default export */ var build_module_validateHookName = (validateHookName); ;// ./node_modules/@wordpress/hooks/build-module/createAddHook.js +/* wp:polyfill */ /** * Internal dependencies */ @@ -162,6 +163,7 @@ function createAddHook(hooks, storeKey) { /* harmony default export */ var build_module_createAddHook = (createAddHook); ;// ./node_modules/@wordpress/hooks/build-module/createRemoveHook.js +/* wp:polyfill */ /** * Internal dependencies */ @@ -242,6 +244,7 @@ function createRemoveHook(hooks, storeKey, removeAll = false) { /* harmony default export */ var build_module_createRemoveHook = (createRemoveHook); ;// ./node_modules/@wordpress/hooks/build-module/createHasHook.js +/* wp:polyfill */ /** * @callback HasHook * @@ -371,6 +374,7 @@ function createCurrentHook(hooks, storeKey) { /* harmony default export */ var build_module_createCurrentHook = (createCurrentHook); ;// ./node_modules/@wordpress/hooks/build-module/createDoingHook.js +/* wp:polyfill */ /** * @callback DoingHook * Returns whether a hook is currently being executed. @@ -443,7 +447,6 @@ function createDidHook(hooks, storeKey) { /* harmony default export */ var build_module_createDidHook = (createDidHook); ;// ./node_modules/@wordpress/hooks/build-module/createHooks.js -/* wp:polyfill */ /** * Internal dependencies */ diff --git a/wp-includes/js/dist/url.js b/wp-includes/js/dist/url.js index fc0d15c..1e1d881 100644 --- a/wp-includes/js/dist/url.js +++ b/wp-includes/js/dist/url.js @@ -815,6 +815,7 @@ function getQueryString(url) { } ;// ./node_modules/@wordpress/url/build-module/build-query-string.js +/* wp:polyfill */ /** * Generates URL-encoded query string using input query data. * @@ -984,6 +985,7 @@ function safeDecodeURIComponent(uriComponent) { } ;// ./node_modules/@wordpress/url/build-module/get-query-args.js +/* wp:polyfill */ /** * Internal dependencies */ @@ -1168,6 +1170,7 @@ function hasQueryArg(url, arg) { } ;// ./node_modules/@wordpress/url/build-module/remove-query-args.js +/* wp:polyfill */ /** * Internal dependencies */ @@ -1371,6 +1374,7 @@ function getFilename(url) { } ;// ./node_modules/@wordpress/url/build-module/normalize-path.js +/* wp:polyfill */ /** * Given a path, returns a normalized path where equal query parameter values * will be treated as identical, regardless of order they appear in the original diff --git a/wp-includes/script-loader.php b/wp-includes/script-loader.php index ea05508..b776d4b 100644 --- a/wp-includes/script-loader.php +++ b/wp-includes/script-loader.php @@ -53,7 +53,7 @@ function classicpress_asset_version( $type = 'script', $handle = null ) { static $default_version; if ( empty( $default_version ) ) { - $default_version = 'cp_b65fdc6f'; + $default_version = 'cp_9fc9207f'; } /** diff --git a/wp-includes/version.php b/wp-includes/version.php index 1c987e2..5d3b785 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -27,7 +27,7 @@ * * @global string $cp_version */ -$cp_version = '2.3.0'; +$cp_version = '2.3.1'; /** * The WordPress version string.