Throughout the framework, you will see code like this:
|'html5' => '<div %s>',|
|'xhtml' => '<div id="wrap">',|
|'context' => 'site-container',|
genesis_markup includes configuration for both HTML5 and pre-HTML5 (XHTML). What is the intent (or purpose) of the function
genesis_markup? When should you use it in your child themes or plugins? In this episode, you will discover its intent as well as when you should use it.
The intent is to allow for either a HTML5-powered or pre-HTML5 child theme. Genesis supports both. But when you build your child theme, you are specifying if it is a HTML5-powered theme or not. Therefore, you do not need to use this function in your child theme. If you are building a plugin, you decide whether you want it to support one or both of the HTML structures. If you are only supporting one, e.g. HTML5, then you do not need to use
So why then do you need to learn this function?
Because it is used throughout the framework; therefore, it will help you both read and understand what Genesis is doing. Secondly, these videos teach you pure PHP such as conditional expressions, falsey state, ternary operator, passing arguments to a function via a literal or variables, and more. You are learning about programming and web development.
Your best friend is code, Tonya is making the introductions.
Total Lab Runtime: 02:51:01
- 1 Lab Introductionfree 04:47
- 2 Genesis Markup - Overviewpro 06:55
- 3 Genesis Markup - genesis_parse_attrpro 14:12
- 4 Granular Customization with genesis_parse_attrpro 13:13
- 5 Genesis Markup - genesis_attr - Part 1pro 16:44
- 6 Genesis Markup - genesis_attr - Part 2pro 11:31
- 7 When should you use genesis_markup?pro 15:05
- 8 How does Genesis know to use HTML5?pro 04:35
- 9 Building the HTML5 with genesis_markuppro 08:15
- 10 Markup Helpers for Empty Class and Accessibilitypro 08:50
- 11 Practical Customization Example - Grid Classespro 11:12
- 12 Practical Customization Example - Figuring Out the First Column in a Rowpro 09:47
- 13 Genesis Structural Wrap Overviewfree 07:42
- 14 Genesis Structural Wrap Code Overviewpro 16:24
- 15 Swapping Old Contextspro 09:37
- 16 Refactoring the Swapping Old Contexts Codepro 06:00
- 17 Configuring Structural Wrapspro 04:54
- 18 Wrap it Upfree 01:18