[ Index ]

PHP Cross Reference of WordPress Trunk (Updated Daily)

title

Body

[close]

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

(no description)

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

Defines 17 functions

  __webpack_require__()
  getDefault()
  getModuleExports()
  _arrayWithoutHoles()
  _nonIterableSpread()
  _toConsumableArray()
  _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

_iterableToArray(iter)   X-Ref
No description

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

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

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

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

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

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

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

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.
return: {Function}            Function that removes hooks.

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

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

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.

param: {Object}   hooks          Stored hooks, keyed by hook name.
param: {?boolean}    returnFirstArg Whether each hook callback is expected to
return: {Function}                Function that runs hook callbacks.

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.

param: {Object}   hooks          Stored hooks, keyed by hook name.
return: {Function}                Function that returns the current hook.

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

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

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

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

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

return: {Object} Object that contains all hooks.



Generated: Sat Nov 23 20:47:33 2019 Cross-referenced by PHPXref 0.7