Unlock your potential with a Pro Membership
Here is where you propel your career forward. Come join us today. Learn more.
The Basics
Lab: Ins and Outs of PHP Namespace for WordPress
Video Runtime: 17:36
The best to learn about namespace and to wrap your mind around how it’s different than prefix is to use it and see it in action. In this episode, you will add a function called get_the_ID()
to your plugin. Wait a minute. That function exists in WordPress Core. Aha, you’ll see what happens when you use a namespace around the plugin’s function. You’ll see how to call WordPress Core’s function versus the one in your plugin.
Hey... hey you... yes you!... Having a good time? Learning new things? Good!
Episodes
Total Lab Runtime: 02:25:26
- 1 Lab Introductionfree 02:59
- 2 What and Why of Namespacingfree 20:15
- 3 Why Namespacing instead of Prefixing?free 12:39
- 4 The Basicspro 17:36
- 5 Fully Qualified Namingpro 06:50
- 6 Callbacks and Namespacingpro 08:00
- 7 Name Resolution Rulespro 12:17
- 8 Using Functions from Another Namespacepro 16:37
- 10 Class Basicspro 12:20
- 11 Practical Example: Convert from Prefixingpro 10:08
- 12 Real World Example: Convert from Prefixingpro 06:14
- 13 Architecture - Building in Packages and Modulespro 08:59
- 14 PHP Examples - Laravel & Symfonypro 02:50
- 15 Wrap it Upfree 07:42