-
Notifications
You must be signed in to change notification settings - Fork 349
Open
Labels
Description
wp-cli/wp-cli#4818 introduces a "cli_init" hook during the Runner startup process that allows developers to register their custom commands by hooking into a specific event instead of checking for the definition and existence of the WP_CLI constant.
Developers can continue to check in the traditional way, but in order to communicate the existence of this hook to the broader community, we will need to update WP-CLI documentation to present examples on how this hook may be used. This includes:
- Example code showing the hook in action
- Extending the hook reference
- Checking scaffolded packages for any necessary changes
Per Alain, "the WP_CLI constant example should stay, though. Using the cli_init hook is an alternative, not a replacement, depending on what your needs are."
Copilot