New project structure init
This commit is contained in:
36
backend/app/plugins/wiaas/includes/class-wiaas-cli.php
Normal file
36
backend/app/plugins/wiaas/includes/class-wiaas-cli.php
Normal file
@@ -0,0 +1,36 @@
|
||||
<?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();
|
||||
Reference in New Issue
Block a user