The What
Description
This construct returns the name of the event (action hook) that is being processed. It may not be the one that is currently calling its callbacks, as it is possible to have multiple events firing at the same time. If you want the current one, i.e. the one that is calling its callbacks right now, then use current_action
.
Parameters
event_name
- optional The name of the event you want to check.
Return Values
If an event name is passed into the construct, then it returns true
if that event is being processed.
If no event name is provided, then it returns an array of all the events that are being processed.
Keep It Simple, Stupid (KISS) - the best kiss you'll get in code.
More coming soon…keep checking back.
PHP Constructs
These are the PHP constructs used in WordPress Core for current_action
: