Moving admin to it's own directory, trying to fix up docblocks and stuff

This commit is contained in:
2021-09-14 11:37:30 -06:00
parent c94414dc0e
commit ecd4099038
17 changed files with 1095 additions and 396 deletions

View File

@ -5,39 +5,39 @@ namespace PluginNamespace;
use WP_CLI;
if ( ! defined( 'ABSPATH' ) ) {
exit; // Exit if accessed directly
exit; // Exit if accessed directly
}
class NmspCli {
/**
* Class constructor. Can add commands here.
*
* @since 1.0.0
*
* @return void
*/
public function __construct() {
WP_CLI::add_command(
'nmsp-plugin do',
array( $this, 'do_the_thing' ),
array(
'shortdesc' => __( 'The short description.', 'nmsp-plugin-name-text-domain' ),
'longdesc' => __( "This is the super long description that will go on and on my friend. Some people started writing it not knowing what it was, and we'll continue writing it forever just because this is the description that never ends...", 'nmsp-plugin-name-text-domain' ),
),
);
}
/**
* Class constructor. Can add commands here.
*
* @since 1.0.0
*
* @return void
*/
public function __construct() {
WP_CLI::add_command(
'nmsp-plugin do',
array( $this, 'do_the_thing' ),
array(
'shortdesc' => __( 'The short description.', 'nmsp-plugin-name-text-domain' ),
'longdesc' => __( "This is the super long description that will go on and on my friend. Some people started writing it not knowing what it was, and we'll continue writing it forever just because this is the description that never ends...", 'nmsp-plugin-name-text-domain' ),
),
);
}
/**
* A sample method where something is done.
*
* @since 1.0.0
*
* @return void
*/
public function do_the_thing(): void {
WP_CLI::success( __( 'Congradulations, it is working.', 'nmsp-plugin-name-text-domain' ) );
}
/**
* A sample method where something is done by being invoked from WP CLI.
*
* @since 1.0.0
*
* @return void
*/
public function do_the_thing(): void {
WP_CLI::success( __( 'Congradulations, it is working.', 'nmsp-plugin-name-text-domain' ) );
}
}