Let’s get you started on the right foot. This episode will introduce the lab to you. You’ll spin up a Sandbox development website and get UpDevTools installed.
Labs
Labs are hands-on coding projects that you build along with Tonya as she explains the code, concepts, and thought processes behind it. You can use the labs to further your code knowledge or to use right in your projects. Each lab ties into the Docx to ensure you have the information you need.
Each lab is designed to further your understanding and mastery of code. You learn more about how to think about its construction, quality, maintainability, programmatic and logical thought, and problem-solving. While you may be building a specific thing, Tonya presents the why of it to make it adaptable far beyond that specific implementation, thereby giving you the means to make it your own, in any context.
Collapsible Content Plugin with OOP – Part 4
The best way to learn OOP is to build convert something that you already know from procedural to OOP. That will make the thought processes and methodologies more relatable for you. In Part 4, you will convert the Collapsible Content Plugin from procedural to Object Oriented Programming (OOP).
Let’s Build the Collapsible Content Plugin – Part 1
Let’s get you started building custom (from scratch) WordPress plugins. In Part 1 of this series, you are going to build the basics of the Collapsible Content plugin. As you are building it with Tonya, you’ll learn deeply about custom plugin development, file structures, jQuery, PHP, WordPress core, shortcodes, Gulp, and much more.
2 Timing Mistakes When Removing a WordPress Callback Hook
You want to remove some callback hook in WordPress. You keep trying, but it’s not working. Argh, why isn’t it working? Did you know that timing is important? There are two (2) common timing mistakes when removing (or attempt to remove) a WordPress callback hook. Let’s explore these timing mistakes and then give you some strategies to master the remove process every single time.
Hooking into WordPress: What the Heck is a Hook?
Actions. Filters. Events. Hooks. You read about these terms all the time in tutorials and codex. You see code snippets with add_action, add_filter, and apply_filters. What the heck is a hook? What does it do? And why should you care about learning the event management system in WordPress? Stop pulling your hair out and give me a few minutes of your time to explain it in layman’s terms.
Ins and Outs of PHP Namespace for WordPress
PHP Namespace gives you the means to encapsulate your code modules to improve readability and prevent code naming collisions. In this hands-on lab, you will migrate from prefixing convention to PHP namespacing. You will learn the ins and outs of namespacing.
Wrap It Up
Let’s recap what you learned in this hands-on lab. You’ll also add in animation effects too. Congratulations! You did a great job.
Caching
In past episodes, we talked about caching a collection of elements to avoid multiple returns to the DOM to fetch the elements. Let’s talk about it now in the context of the script you are writing. You’ll see an additional “why” of caching.
Scope
Scoping deals with who has access to the memory. Every language provides scoping rules. JavaScript is different from PHP. Let’s talk about scoping for JavaScript.
jQuery’s $
The variable $ does not have context and does not natively mean jQuery. It can also stand for Mootools and any value. You need to specifically initialize jQuery to the $ variable. Let’s talk about it in relationship to the IIFE. I’ll show you how to pass jQuery into the IIFE (yes, you can pass in objects) and then assign it to the variable for use within the IIFE’s scope.