GC_Hook::do_all_hook()
最后更新于:2021-11-27 21:17:10
GC_Hook::do_all_hook( array$args)Processes the functions hooked into the ‘all’ hook.
参数
- $args
-
(array) (Required) Arguments to pass to the hook callbacks. Passed by reference.
源文件
文件: gc-includes/class-gc-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--;
}