WP_Hook::do_action()publicWP 4.7.0

Calls the callback functions that have been added to an action hook.

Method of the class: WP_Hook{}

No Hooks.

Return

null. Nothing (null).

Usage

$WP_Hook = new WP_Hook();
$WP_Hook->do_action( $args );
$args(array) (required)
Parameters to pass to the callback functions.

Changelog

Since 4.7.0 Introduced.

WP_Hook::do_action() code WP 6.5.2

public function do_action( $args ) {
	$this->doing_action = true;
	$this->apply_filters( '', $args );

	// If there are recursive calls to the current action, we haven't finished it until we get to the last one.
	if ( ! $this->nesting_level ) {
		$this->doing_action = false;
	}
}