Unlock your potential with a Pro Membership
Here is where you propel your career forward. Come join us today. Learn more.
Refactoring Image Sizes
Lab: Part 1 – Introduction to Modularity – Developer’s Genesis Starter Child Theme
Video Runtime: 03:52
Your homework in the last episode was to refactor the image sizes on your own. In this episode, we’ll walk through how to move the image size name and arguments into a configuration variable.
Just like the theme supports, calling the image sizes over and over again is WET and unnecessary. Let’s refactor to clean up the code and remove the redundancies.
Don’t repeat yourself. Don’t repeat yourself. Don’t repeat yourself.
Episodes
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