Skip to content

Latest commit

 

History

History
12 lines (8 loc) · 1.08 KB

README.md

File metadata and controls

12 lines (8 loc) · 1.08 KB

WP-CLI Framework

A WP-CLI base framework for building WP-CLI workflows.

When using in your plugin, you will need to take several steps:

  • Copy the cli directory to your plugin. To include the CLI commands from your plugin, review the example-cli-plugin.php file.
  • Determine how you load your classes, and replace the example plugin namespaces.
  • Replace the sample commands in cli/commands.php with your own.
  • Replace the sample methods in cli/actions.php with your own.

The real functionality of this framework can be found in cli/base.php. This provides some base wp-cli functionality which can be easily integrated to your commands. Examples of using many of those methods can be found in cli/actions.php.