In this episode, you’ll build an automatic way to set the theme’s version number. These strategies eliminate the need to hard code the theme’s version number.
Let’s start with the Twenty Seventeen theme. I want to show you that these techniques work on any theme. Then in the next episode, we’ll move it over to a Genesis-powered child theme.
For strategy 1, when you are in development/debug mode, we want to use the file’s modification time instead of having to change the asset’s released version number.
Keep It Simple, Stupid (KISS) - the best kiss you'll get in code.
Total Lab Runtime: 02:27:07
- 1 Lab Introductionfree 11:19
- 2 Why is Version Number Necessary?free 16:30
- 3 Version Numbering Schemepro 06:47
- 4 Forget Hard Coding Version Numberpro 15:02
- 5 Forget Hard Coding - Grab Stylesheet's Versionpro 05:19
- 6 Forget Hard Coding - Genesispro 05:17
- 7 Load the Theme's Minified Stylesheetpro 10:23
- 8 Strategy Session: Minified or Full for Theme Versionpro 12:25
- 9 Load the Minified Stylesheet in Genesispro 05:04
- 10 Refactor to Improve Our Codepro 11:20
- 11 Applying It to Scriptspro 18:14
- 12 Apply it to Scripts - Genesispro 09:13
- 13 Convert into Utility File - for Reusepro 14:30
- 14 Wrap it Upfree 05:44