Last active
August 29, 2015 14:19
-
-
Save ashfame/b21c223e904da83bedab to your computer and use it in GitHub Desktop.
Example of how to override a WP-CLI command
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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