Skip to content

Instantly share code, notes, and snippets.

@matgargano
Created September 11, 2014 19:31
Show Gist options
  • Save matgargano/591e8685c1a309edc05e to your computer and use it in GitHub Desktop.
Save matgargano/591e8685c1a309edc05e to your computer and use it in GitHub Desktop.
<?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