WP_Hook::do_all_hook() WordPress Method
The WP_Hook::do_all_hook() Wordpress method is used to call all of the registered functions for a particular hook, or to call all of the functions that have been registered for all hooks.
WP_Hook::do_all_hook( array $args ) #
Processes the functions hooked into the ‘all’ hook.
Contents
Parameters
- $args
(array)(Required)Arguments to pass to the hook callbacks. Passed by reference.
Source
File: wp-includes/class-wp-hook.php
public function do_all_hook( &$args ) { $nesting_level = $this->nesting_level++; $this->iterations[ $nesting_level ] = array_keys( $this->callbacks ); do { $priority = current( $this->iterations[ $nesting_level ] ); foreach ( $this->callbacks[ $priority ] as $the_ ) { call_user_func_array( $the_['function'], $args ); } } while ( false !== next( $this->iterations[ $nesting_level ] ) ); unset( $this->iterations[ $nesting_level ] ); $this->nesting_level--; }
Expand full source codeCollapse full source codeView on TracView on GitHub
Changelog
Version | Description |
---|---|
4.7.0 | Introduced. |