0
0
Wordpressframework~10 mins

Removing hooks in Wordpress - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to remove an action hook in WordPress.

Wordpress
remove_action('init', '[1]');
Drag options to blanks, or click blank then click option'
Ainit
Badd_action
Cwp_head
Dmy_custom_function
Attempts:
3 left
💡 Hint
Common Mistakes
Using the hook name instead of the function name as the second parameter.
Confusing remove_action with add_action.
2fill in blank
medium

Complete the code to remove a filter hook in WordPress.

Wordpress
remove_filter('the_content', '[1]');
Drag options to blanks, or click blank then click option'
Aadd_filter
Bfilter_content
Cthe_content
Dcontent_filter
Attempts:
3 left
💡 Hint
Common Mistakes
Using the hook name as the callback function.
Using add_filter instead of remove_filter.
3fill in blank
hard

Fix the error in this code that tries to remove an action hook with priority 10.

Wordpress
remove_action('wp_footer', '[1]', 10);
Drag options to blanks, or click blank then click option'
Awp_footer
Badd_action
Cfooter_function
Dfooter_hook
Attempts:
3 left
💡 Hint
Common Mistakes
Using the hook name instead of the function name.
Omitting the priority when it was set during add_action.
4fill in blank
hard

Fill both blanks to correctly remove a filter with a specific priority.

Wordpress
remove_filter('[1]', '[2]', 15);
Drag options to blanks, or click blank then click option'
Athe_title
Bcustom_title_filter
Cthe_content
Dcontent_filter
Attempts:
3 left
💡 Hint
Common Mistakes
Swapping the hook name and function name.
Not specifying the correct priority.
5fill in blank
hard

Fill all three blanks to remove an action hook with a custom priority and function name.

Wordpress
remove_action('[1]', '[2]', [3]);
Drag options to blanks, or click blank then click option'
Ainit
Bcustom_init_function
C20
Dwp_enqueue_scripts
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong hook name.
Not matching the priority number.