Executes functions hooked to a particular hook with supplied arguments. This method is identical to the do_action().
<?php $app->hook->do_action_array($hook, $args); ?>
$hook: (string) (required) The name of the action to which $function_to_add is hooked. (See Action Reference for a list of action hooks).
$args: (array) (required) Arguments hooked to $hook.
Call an action and pass an array of arguments
$app = \Liten\Liten::getInstance(); $args = ['arg_1', 'arg_2', 'arg_3']; $app->hook->do_action_array('hook_action', $args);
The above example is the same as:
$app = \Liten\Liten::getInstance(); $app->hook->do_action( 'hook_action', 'arg_1', 'arg_2', 'arg_3' );
Since 1.0.0
$app->hook->do_action_array() is located in app/src/Hooks.php.