mirror of
https://gh.wpcy.net/https://github.com/wp-cli/scaffold-package-command.git
synced 2026-04-25 23:31:46 +08:00
27 lines
524 B
Text
27 lines
524 B
Text
<?php
|
|
|
|
namespace WP_CLI\HelloWorld;
|
|
|
|
use WP_CLI;
|
|
use WP_CLI_Command;
|
|
|
|
class HelloWorldCommand extends WP_CLI_Command {
|
|
|
|
/**
|
|
* Greets the world.
|
|
*
|
|
* ## EXAMPLES
|
|
*
|
|
* # Greet the world.
|
|
* $ wp hello-world
|
|
* Success: Hello World!
|
|
*
|
|
* @when before_wp_load
|
|
*
|
|
* @param array $args Indexed array of positional arguments.
|
|
* @param array $assoc_args Associative array of associative arguments.
|
|
*/
|
|
public function __invoke( $args, $assoc_args ) {
|
|
WP_CLI::success( 'Hello World!' );
|
|
}
|
|
}
|