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_filter.
Note: this construct is identical to apply_filters, 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- Array of arguments which are to be passed to the registered callbacks.
Return Values
Returns the first element in $args after all of the callbacks have processed, meaning the value may be different than what was passed into when the event fired.
Once upon a time, there was a developer... You! This is going to be a good story...
More coming soon…keep checking back.
PHP Constructs
These are the PHP constructs used in WordPress Core for add_action:
