Files
old-new-wiaas/backend/app/plugins/wiaas/includes/class-wiaas-cli.php
2018-07-30 08:54:41 +02:00

36 lines
619 B
PHP

<?php
/**
* Enables running wiaas with wp cli commands
*/
defined( 'ABSPATH' ) || exit;
/**
* CLI class.
*/
class Wiaas_CLI {
/**
* Load required files and hooks to make the CLI work.
*/
public function __construct() {
$this->includes();
$this->hooks();
}
/**
* Load command files.
*/
private function includes() {
require_once dirname( __FILE__ ) . '/cli/class-wiaas-update-db-command.php';
}
/**
* Sets up and hooks WP CLI to our CLI code.
*/
private function hooks() {
WP_CLI::add_hook( 'after_wp_load', 'Wiaas_CLI_Update_DB_Command::register_commands' );
}
}
new Wiaas_CLI();