can I do something like that? to pass arguments to my function? I already studied add_action doc but did not figure out how to do it. What the exact syntax to pass two argum
If you want to pass parameters to the callable function, instead of the do_action, you can call an anonymous function. Example:
// Route Web Requests
add_action('shutdown', function() {
Router::singleton()->routeRequests('app.php');
});
You see that do_action('shutdown') don't accept any parameters, but routeRequests does.