USAGE:
add_action( $hook, $function_to_add, $priority, $accepted_args );
Parameter:
$hook
(string) (required) The name of the action to which $function_to_add is hooked. Can also be the name of an action inside a theme or plugin file, or the special tag "all", in which case the function will be called for all hooks)
Default: None
INIT HOOK:
Runs after WordPress has finished loading but before any headers are sent. Useful for intercepting $_GET or $_POST triggers.
For example, to act on $_POST data:
add_action('init', 'process_post');
function process_post(){
if(isset($_POST['unique_hidden_field'])) {
// process $_POST data here
}
}