doing_action

The timeline below displays how wordpress function doing_action has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.1

/**
 * Returns whether or not an action hook is currently being processed.
 *
 * The function current_action() only returns the most recent action being executed.
 * did_action() returns the number of times an action has been fired during
 * the current request.
 *
 * This function allows detection for any action currently being executed
 * (regardless of whether it's the most recent action to fire, in the case of
 * hooks called from hook callbacks) to be verified.
 *
 * @since 3.9.0
 *
 * @see current_action()
 * @see did_action()
 *
 * @param string|null $hook_name Optional. Action hook to check. Defaults to null,
 *                               which checks if any action is currently being run.
 * @return bool Whether the action is currently in the stack.
 */
function doing_action($hook_name = null)
{
    return doing_filter($hook_name);
}

WordPress Version: 5.8

/**
 * Returns whether or not an action hook is currently being processed.
 *
 * @since 3.9.0
 *
 * @param string|null $hook_name Optional. Action hook to check. Defaults to null,
 *                               which checks if any action is currently being run.
 * @return bool Whether the action is currently in the stack.
 */
function doing_action($hook_name = null)
{
    return doing_filter($hook_name);
}

WordPress Version: 4.1

/**
 * Retrieve the name of an action currently being processed.
 *
 * @since 3.9.0
 *
 * @param string|null $action Optional. Action to check. Defaults to null, which checks
 *                            if any action is currently being run.
 * @return bool Whether the action is currently in the stack.
 */
function doing_action($action = null)
{
    return doing_filter($action);
}

WordPress Version: 3.9

/**
 * Retrieve the name of an action currently being processed.
 *
 * @since 3.9.0
 *
 * @uses doing_filter()
 *
 * @param string|null $action Optional. Action to check. Defaults to null, which checks
 *                            if any action is currently being run.
 * @return bool Whether the action is currently in the stack.
 */
function doing_action($action = null)
{
    return doing_filter($action);
}