[ Index ]

PHP Cross Reference of WordPress

title

Body

[close]

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

(no description)

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

Defines 13 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  createAddHook()
  createCurrentHook()
  createDidHook()
  createDoingHook()
  createHasHook()
  createHooks()
  createRemoveHook()
  createRunHook()
  validateHookName()
  validateNamespace()

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

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

return: {Function}       Function that adds a new hook.
param: {Object}   hooks Stored hooks, keyed by hook name.

createCurrentHook(hooks)   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: {Function}                Function that returns the current hook.
param: {Object}   hooks          Stored hooks, keyed by hook name.

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

return: {Function}       Function that returns a hook's call count.
param: {Object}   hooks Stored hooks, keyed by hook name.

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

return: {Function}       Function that returns whether a hook is currently
param: {Object}   hooks Stored hooks, keyed by hook name.

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

return: {Function}       Function that returns whether any handlers are
param: {Object}   hooks Stored hooks, keyed by hook name.

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

return: {Object} Object that contains all hooks.

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

return: {Function}            Function that removes hooks.
param: {Object}   hooks      Stored hooks, keyed by hook name.
param: {boolean}     removeAll  Whether to remove all callbacks for a hookName, without regard to namespace. Used to create `removeAll*` functions.

createRunHook(hooks, returnFirstArg)   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: {Function}                Function that runs hook callbacks.
param: {Object}   hooks          Stored hooks, keyed by hook name.
param: {?boolean}    returnFirstArg Whether each hook callback is expected to

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

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



Generated: Mon Jan 7 01:00:05 2019 Cross-referenced by PHPXref 0.7.1