WP_Hook::do_all_hook()
Processes the functions hooked into the 'all' hook.
Method of the class: WP_Hook{}
No Hooks.
Return
null
. Nothing (null).
Usage
$WP_Hook = new WP_Hook(); $WP_Hook->do_all_hook( $args );
- $args(array) (required) (passed by reference — &)
- Arguments to pass to the hook callbacks. Passed by reference.
Changelog
Since 4.7.0 | Introduced. |
WP_Hook::do_all_hook() WP Hook::do all hook code WP 6.5.2
public function do_all_hook( &$args ) { $nesting_level = $this->nesting_level++; $this->iterations[ $nesting_level ] = $this->priorities; 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; }