Build/Test Tools: Backport GitHub Action and build improvements to the 5.4 branch.
This backports several build and test tool improvements to the 5.4 branch. Most notably, this includes:
- The changes required to allow each workflow to be triggered by the `workflow_dispatch` event so that tests can be run on a schedule [50590].
- The ability to run PHPUnit tests from `src` instead of `build` [50441-50443].
- Splitting single site and multisite tests into parallel jobs [50379].
- Split slow tests into separate, parallel jobs for PHP 5.6 [50444].
- Better branch and path scoping for GitHub Action workflows when running on `pull_request` [50432,50479].
- Several `devDependency` updates.
Merges [50267,50299,50379,50387,50413,50416,50432,50435-50436,50441-50444,50446,50473-50474,50476,50479,50485-50487,50545,50579,50590,50598] to the 5.4 branch.
See #50401, #51734, #51801, #51802, #52548, #52608, #52612, #52623, #52624, #52625, #52645, #52653, #52658, #52660, #52667.
Built from https://develop.svn.wordpress.org/branches/5.4@50604
git-svn-id: http://core.svn.wordpress.org/branches/5.4@50217 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2021-03-26 19:21:57 +01:00
|
|
|
!function(c,l,m){"use strict";function u(e){return e=l.sanitize.stripTagsAndEncodeText(e=e||""),(e=m.trim(e))||c.Menus.data.l10n.unnamed}wpNavMenu.originalInit=wpNavMenu.init,wpNavMenu.options.menuItemDepthPerLevel=20,wpNavMenu.options.sortableItems="> .customize-control-nav_menu_item",wpNavMenu.options.targetTolerance=10,wpNavMenu.init=function(){this.jQueryExtensions()},c.Menus=c.Menus||{},c.Menus.data={itemTypes:[],l10n:{},settingTransport:"refresh",phpIntMax:0,defaultSettingValues:{nav_menu:{},nav_menu_item:{}},locationSlugMappedToName:{}},"undefined"!=typeof _wpCustomizeNavMenusSettings&&m.extend(c.Menus.data,_wpCustomizeNavMenusSettings),c.Menus.generatePlaceholderAutoIncrementId=function(){return-Math.ceil(c.Menus.data.phpIntMax*Math.random())},c.Menus.AvailableItemModel=Backbone.Model.extend(m.extend({id:null},c.Menus.data.defaultSettingValues.nav_menu_item)),c.Menus.AvailableItemCollection=Backbone.Collection.extend({model:c.Menus.AvailableItemModel,sort_key:"order",comparator:function(e){return-e.get(this.sort_key)},sortByField:function(e){this.sort_key=e,this.sort()}}),c.Menus.availableMenuItems=new c.Menus.AvailableItemCollection(c.Menus.data.availableMenuItems),c.Menus.insertAutoDraftPost=function(n){var i=m.Deferred(),e=l.ajax.post("customize-nav-menus-insert-auto-draft",{"customize-menus-nonce":c.settings.nonce["customize-menus"],wp_customize:"on",customize_changeset_uuid:c.settings.changeset.uuid,params:n});return e.done(function(t){t.post_id&&(c("nav_menus_created_posts").set(c("nav_menus_created_posts").get().concat([t.post_id])),"page"===n.post_type&&(c.section.has("static_front_page")&&c.section("static_front_page").activate(),c.control.each(function(e){"dropdown-pages"===e.params.type&&e.container.find('select[name^="_customize-dropdown-pages-"]').append(new Option(n.post_title,t.post_id))})),i.resolve(t))}),e.fail(function(e){var t=e||"";void 0!==e.message&&(t=e.message),console.error(t),i.rejectWith(t)}),i.promise()},c.Menus.AvailableMenuItemsPanelView=l.Backbone.View.extend({el:"#available-menu-items",events:{"input #menu-items-search":"debounceSearch","focus .menu-item-tpl":"focus","click .menu-item-tpl":"_submit","click #custom-menu-item-submit":"_submitLink","keypress #custom-menu-item-name":"_submitLink","click .new-content-item .add-content":"_submitNew","keypress .create-item-input":"_submitNew",keydown:"keyboardAccessible"},selected:null,currentMenuControl:null,debounceSearch:null,$search:null,$clearResults:null,searchTerm:"",rendered:!1,pages:{},sectionContent:"",loading:!1,addingNew:!1,initialize:function(){var n=this;c.panel.has("nav_menus")&&(this.$search=m("#menu-items-search"),this.$clearResults=this.$el.find(".clear-results"),this.sectionContent=this.$el.find(".available-menu-items-list"),this.debounceSearch=_.debounce(n.search,500),_.bindAll(this,"close"),m("#customize-controls, .customize-section-back").on("click keydown",function(e){var t=m(e.target).is(".item-delete, .item-delete *"),e=m(e.target).is(".add-new-menu-item, .add-new-menu-item *");!m("body").hasClass("adding-menu-items")||t||e||n.close()}),this.$clearResults.on("click",function(){n.$search.val("").focus().trigger("keyup")}),this.$el.on("input","#custom-menu-item-name.invalid, #custom-menu-item-url.invalid",function(){m(this).removeClass("invalid")}),c.panel("nav_menus").container.bind("expanded",function(){n.rendered||(n.initList(),n.rendered=!0)}),this.sectionContent.scroll(function(){var e=n.$el.find(".accordion-section.open .available-menu-items-list").prop("scrollHeight"),t=n.$el.find(".accordion-section.open").height();!n.loading&&m(this).scrollTop()>.75*e-t&&(e=m(this).data("type"),t=m(this).data("object"),"search"===e?n.searchTerm&&n.doSearch(n.pages.search):n.loadItems([{type:e,object:t}]))}),c.previewer.bind("url",this.close),n.delegateEvents())},search:function(e){var t=m("#available-menu-items-search"),n=m("#available-menu-items .accordion-section").not(t);e&&this.searchTerm!==e.target.value&&(""===e.target.value||t.hasClass("open")?""===e.target.value&&(t.removeClass("open"),n.show(),this.$clearResults.r
|