mirror of
https://github.com/WordPress/WordPress.git
synced 2024-12-27 03:27:46 +01:00
1 line
5.8 KiB
JavaScript
1 line
5.8 KiB
JavaScript
|
this.wp=this.wp||{},this.wp.hooks=function(a){function b(d){if(c[d])return c[d].exports;var e=c[d]={i:d,l:!1,exports:{}};return a[d].call(e.exports,e,e.exports,b),e.l=!0,e.exports}var c={};return b.m=a,b.c=c,b.d=function(a,c,d){b.o(a,c)||Object.defineProperty(a,c,{configurable:!1,enumerable:!0,get:d})},b.n=function(a){var c=a&&a.__esModule?function(){return a["default"]}:function(){return a};return b.d(c,"a",c),c},b.o=function(a,b){return Object.prototype.hasOwnProperty.call(a,b)},b.p="",b(b.s=13)}([function(a,b,c){"use strict";function d(a){return"string"!=typeof a||""===a?(console.error("The hook name must be a non-empty string."),!1):/^__/.test(a)?(console.error("The hook name cannot begin with `__`."),!1):!!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(a)||(console.error("The hook name can only contain numbers, letters, dashes, periods and underscores."),!1)}Object.defineProperty(b,"__esModule",{value:!0}),b["default"]=d},function(a,b,c){"use strict";function d(a){return"string"!=typeof a||""===a?(console.error("The namespace must be a non-empty string."),!1):/^[a-zA-Z][a-zA-Z0-9_.-\/]*$/.test(a)?!!/^[a-zA-Z][a-zA-Z0-9_.-]*\/[a-zA-Z][a-zA-Z0-9_.-]*\/[a-zA-Z][a-zA-Z0-9_.-]*$/.test(a)||(console.error("The namespace must take the form `vendor/plugin/function`."),!1):(console.error("The namespace can only contain numbers, letters, dashes, periods and underscores, plus the forward slash dividing slug and description in the namespace."),!1)}Object.defineProperty(b,"__esModule",{value:!0}),b["default"]=d},,,,,,,,,,,,function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}Object.defineProperty(b,"__esModule",{value:!0}),b.didFilter=b.didAction=b.doingFilter=b.doingAction=b.currentFilter=b.currentAction=b.applyFilters=b.doAction=b.removeAllFilters=b.removeAllActions=b.hasFilter=b.hasAction=b.removeFilter=b.removeAction=b.addFilter=b.addAction=void 0;var e=c(14),f=d(e),g=c(15),h=d(g),i=c(16),j=d(i),k=c(17),l=d(k),m=c(18),n=d(m),o=c(19),p=d(o),q=c(20),r=d(q),s=c(21),t=d(s);b.addAction=(0,h["default"])(f["default"].actions),b.addFilter=(0,h["default"])(f["default"].filters),b.removeAction=(0,j["default"])(f["default"].actions),b.removeFilter=(0,j["default"])(f["default"].filters),b.hasAction=(0,l["default"])(f["default"].actions),b.hasFilter=(0,l["default"])(f["default"].filters),b.removeAllActions=(0,j["default"])(f["default"].actions,!0),b.removeAllFilters=(0,j["default"])(f["default"].filters,!0),b.doAction=(0,n["default"])(f["default"].actions),b.applyFilters=(0,n["default"])(f["default"].filters,!0),b.currentAction=(0,p["default"])(f["default"].actions),b.currentFilter=(0,p["default"])(f["default"].filters),b.doingAction=(0,r["default"])(f["default"].actions),b.doingFilter=(0,r["default"])(f["default"].filters),b.didAction=(0,t["default"])(f["default"].actions),b.didFilter=(0,t["default"])(f["default"].filters)},function(a,b,c){"use strict";Object.defineProperty(b,"__esModule",{value:!0});var d={actions:{},filters:{}};b["default"]=d},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a){return function(b,c,d){var e=arguments.length>3&&void 0!==arguments[3]?arguments[3]:10;if((0,i["default"])(b)&&(0,g["default"])(c)){if("function"!=typeof d)return void console.error("The hook callback must be a function.");if("number"!=typeof e)return void console.error("If specified, the hook priority must be a number.");var f={callback:d,priority:e,namespace:c};if(a.hasOwnProperty(b)){for(var h=a[b].handlers,j=0;j<h.length&&!(h[j].priority>e);)j++;h.splice(j,0,f),(a.__current||[]).forEach(function(a){a.name===b&&a.currentIndex>=j&&a.currentIndex++})}else a[b]={handlers:[f],runs:0}}}}Object.defineProperty(b,"__esModule",{value:!0});var f=c(1),g=d(f),h=c(0),i=d(h);b["default"]=e},function(a,b,c){"use strict";function d(a){return a&&a.__esModule?a:{"default":a}}function e(a,b){return function(c,d){if((0,i["default"])(c)&&(b||(0,g["default"])(d))){if(!a.hasOwnProperty(c))return 0;var e=0;if(b)e=a[c].handlers.length,a[c]={runs:a[c].runs,handlers:[]};else for(var f=a[c].handlers,h=function(
|