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
11. 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
11
12. Basic Flow
1. Make sure starter theme is active
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
12
17. Other Examples
• wp produce site-options
• wp produce term-fields
—taxonomies=category
• wp produce articles
—slug=news
—types=press release, in the news
—external-urls=both
17
18. 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
18