author | ymh <ymh.work@gmail.com> |
Mon, 08 Sep 2025 19:44:41 +0200 | |
changeset 23 | 417f20492bf7 |
parent 22 | 8c2e4d02f4ef |
permissions | -rw-r--r-- |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
1 |
/******/ (() => { // webpackBootstrap |
19 | 2 |
/******/ "use strict"; |
3 |
/******/ // The require scope |
|
4 |
/******/ var __webpack_require__ = {}; |
|
5 |
/******/ |
|
6 |
/************************************************************************/ |
|
7 |
/******/ /* webpack/runtime/define property getters */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
8 |
/******/ (() => { |
19 | 9 |
/******/ // define getter functions for harmony exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
10 |
/******/ __webpack_require__.d = (exports, definition) => { |
19 | 11 |
/******/ for(var key in definition) { |
12 |
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) { |
|
13 |
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] }); |
|
14 |
/******/ } |
|
15 |
/******/ } |
|
9 | 16 |
/******/ }; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
17 |
/******/ })(); |
19 | 18 |
/******/ |
19 |
/******/ /* webpack/runtime/hasOwnProperty shorthand */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
20 |
/******/ (() => { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
21 |
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop)) |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
22 |
/******/ })(); |
19 | 23 |
/******/ |
24 |
/******/ /* webpack/runtime/make namespace object */ |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
25 |
/******/ (() => { |
19 | 26 |
/******/ // define __esModule on exports |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
27 |
/******/ __webpack_require__.r = (exports) => { |
19 | 28 |
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) { |
29 |
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' }); |
|
30 |
/******/ } |
|
31 |
/******/ Object.defineProperty(exports, '__esModule', { value: true }); |
|
32 |
/******/ }; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
33 |
/******/ })(); |
19 | 34 |
/******/ |
9 | 35 |
/************************************************************************/ |
19 | 36 |
var __webpack_exports__ = {}; |
16 | 37 |
// ESM COMPAT FLAG |
9 | 38 |
__webpack_require__.r(__webpack_exports__); |
39 |
||
16 | 40 |
// EXPORTS |
19 | 41 |
__webpack_require__.d(__webpack_exports__, { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
42 |
actions: () => (/* binding */ actions), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
43 |
addAction: () => (/* binding */ addAction), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
44 |
addFilter: () => (/* binding */ addFilter), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
45 |
applyFilters: () => (/* binding */ applyFilters), |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
46 |
applyFiltersAsync: () => (/* binding */ applyFiltersAsync), |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
47 |
createHooks: () => (/* reexport */ build_module_createHooks), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
48 |
currentAction: () => (/* binding */ currentAction), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
49 |
currentFilter: () => (/* binding */ currentFilter), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
50 |
defaultHooks: () => (/* binding */ defaultHooks), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
51 |
didAction: () => (/* binding */ didAction), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
52 |
didFilter: () => (/* binding */ didFilter), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
53 |
doAction: () => (/* binding */ doAction), |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
54 |
doActionAsync: () => (/* binding */ doActionAsync), |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
55 |
doingAction: () => (/* binding */ doingAction), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
56 |
doingFilter: () => (/* binding */ doingFilter), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
57 |
filters: () => (/* binding */ filters), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
58 |
hasAction: () => (/* binding */ hasAction), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
59 |
hasFilter: () => (/* binding */ hasFilter), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
60 |
removeAction: () => (/* binding */ removeAction), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
61 |
removeAllActions: () => (/* binding */ removeAllActions), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
62 |
removeAllFilters: () => (/* binding */ removeAllFilters), |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
63 |
removeFilter: () => (/* binding */ removeFilter) |
19 | 64 |
}); |
16 | 65 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
66 |
;// ./node_modules/@wordpress/hooks/build-module/validateNamespace.js |
9 | 67 |
/** |
68 |
* Validate a namespace string. |
|
69 |
* |
|
19 | 70 |
* @param {string} namespace The namespace to validate - should take the form |
71 |
* `vendor/plugin/function`. |
|
9 | 72 |
* |
19 | 73 |
* @return {boolean} Whether the namespace is valid. |
9 | 74 |
*/ |
75 |
function validateNamespace(namespace) { |
|
76 |
if ('string' !== typeof namespace || '' === namespace) { |
|
77 |
// eslint-disable-next-line no-console |
|
78 |
console.error('The namespace must be a non-empty string.'); |
|
79 |
return false; |
|
80 |
} |
|
81 |
if (!/^[a-zA-Z][a-zA-Z0-9_.\-\/]*$/.test(namespace)) { |
|
82 |
// eslint-disable-next-line no-console |
|
83 |
console.error('The namespace can only contain numbers, letters, dashes, periods, underscores and slashes.'); |
|
84 |
return false; |
|
85 |
} |
|
86 |
return true; |
|
87 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
88 |
/* harmony default export */ const build_module_validateNamespace = (validateNamespace); |
9 | 89 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
90 |
;// ./node_modules/@wordpress/hooks/build-module/validateHookName.js |
9 | 91 |
/** |
92 |
* Validate a hookName string. |
|
93 |
* |
|
19 | 94 |
* @param {string} hookName The hook name to validate. Should be a non empty string containing |
95 |
* only numbers, letters, dashes, periods and underscores. Also, |
|
96 |
* the hook name cannot begin with `__`. |
|
9 | 97 |
* |
19 | 98 |
* @return {boolean} Whether the hook name is valid. |
9 | 99 |
*/ |
100 |
function validateHookName(hookName) { |
|
101 |
if ('string' !== typeof hookName || '' === hookName) { |
|
102 |
// eslint-disable-next-line no-console |
|
103 |
console.error('The hook name must be a non-empty string.'); |
|
104 |
return false; |
|
105 |
} |
|
106 |
if (/^__/.test(hookName)) { |
|
107 |
// eslint-disable-next-line no-console |
|
108 |
console.error('The hook name cannot begin with `__`.'); |
|
109 |
return false; |
|
110 |
} |
|
111 |
if (!/^[a-zA-Z][a-zA-Z0-9_.-]*$/.test(hookName)) { |
|
112 |
// eslint-disable-next-line no-console |
|
113 |
console.error('The hook name can only contain numbers, letters, dashes, periods and underscores.'); |
|
114 |
return false; |
|
115 |
} |
|
116 |
return true; |
|
117 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
118 |
/* harmony default export */ const build_module_validateHookName = (validateHookName); |
9 | 119 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
120 |
;// ./node_modules/@wordpress/hooks/build-module/createAddHook.js |
9 | 121 |
/** |
122 |
* Internal dependencies |
|
123 |
*/ |
|
124 |
||
125 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
126 |
|
18 | 127 |
/** |
128 |
* @callback AddHook |
|
129 |
* |
|
130 |
* Adds the hook to the appropriate hooks container. |
|
131 |
* |
|
19 | 132 |
* @param {string} hookName Name of hook to add |
133 |
* @param {string} namespace The unique namespace identifying the callback in the form `vendor/plugin/function`. |
|
134 |
* @param {import('.').Callback} callback Function to call when the hook is run |
|
135 |
* @param {number} [priority=10] Priority of this hook |
|
18 | 136 |
*/ |
9 | 137 |
|
138 |
/** |
|
139 |
* Returns a function which, when invoked, will add a hook. |
|
140 |
* |
|
19 | 141 |
* @param {import('.').Hooks} hooks Hooks instance. |
142 |
* @param {import('.').StoreKey} storeKey |
|
9 | 143 |
* |
18 | 144 |
* @return {AddHook} Function that adds a new hook. |
9 | 145 |
*/ |
18 | 146 |
function createAddHook(hooks, storeKey) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
147 |
return function addHook(hookName, namespace, callback, priority = 10) { |
18 | 148 |
const hooksStore = hooks[storeKey]; |
9 | 149 |
if (!build_module_validateHookName(hookName)) { |
150 |
return; |
|
151 |
} |
|
152 |
if (!build_module_validateNamespace(namespace)) { |
|
153 |
return; |
|
154 |
} |
|
155 |
if ('function' !== typeof callback) { |
|
156 |
// eslint-disable-next-line no-console |
|
157 |
console.error('The hook callback must be a function.'); |
|
158 |
return; |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
159 |
} |
9 | 160 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
161 |
// Validate numeric priority |
9 | 162 |
if ('number' !== typeof priority) { |
163 |
// eslint-disable-next-line no-console |
|
164 |
console.error('If specified, the hook priority must be a number.'); |
|
165 |
return; |
|
166 |
} |
|
18 | 167 |
const handler = { |
168 |
callback, |
|
169 |
priority, |
|
170 |
namespace |
|
9 | 171 |
}; |
18 | 172 |
if (hooksStore[hookName]) { |
9 | 173 |
// Find the correct insert index of the new hook. |
18 | 174 |
const handlers = hooksStore[hookName].handlers; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
175 |
|
18 | 176 |
/** @type {number} */ |
177 |
let i; |
|
9 | 178 |
for (i = handlers.length; i > 0; i--) { |
179 |
if (priority >= handlers[i - 1].priority) { |
|
180 |
break; |
|
181 |
} |
|
182 |
} |
|
183 |
if (i === handlers.length) { |
|
184 |
// If append, operate via direct assignment. |
|
185 |
handlers[i] = handler; |
|
186 |
} else { |
|
187 |
// Otherwise, insert before index via splice. |
|
188 |
handlers.splice(i, 0, handler); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
189 |
} |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
190 |
|
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
191 |
// We may also be currently executing this hook. If the callback |
9 | 192 |
// we're adding would come after the current callback, there's no |
193 |
// problem; otherwise we need to increase the execution index of |
|
194 |
// any other runs by 1 to account for the added element. |
|
18 | 195 |
hooksStore.__current.forEach(hookInfo => { |
9 | 196 |
if (hookInfo.name === hookName && hookInfo.currentIndex >= i) { |
197 |
hookInfo.currentIndex++; |
|
198 |
} |
|
199 |
}); |
|
200 |
} else { |
|
201 |
// This is the first hook of its type. |
|
18 | 202 |
hooksStore[hookName] = { |
9 | 203 |
handlers: [handler], |
204 |
runs: 0 |
|
205 |
}; |
|
206 |
} |
|
207 |
if (hookName !== 'hookAdded') { |
|
18 | 208 |
hooks.doAction('hookAdded', hookName, namespace, callback, priority); |
9 | 209 |
} |
210 |
}; |
|
211 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
212 |
/* harmony default export */ const build_module_createAddHook = (createAddHook); |
9 | 213 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
214 |
;// ./node_modules/@wordpress/hooks/build-module/createRemoveHook.js |
9 | 215 |
/** |
216 |
* Internal dependencies |
|
217 |
*/ |
|
218 |
||
219 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
220 |
|
18 | 221 |
/** |
222 |
* @callback RemoveHook |
|
223 |
* Removes the specified callback (or all callbacks) from the hook with a given hookName |
|
224 |
* and namespace. |
|
225 |
* |
|
226 |
* @param {string} hookName The name of the hook to modify. |
|
227 |
* @param {string} namespace The unique namespace identifying the callback in the |
|
228 |
* form `vendor/plugin/function`. |
|
229 |
* |
|
230 |
* @return {number | undefined} The number of callbacks removed. |
|
231 |
*/ |
|
9 | 232 |
|
233 |
/** |
|
234 |
* Returns a function which, when invoked, will remove a specified hook or all |
|
235 |
* hooks by the given name. |
|
236 |
* |
|
19 | 237 |
* @param {import('.').Hooks} hooks Hooks instance. |
238 |
* @param {import('.').StoreKey} storeKey |
|
239 |
* @param {boolean} [removeAll=false] Whether to remove all callbacks for a hookName, |
|
240 |
* without regard to namespace. Used to create |
|
241 |
* `removeAll*` functions. |
|
9 | 242 |
* |
18 | 243 |
* @return {RemoveHook} Function that removes hooks. |
9 | 244 |
*/ |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
245 |
function createRemoveHook(hooks, storeKey, removeAll = false) { |
9 | 246 |
return function removeHook(hookName, namespace) { |
18 | 247 |
const hooksStore = hooks[storeKey]; |
9 | 248 |
if (!build_module_validateHookName(hookName)) { |
249 |
return; |
|
250 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
251 |
if (!removeAll && !build_module_validateNamespace(namespace)) { |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
252 |
return; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
253 |
} |
9 | 254 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
255 |
// Bail if no hooks exist by this name. |
18 | 256 |
if (!hooksStore[hookName]) { |
9 | 257 |
return 0; |
258 |
} |
|
18 | 259 |
let handlersRemoved = 0; |
9 | 260 |
if (removeAll) { |
18 | 261 |
handlersRemoved = hooksStore[hookName].handlers.length; |
262 |
hooksStore[hookName] = { |
|
263 |
runs: hooksStore[hookName].runs, |
|
9 | 264 |
handlers: [] |
265 |
}; |
|
266 |
} else { |
|
267 |
// Try to find the specified callback to remove. |
|
18 | 268 |
const handlers = hooksStore[hookName].handlers; |
269 |
for (let i = handlers.length - 1; i >= 0; i--) { |
|
9 | 270 |
if (handlers[i].namespace === namespace) { |
271 |
handlers.splice(i, 1); |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
272 |
handlersRemoved++; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
273 |
// This callback may also be part of a hook that is |
9 | 274 |
// currently executing. If the callback we're removing |
275 |
// comes after the current callback, there's no problem; |
|
276 |
// otherwise we need to decrease the execution index of any |
|
277 |
// other runs by 1 to account for the removed element. |
|
18 | 278 |
hooksStore.__current.forEach(hookInfo => { |
9 | 279 |
if (hookInfo.name === hookName && hookInfo.currentIndex >= i) { |
280 |
hookInfo.currentIndex--; |
|
281 |
} |
|
282 |
}); |
|
283 |
} |
|
284 |
} |
|
285 |
} |
|
286 |
if (hookName !== 'hookRemoved') { |
|
18 | 287 |
hooks.doAction('hookRemoved', hookName, namespace); |
9 | 288 |
} |
289 |
return handlersRemoved; |
|
290 |
}; |
|
291 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
292 |
/* harmony default export */ const build_module_createRemoveHook = (createRemoveHook); |
9 | 293 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
294 |
;// ./node_modules/@wordpress/hooks/build-module/createHasHook.js |
9 | 295 |
/** |
18 | 296 |
* @callback HasHook |
297 |
* |
|
298 |
* Returns whether any handlers are attached for the given hookName and optional namespace. |
|
299 |
* |
|
300 |
* @param {string} hookName The name of the hook to check for. |
|
301 |
* @param {string} [namespace] Optional. The unique namespace identifying the callback |
|
302 |
* in the form `vendor/plugin/function`. |
|
303 |
* |
|
304 |
* @return {boolean} Whether there are handlers that are attached to the given hook. |
|
305 |
*/ |
|
306 |
/** |
|
9 | 307 |
* Returns a function which, when invoked, will return whether any handlers are |
308 |
* attached to a particular hook. |
|
309 |
* |
|
19 | 310 |
* @param {import('.').Hooks} hooks Hooks instance. |
311 |
* @param {import('.').StoreKey} storeKey |
|
9 | 312 |
* |
18 | 313 |
* @return {HasHook} Function that returns whether any handlers are |
314 |
* attached to a particular hook and optional namespace. |
|
9 | 315 |
*/ |
18 | 316 |
function createHasHook(hooks, storeKey) { |
16 | 317 |
return function hasHook(hookName, namespace) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
318 |
const hooksStore = hooks[storeKey]; |
18 | 319 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
320 |
// Use the namespace if provided. |
16 | 321 |
if ('undefined' !== typeof namespace) { |
18 | 322 |
return hookName in hooksStore && hooksStore[hookName].handlers.some(hook => hook.namespace === namespace); |
16 | 323 |
} |
18 | 324 |
return hookName in hooksStore; |
9 | 325 |
}; |
326 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
327 |
/* harmony default export */ const build_module_createHasHook = (createHasHook); |
9 | 328 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
329 |
;// ./node_modules/@wordpress/hooks/build-module/createRunHook.js |
9 | 330 |
/** |
331 |
* Returns a function which, when invoked, will execute all callbacks |
|
332 |
* registered to a hook of the specified type, optionally returning the final |
|
333 |
* value of the call chain. |
|
334 |
* |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
335 |
* @param {import('.').Hooks} hooks Hooks instance. |
19 | 336 |
* @param {import('.').StoreKey} storeKey |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
337 |
* @param {boolean} returnFirstArg Whether each hook callback is expected to return its first argument. |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
338 |
* @param {boolean} async Whether the hook callback should be run asynchronously |
9 | 339 |
* |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
340 |
* @return {(hookName:string, ...args: unknown[]) => undefined|unknown} Function that runs hook callbacks. |
9 | 341 |
*/ |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
342 |
function createRunHook(hooks, storeKey, returnFirstArg, async) { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
343 |
return function runHook(hookName, ...args) { |
18 | 344 |
const hooksStore = hooks[storeKey]; |
345 |
if (!hooksStore[hookName]) { |
|
346 |
hooksStore[hookName] = { |
|
9 | 347 |
handlers: [], |
348 |
runs: 0 |
|
349 |
}; |
|
350 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
351 |
hooksStore[hookName].runs++; |
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
352 |
const handlers = hooksStore[hookName].handlers; |
9 | 353 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
354 |
// The following code is stripped from production builds. |
16 | 355 |
if (false) {} |
9 | 356 |
if (!handlers || !handlers.length) { |
357 |
return returnFirstArg ? args[0] : undefined; |
|
358 |
} |
|
18 | 359 |
const hookInfo = { |
9 | 360 |
name: hookName, |
361 |
currentIndex: 0 |
|
362 |
}; |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
363 |
async function asyncRunner() { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
364 |
try { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
365 |
hooksStore.__current.add(hookInfo); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
366 |
let result = returnFirstArg ? args[0] : undefined; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
367 |
while (hookInfo.currentIndex < handlers.length) { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
368 |
const handler = handlers[hookInfo.currentIndex]; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
369 |
result = await handler.callback.apply(null, args); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
370 |
if (returnFirstArg) { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
371 |
args[0] = result; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
372 |
} |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
373 |
hookInfo.currentIndex++; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
374 |
} |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
375 |
return returnFirstArg ? result : undefined; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
376 |
} finally { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
377 |
hooksStore.__current.delete(hookInfo); |
9 | 378 |
} |
379 |
} |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
380 |
function syncRunner() { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
381 |
try { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
382 |
hooksStore.__current.add(hookInfo); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
383 |
let result = returnFirstArg ? args[0] : undefined; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
384 |
while (hookInfo.currentIndex < handlers.length) { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
385 |
const handler = handlers[hookInfo.currentIndex]; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
386 |
result = handler.callback.apply(null, args); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
387 |
if (returnFirstArg) { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
388 |
args[0] = result; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
389 |
} |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
390 |
hookInfo.currentIndex++; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
391 |
} |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
392 |
return returnFirstArg ? result : undefined; |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
393 |
} finally { |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
394 |
hooksStore.__current.delete(hookInfo); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
395 |
} |
9 | 396 |
} |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
397 |
return (async ? asyncRunner : syncRunner)(); |
9 | 398 |
}; |
399 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
400 |
/* harmony default export */ const build_module_createRunHook = (createRunHook); |
9 | 401 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
402 |
;// ./node_modules/@wordpress/hooks/build-module/createCurrentHook.js |
9 | 403 |
/** |
404 |
* Returns a function which, when invoked, will return the name of the |
|
405 |
* currently running hook, or `null` if no hook of the given type is currently |
|
406 |
* running. |
|
407 |
* |
|
19 | 408 |
* @param {import('.').Hooks} hooks Hooks instance. |
409 |
* @param {import('.').StoreKey} storeKey |
|
9 | 410 |
* |
18 | 411 |
* @return {() => string | null} Function that returns the current hook name or null. |
9 | 412 |
*/ |
18 | 413 |
function createCurrentHook(hooks, storeKey) { |
9 | 414 |
return function currentHook() { |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
415 |
var _currentArray$at$name; |
18 | 416 |
const hooksStore = hooks[storeKey]; |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
417 |
const currentArray = Array.from(hooksStore.__current); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
418 |
return (_currentArray$at$name = currentArray.at(-1)?.name) !== null && _currentArray$at$name !== void 0 ? _currentArray$at$name : null; |
9 | 419 |
}; |
420 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
421 |
/* harmony default export */ const build_module_createCurrentHook = (createCurrentHook); |
9 | 422 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
423 |
;// ./node_modules/@wordpress/hooks/build-module/createDoingHook.js |
9 | 424 |
/** |
18 | 425 |
* @callback DoingHook |
426 |
* Returns whether a hook is currently being executed. |
|
427 |
* |
|
19 | 428 |
* @param {string} [hookName] The name of the hook to check for. If |
429 |
* omitted, will check for any hook being executed. |
|
18 | 430 |
* |
431 |
* @return {boolean} Whether the hook is being executed. |
|
432 |
*/ |
|
433 |
||
434 |
/** |
|
9 | 435 |
* Returns a function which, when invoked, will return whether a hook is |
436 |
* currently being executed. |
|
437 |
* |
|
19 | 438 |
* @param {import('.').Hooks} hooks Hooks instance. |
439 |
* @param {import('.').StoreKey} storeKey |
|
9 | 440 |
* |
18 | 441 |
* @return {DoingHook} Function that returns whether a hook is currently |
442 |
* being executed. |
|
9 | 443 |
*/ |
18 | 444 |
function createDoingHook(hooks, storeKey) { |
9 | 445 |
return function doingHook(hookName) { |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
446 |
const hooksStore = hooks[storeKey]; |
18 | 447 |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
448 |
// If the hookName was not passed, check for any current hook. |
9 | 449 |
if ('undefined' === typeof hookName) { |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
450 |
return hooksStore.__current.size > 0; |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
451 |
} |
9 | 452 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
453 |
// Find if the `hookName` hook is in `__current`. |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
454 |
return Array.from(hooksStore.__current).some(hook => hook.name === hookName); |
9 | 455 |
}; |
456 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
457 |
/* harmony default export */ const build_module_createDoingHook = (createDoingHook); |
9 | 458 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
459 |
;// ./node_modules/@wordpress/hooks/build-module/createDidHook.js |
9 | 460 |
/** |
461 |
* Internal dependencies |
|
462 |
*/ |
|
463 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
464 |
|
9 | 465 |
/** |
18 | 466 |
* @callback DidHook |
467 |
* |
|
468 |
* Returns the number of times an action has been fired. |
|
469 |
* |
|
19 | 470 |
* @param {string} hookName The hook name to check. |
18 | 471 |
* |
472 |
* @return {number | undefined} The number of times the hook has run. |
|
473 |
*/ |
|
474 |
||
475 |
/** |
|
9 | 476 |
* Returns a function which, when invoked, will return the number of times a |
477 |
* hook has been called. |
|
478 |
* |
|
19 | 479 |
* @param {import('.').Hooks} hooks Hooks instance. |
480 |
* @param {import('.').StoreKey} storeKey |
|
9 | 481 |
* |
18 | 482 |
* @return {DidHook} Function that returns a hook's call count. |
9 | 483 |
*/ |
18 | 484 |
function createDidHook(hooks, storeKey) { |
9 | 485 |
return function didHook(hookName) { |
18 | 486 |
const hooksStore = hooks[storeKey]; |
9 | 487 |
if (!build_module_validateHookName(hookName)) { |
488 |
return; |
|
489 |
} |
|
18 | 490 |
return hooksStore[hookName] && hooksStore[hookName].runs ? hooksStore[hookName].runs : 0; |
9 | 491 |
}; |
492 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
493 |
/* harmony default export */ const build_module_createDidHook = (createDidHook); |
9 | 494 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
495 |
;// ./node_modules/@wordpress/hooks/build-module/createHooks.js |
9 | 496 |
/** |
497 |
* Internal dependencies |
|
498 |
*/ |
|
499 |
||
500 |
||
501 |
||
502 |
||
503 |
||
504 |
||
505 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
506 |
|
9 | 507 |
/** |
18 | 508 |
* Internal class for constructing hooks. Use `createHooks()` function |
509 |
* |
|
510 |
* Note, it is necessary to expose this class to make its type public. |
|
511 |
* |
|
512 |
* @private |
|
513 |
*/ |
|
19 | 514 |
class _Hooks { |
18 | 515 |
constructor() { |
516 |
/** @type {import('.').Store} actions */ |
|
517 |
this.actions = Object.create(null); |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
518 |
this.actions.__current = new Set(); |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
519 |
|
18 | 520 |
/** @type {import('.').Store} filters */ |
521 |
this.filters = Object.create(null); |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
522 |
this.filters.__current = new Set(); |
18 | 523 |
this.addAction = build_module_createAddHook(this, 'actions'); |
524 |
this.addFilter = build_module_createAddHook(this, 'filters'); |
|
525 |
this.removeAction = build_module_createRemoveHook(this, 'actions'); |
|
526 |
this.removeFilter = build_module_createRemoveHook(this, 'filters'); |
|
527 |
this.hasAction = build_module_createHasHook(this, 'actions'); |
|
528 |
this.hasFilter = build_module_createHasHook(this, 'filters'); |
|
529 |
this.removeAllActions = build_module_createRemoveHook(this, 'actions', true); |
|
530 |
this.removeAllFilters = build_module_createRemoveHook(this, 'filters', true); |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
531 |
this.doAction = build_module_createRunHook(this, 'actions', false, false); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
532 |
this.doActionAsync = build_module_createRunHook(this, 'actions', false, true); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
533 |
this.applyFilters = build_module_createRunHook(this, 'filters', true, false); |
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
534 |
this.applyFiltersAsync = build_module_createRunHook(this, 'filters', true, true); |
18 | 535 |
this.currentAction = build_module_createCurrentHook(this, 'actions'); |
536 |
this.currentFilter = build_module_createCurrentHook(this, 'filters'); |
|
537 |
this.doingAction = build_module_createDoingHook(this, 'actions'); |
|
538 |
this.doingFilter = build_module_createDoingHook(this, 'filters'); |
|
539 |
this.didAction = build_module_createDidHook(this, 'actions'); |
|
540 |
this.didFilter = build_module_createDidHook(this, 'filters'); |
|
541 |
} |
|
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
542 |
} |
18 | 543 |
|
544 |
/** @typedef {_Hooks} Hooks */ |
|
545 |
||
546 |
/** |
|
9 | 547 |
* Returns an instance of the hooks object. |
548 |
* |
|
18 | 549 |
* @return {Hooks} A Hooks instance. |
9 | 550 |
*/ |
551 |
function createHooks() { |
|
19 | 552 |
return new _Hooks(); |
9 | 553 |
} |
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
554 |
/* harmony default export */ const build_module_createHooks = (createHooks); |
9 | 555 |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
556 |
;// ./node_modules/@wordpress/hooks/build-module/index.js |
9 | 557 |
/** |
558 |
* Internal dependencies |
|
559 |
*/ |
|
560 |
||
21
48c4eec2b7e6
Add CLAUDE.md documentation and sync WordPress core files
ymh <ymh.work@gmail.com>
parents:
19
diff
changeset
|
561 |
|
18 | 562 |
/** @typedef {(...args: any[])=>any} Callback */ |
9 | 563 |
|
18 | 564 |
/** |
565 |
* @typedef Handler |
|
566 |
* @property {Callback} callback The callback |
|
567 |
* @property {string} namespace The namespace |
|
568 |
* @property {number} priority The namespace |
|
569 |
*/ |
|
570 |
||
571 |
/** |
|
572 |
* @typedef Hook |
|
573 |
* @property {Handler[]} handlers Array of handlers |
|
574 |
* @property {number} runs Run counter |
|
575 |
*/ |
|
576 |
||
577 |
/** |
|
578 |
* @typedef Current |
|
579 |
* @property {string} name Hook name |
|
580 |
* @property {number} currentIndex The index |
|
581 |
*/ |
|
582 |
||
583 |
/** |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
584 |
* @typedef {Record<string, Hook> & {__current: Set<Current>}} Store |
18 | 585 |
*/ |
9 | 586 |
|
18 | 587 |
/** |
588 |
* @typedef {'actions' | 'filters'} StoreKey |
|
589 |
*/ |
|
590 |
||
591 |
/** |
|
592 |
* @typedef {import('./createHooks').Hooks} Hooks |
|
593 |
*/ |
|
594 |
||
595 |
const defaultHooks = build_module_createHooks(); |
|
596 |
const { |
|
597 |
addAction, |
|
598 |
addFilter, |
|
599 |
removeAction, |
|
600 |
removeFilter, |
|
601 |
hasAction, |
|
602 |
hasFilter, |
|
603 |
removeAllActions, |
|
604 |
removeAllFilters, |
|
605 |
doAction, |
|
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
606 |
doActionAsync, |
18 | 607 |
applyFilters, |
22
8c2e4d02f4ef
Update WordPress to latest version (6.7)
ymh <ymh.work@gmail.com>
parents:
21
diff
changeset
|
608 |
applyFiltersAsync, |
18 | 609 |
currentAction, |
610 |
currentFilter, |
|
611 |
doingAction, |
|
612 |
doingFilter, |
|
613 |
didAction, |
|
614 |
didFilter, |
|
615 |
actions, |
|
616 |
filters |
|
617 |
} = defaultHooks; |
|
9 | 618 |
|
619 |
||
19 | 620 |
(window.wp = window.wp || {}).hooks = __webpack_exports__; |
621 |
/******/ })() |
|
622 |
; |