Get hooked! Using the right WordPress actions
summary
Explains concrete hook usage: uses add_action/add_filter calls with priority numbers like 10 and 2 (and even negative priorities) and shows how wrong choices break sites. Demonstrates init to create admin user via wp_create_user, using admin_menu to hide menus, and why save_post causes infinite loops while using ACF’s save hook plus update_field avoids it. Builds a webhook sender on save_post and customizes Ajax Load More with alm_query_args to reorder featured posts via meta_query and array_unshift.
AI-written summary · about
chapters (15)
- 0:00Introduction and welcome
- 3:17Why WordPress is powerful
- 4:21What are WordPress hooks
- 8:37Real-world action example
- 10:47Hacking accounts with init action
- 12:32Simplifying admin menus
- 15:01ACF mandatory fields with save post
- 19:37Web hooks with save post
- 21:42Q&A on hook priorities
- 28:40Understanding filters
- 34:18Form validation with filters
- 35:23Ajax Load More featured posts
- 42:11Actions vs filters recap
- 42:54Resources for WordPress hooks
- 43:19Q&A and closing
