Complete the code to add a function to the WordPress 'init' action hook.
add_action('init', [1]);
The 'init' hook runs after WordPress has finished loading but before any headers are sent. You add your function name as a string to it.
Complete the code to hook a function to run when the WordPress admin menu is being built.
add_action('admin_menu', [1]);
The 'admin_menu' hook is used to add items to the WordPress admin menu. You provide your function name as a string.
Fix the error in the code to correctly hook a function to the 'wp_footer' action.
add_action('wp_footer', [1]);
The function name must be passed as a string without parentheses to 'add_action'.
Fill both blanks to add a function with priority 15 and 2 accepted arguments to the 'save_post' action hook.
add_action('save_post', [1], [2], 2);
You pass the function name as a string, then the priority number (15 here), and finally the number of arguments (2).
Fill all three blanks to add a function to the 'template_redirect' hook with priority 20 and accepting 1 argument.
add_action([1], [2], [3], 1);
The first argument is the hook name as a string, second is the function name as a string, third is the priority number (20 here), and fourth is the number of accepted arguments (1).