Next, you need to move the theme customizer files from the Genesis Sample Theme to your new developer’s theme. You’ll start by copying the files into your theme.
Then you’ll start refactoring by applying the PHP namespace and removing the prefixing. You’ll give the functions purposeful names so that each tells you specifically what it does, i.e. what the expected behavior is when you call the function. You’ll be reorganizing the helper functions into a helper file. Also, there are some functions embedded within a function, which makes the code less readable. Let’s refactor those and make them their own functions.
In this episode, you are applying the principles of clean, quality coding, PHP namespacing, and modular configuration.
Once upon a time, there was a developer... You! This is going to be a good story...
Total Lab Runtime: 03:59:03
- 1 Lab Introductionfree 05:01
- 2 What the Heck is Modularity?free 13:12
- 3 The Why of Clean Codefree 12:47
- 4 Laying Out the Theme's Architecture - Part 1pro 09:04
- 5 Laying Out the Theme's Architecture - Part 2pro 10:34
- 6 Slicing Up the Sample Theme's functions.phppro 06:44
- 7 Initialization Tasks - Theme Constantspro 14:47
- 8 Initialization Tasks - Directory Constantspro 05:49
- 9 Setup Taskspro 38:00
- 10 Refactoring Theme Supportspro 08:01
- 11 Refactoring Image Sizespro 03:52
- 12 Genesis Structural Componentspro 05:10
- 13 Load Assets (Enqueue)pro 05:56
- 14 Theme Customizer Filespro 15:43
- 15 Theme Settings Defaultspro 06:34
- 16 Autoload Modulespro 11:19
- 17 Unregister Default Genesis Callbackspro 00:00
- 18 Test & Wrap it Uppro 06:30