WordPress at a glance

doing_action() WP 1.0

Retrieve the name of an action currently being processed.

Works based on: doing_filter()
✈ 1 time = 0.000001s = speed of light | 50000 times = 0.02s = speed of light | PHP 7.2.5, WP 4.9.8

No Hooks.

Return

true/false. Whether the action is currently in the stack.

Usage

doing_action( $action );
$action(string/null)
Action to check.
Default: null, which checks if any action is currently being run

Code of doing action: wp-includes/plugin.php WP 5.2.2

<?php
function doing_action( $action = null ) {
	return doing_filter( $action );
}

Related Functions

From tag: Actions (hooks)

More from category: Hooks (actions, filters)

No comments
    Hello, !     Log In . Register