Skip to content

Instantly share code, notes, and snippets.

@Oceas Oceas/wds-hello-world.php
Last active Sep 19, 2019

Embed
What would you like to do?
<?php
/*
Plugin Name: WDS Hello World
Plugin URI: https://webdevstudios.com/
Description: Teaching the basics of WP-CLI
Author: Web Dev Studios
Version: 1.0.0
Author URI: https://webdevstudios.com/
*/
class WDS_CLI {
/**
* Returns 'Hello World'
*
* @since 0.0.1
* @author Scott Anderson
*/
public function hello_world() {
WP_CLI::line( 'Hello World!' );
}
}
/**
* Registers our command when cli get's initialized.
*
* @since 1.0.0
* @author Scott Anderson
*/
function wds_cli_register_commands() {
WP_CLI::add_command( 'wds', 'WDS_CLI' );
}
add_action( 'cli_init', 'wds_cli_register_commands' );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.