Checks to see if an action is currently being executed.
<?php doing_action($action); ?>
To check whether the 'save_post' action is being executed you could write something similar to this:
if(doing_action('save_post')){
//Do Something Here
}
To check if any action is being executed you could write something like this:
if(doing_action()){
//Do Something Here
}
doing_action() is located in wp-includes/plugin.php
Actions: add_action(), do_action(), has_action(), did_action(), remove_action()
Category:Functions