Create a gist now

Instantly share code, notes, and snippets.

Example of how to override a WP-CLI command
<?php
if ( defined('WP_CLI') && WP_CLI ) {
class Transient_Mod_Command extends Transient_Command {
public function delete_all() {
// new definition of delete-all subcommand
}
}
WP_CLI::add_command( 'transient', 'Transient_Mod_Command' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment