The What
Description
This construct fires the specified event, which means it loops through the event registry lookup table and calls each registered callback one-by-one. The callbacks are pre-registered for this event using add_action
.
Note: this construct is identical to do_action
, except that all the arguments to be passed to the callbacks are wrapped into one array of arguments. Otherwise, the code is identical and it works the same.
Parameters
event_name
- The name of the event (filter hook) to fire.
args
- An array of arguments to pass to each registered callback.
Return Values
It does not return anything, which is the main difference between an action and filter event.
Who needs copy/paste? Right. Writing code from scratch is fun!
More coming soon…keep checking back.
PHP Constructs
These are the PHP constructs used in WordPress Core for add_action
: