Complete the code to add a function to a WordPress action hook with default priority.
add_action('init', [1]);
When adding a function to a hook, if you only provide the function name, WordPress uses the default priority 10.
Complete the code to add a function to a WordPress filter hook with priority 20.
add_filter('the_content', [1]);
To set a specific priority, include it as the second argument. Here, priority 20 is used.
Fix the error in the code to correctly specify the number of accepted arguments for the hook.
add_action('save_post', 'save_extra_data', 10, [1]);
The fourth argument specifies how many arguments the callback accepts. For 'save_post', usually 1 argument is passed.
Fill all three blanks to add a filter with priority 15 and accept 2 arguments.
add_filter('widget_title', [1], [2], [3]);
The second argument is the function name, the third is the priority, and the fourth is the number of accepted arguments. Here, priority 15 is set.
Fill all three blanks to add an action with function 'log_event', priority 5, and accept 3 arguments.
add_action('wp_footer', [1], [2], [3]);
The function name is first, then priority, then number of accepted arguments. This sets priority 5 and 3 arguments.