Let me introduce the lab to you to what you will be doing. First of all, this lab is meant for the professional developer, the person who wants to know the Genesis codebase, as you will be exploring and reverse engineering the actual source code. The intent of this lab is to introduce you to the Genesis framework, its architecture, event hooks (actions and filters), the child-parent relationship, and more. You will look at the HTML and markup that is generated by the framework, explore the hooks that allow you to customize everything, and get a solid foundation before you […]
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.
Overview of the Genesis Framework – Developer’s Guide to Customizing Genesis
In this hands-on lab, you will be introduced to the Genesis framework, its file structure, codebase, and developer-friendly customization features. You’ll walk through its source code and be introduced to the Genesis-way. You’ll learn about why the child-parent paradigm promotes clean, quality code.
Where does Genesis load the style.css file?
In this episode, you will discover where in the Genesis framework does it load the child theme’s stylesheet style.css file.
Asset Version Control using the Genesis Constant
The Genesis framework provides you with a constant, which you use in the child theme. This constant defines the theme’s version. That version is then appended to each asset during the enqueuing process. In this episode, you will take a look at how this works.
Browser Local Cache and Version Control
Let’s talk about the web browser. The browser is capable of storing a local copy of the assets (stylesheets, scripts, etc.). It does this to save web page load time. After the first visit to a page, the next time the person comes to the same page, it will load faster. Why? The browser doesn’t have to request those files from the server again. Nope, it kept a local copy in the computer’s cache. In this episode, you will also see how WordPress appends the version on to the end of the asset’s URL in order to make it unique […]
Lab Introduction
Let me introduce you to the lab, as well as the problem you may be experiencing.
Genesis Version – Ensure Your Latest Changes Go Out to the Browser
Have you ever had the problem where you made a change, pushed it to your client’s server, and then they say they can’t see the changes? So you tell them to clear their browser’s cache and that solves the problem. In this lab, you will learn how to make sure your changes are sent out to the browser using the constant Genesis provides for you.
Master Tip: How Did I Know to Use after_theme_setup
?
Let’s talk about how I knew to use after_setup_theme. You will look at in WordPress Core.
Remove Genesis Page Title
In this episode, you will unregister the Genesis page title. Remember, you need to unregister it after it has been registered. Huh, what does that mean? It means after the theme is called. In this episode, you will learn about how to unregister callbacks and the WordPress event after_setup_theme. WordPress Events (Hooks) Psst, events, unregistering, and registering is fuzzy for you, make sure you take the Introduction & Registering Events hands-on lab. [/infoxbox]
Sanitize the Contents
Anything out of the database is not safe. It has to be sanitized before it is rendered out to the browser. Let’s talk about how to sanitize and which sanitizing function to use for the plugin. In this episode, you will see some nefarious code in action. Then you’ll try out two different sanitizing functions: esc_html wp_kses_post