[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

/wp-includes/js/dist/ -> hooks.js (summary)

(no description)

File Size: 807 lines (28 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 20 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _arrayWithoutHoles()
  _nonIterableSpread()
  _toConsumableArray()
  _arrayLikeToArray()
  _classCallCheck()
  _unsupportedIterableToArray()
  _iterableToArray()
  validateNamespace()
  validateHookName()
  createAddHook()
  createRemoveHook()
  createHasHook()
  createRunHook()
  createCurrentHook()
  createDoingHook()
  createDidHook()
  createHooks()

Functions
Functions that are not part of a class:

__webpack_require__(moduleId)   X-Ref
No description

getDefault()   X-Ref
No description

getModuleExports()   X-Ref
No description

_arrayWithoutHoles(arr)   X-Ref
No description

_nonIterableSpread()   X-Ref
No description

_toConsumableArray(arr)   X-Ref
No description

_arrayLikeToArray(arr, len)   X-Ref
No description

_classCallCheck(instance, Constructor)   X-Ref
No description

_unsupportedIterableToArray(o, minLen)   X-Ref
No description

_iterableToArray(iter)   X-Ref
No description

validateNamespace(namespace)   X-Ref
Validate a namespace string.

return: {boolean}             Whether the namespace is valid.
param: {string} namespace The namespace to validate - should take the form

validateHookName(hookName)   X-Ref
Validate a hookName string.

return: {boolean}            Whether the hook name is valid.
param: {string} hookName The hook name to validate. Should be a non empty string containing

createAddHook(hooks, storeKey)   X-Ref
Returns a function which, when invoked, will add a hook.

return: {AddHook} Function that adds a new hook.
param: {import('.').Hooks}    hooks Hooks instance.
param: {import('.').StoreKey} storeKey

createRemoveHook(hooks, storeKey)   X-Ref
Returns a function which, when invoked, will remove a specified hook or all
hooks by the given name.

return: {RemoveHook} Function that removes hooks.
param: {import('.').Hooks}    hooks Hooks instance.
param: {import('.').StoreKey} storeKey
param: {boolean}              [removeAll=false] Whether to remove all callbacks for a hookName,

createHasHook(hooks, storeKey)   X-Ref
Returns a function which, when invoked, will return whether any handlers are
attached to a particular hook.

return: {HasHook} Function that returns whether any handlers are
param: {import('.').Hooks}    hooks Hooks instance.
param: {import('.').StoreKey} storeKey

createRunHook(hooks, storeKey)   X-Ref
Returns a function which, when invoked, will execute all callbacks
registered to a hook of the specified type, optionally returning the final
value of the call chain.

return: {(hookName:string, ...args: unknown[]) => unknown} Function that runs hook callbacks.
param: {import('.').Hooks}    hooks Hooks instance.
param: {import('.').StoreKey} storeKey
param: {boolean}              [returnFirstArg=false] Whether each hook callback is expected to

createCurrentHook(hooks, storeKey)   X-Ref
Returns a function which, when invoked, will return the name of the
currently running hook, or `null` if no hook of the given type is currently
running.

return: {() => string | null} Function that returns the current hook name or null.
param: {import('.').Hooks}    hooks Hooks instance.
param: {import('.').StoreKey} storeKey

createDoingHook(hooks, storeKey)   X-Ref
Returns a function which, when invoked, will return whether a hook is
currently being executed.

return: {DoingHook} Function that returns whether a hook is currently
param: {import('.').Hooks}    hooks Hooks instance.
param: {import('.').StoreKey} storeKey

createDidHook(hooks, storeKey)   X-Ref
Returns a function which, when invoked, will return the number of times a
hook has been called.

return: {DidHook} Function that returns a hook's call count.
param: {import('.').Hooks}    hooks Hooks instance.
param: {import('.').StoreKey} storeKey

createHooks()   X-Ref
Returns an instance of the hooks object.

return: {Hooks} A Hooks instance.



Generated: Sat Apr 10 01:00:03 2021 Cross-referenced by PHPXref 0.7.1