Lab Introduction
Lab: PHP OOP and WordPress Hooks Basics
Video Runtime: 10:43
Before you begin, make sure that you have the code from the Introduction to PHP Object-Oriented Programming (OOP) for WordPress lab. If you do not have that code, no problem, as you can get it from this GitHub repository.
Let’s talk about the WordPress event-driven system. Then you’ll look at the code in WordPress Core to use how it’s using the PHP construct call_user_func_array
in order to call each of the pre-registered callbacks when the event is fired.
It’s important to have a basic understanding of hooks, which are events and why they exist. In this episode, you’ll get a brief review. Make sure you watch it.
Then we’ll discuss what you’ll be doing in this lab.
Additional Resources
If you need a refresher, then make sure you take this lab:
You can also find information on the following WordPress Core constructs in Docx:
Whoever says that coding is hard, just smack them.
Episodes
Total Lab Runtime: 01:58:04
- 1 Lab Introductionfree 10:43
- 2 Meet the PHP Callbackpro 15:01
- 3 Object's Method Callbackpro 11:30
- 4 Static Method Callbackpro 13:32
- 5 Registering an Object's Method to a WordPress Event Hookpro 12:32
- 6 Registering a Static Method to a WordPress Event Hookpro 05:09
- 7 Unregistering a Static Method Callbackpro 03:30
- 8 Unregistering an Object's Method Callbackpro 04:49
- 9 3rd Party Object Callbackspro 15:06
- 10 3rd Party Static Callbackspro 08:27
- 11 "Object Not Available" Strategiespro 08:52
- 12 Design Strategypro 03:29
- 13 Wrap it Uppro 05:24