8. GOALS
• Speed development (duh)
• Easy for new staff/devs to learn
• Theme should have everything it needs and
nothing it doesn’t
• Avoid reinventing wheels
• Avoid tedious, repetitive work (e.g. copy-paste)
8
12. EXTENDING WP-CLI
• We built a plugin called Produce
(it could also be a package)
• It extends wp-cli with a new
command & subcommands
• When run, commands inject code into
our starter theme, Crate
12
13. BASIC FLOW
1. Make sure starter theme is present
2. Install & activate Produce plugin
3. Run WP-CLI commands to copy
files from the plugin to the theme
4. When done, uninstall the plugin
13
18. OTHER SUBCOMMANDS
wp produce site-options
wp produce term-fields
—taxonomies=category
wp produce articles
—slug=news
—types=press release, in the news
—external-urls=both
18
19. ARCHITECTURE
• Base class with methods, variables & helpers to facilitate
building commands
• Subdirectories for:
• commands
• ACF fieldgroups (in json)
• php includes
• js
• sass
• template files
• mustache
19