Title: WP_Hook::do_all_hook
Published: December 6, 2016
Last modified: May 20, 2026

---

# WP_Hook::do_all_hook( array $args )

## In this article

 * [Parameters](https://developer.wordpress.org/reference/classes/wp_hook/do_all_hook/?output_format=md#parameters)
 * [Source](https://developer.wordpress.org/reference/classes/wp_hook/do_all_hook/?output_format=md#source)
 * [Changelog](https://developer.wordpress.org/reference/classes/wp_hook/do_all_hook/?output_format=md#changelog)

[ Back to top](https://developer.wordpress.org/reference/classes/wp_hook/do_all_hook/?output_format=md#wp--skip-link--target)

Processes the functions hooked into the ‘all’ hook.

## 󠀁[Parameters](https://developer.wordpress.org/reference/classes/wp_hook/do_all_hook/?output_format=md#parameters)󠁿

 `$args`arrayrequired

Arguments to pass to the hook callbacks. Passed by reference.

## 󠀁[Source](https://developer.wordpress.org/reference/classes/wp_hook/do_all_hook/?output_format=md#source)󠁿

    ```php
    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;
    }
    ```

[View all references](https://developer.wordpress.org/reference/files/wp-includes/class-wp-hook.php/)
[View on Trac](https://core.trac.wordpress.org/browser/tags/7.0/src/wp-includes/class-wp-hook.php#L380)
[View on GitHub](https://github.com/WordPress/wordpress-develop/blob/7.0/src/wp-includes/class-wp-hook.php#L380-L394)

## 󠀁[Changelog](https://developer.wordpress.org/reference/classes/wp_hook/do_all_hook/?output_format=md#changelog)󠁿

| Version | Description | 
| [4.7.0](https://developer.wordpress.org/reference/since/4.7.0/) | Introduced. |

## User Contributed Notes

You must [log in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fdeveloper.wordpress.org%2Freference%2Fclasses%2Fwp_hook%2Fdo_all_hook%2F)
before being able to contribute a note or feedback.