Created
September 11, 2014 19:31
-
-
Save matgargano/591e8685c1a309edc05e to your computer and use it in GitHub Desktop.
This file contains hidden or 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 | |
/** | |
* Implements register_wpmdbpro command. | |
*/ | |
class MDB_Pro_Command extends WP_CLI_Command { | |
/** | |
* Registers WP Migrate DB Pro. | |
* | |
* ## OPTIONS | |
* | |
* <serial> | |
* : The serial for delicious brains | |
* | |
* ## EXAMPLES | |
* | |
* wp example register 1234567890 | |
* | |
* @synopsis <serial> | |
*/ | |
function register( $args ) { | |
list( $serial ) = $args; | |
$settings = get_option('wpmdb_settings'); | |
$settings['licence'] = $serial; | |
update_option( 'wpmdb_settings', $settings ); | |
WP_CLI::success( "Added serial!" ); | |
} | |
} | |
WP_CLI::add_command( 'mdbpro', 'MDB_Pro_Command' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment