diff --git a/README.md b/README.md index 7f952aa..b106c47 100755 --- a/README.md +++ b/README.md @@ -2,18 +2,18 @@ ## Supported commands -* `wp swim to-www` -- Rende un sito accessibile tramite www. +* `wp swim to-www` -- Make the website accessible via www. +* `wp swim to-https` -- Make the website accessible via https. ## Work in progress commands -* `wp swim to-https` -- Rende un sito accessibile tramite https. * `wp swim autoperm` -- ... * `wp swim update-all` -- ... * `wp swim cache-clean` -- ... ## Installing -`wp package install git@github.com:sedwebagency/swim-wp-cli.git` +`wp package install https://github.com/sedwebagency/swim-wp-cli/releases/latest/download/swim-wp-cli.zip` ## Thanks to diff --git a/command.php b/command.php index c7673fa..b28bcce 100644 --- a/command.php +++ b/command.php @@ -3,6 +3,24 @@ use function WP_CLI\Utils\make_progress_bar; class Swim_WP_CLI extends WP_CLI_Command { + // todo move the version to the "package meta" docblock + const VERSION = '1.0.1'; + + /** + * A test which always gives success and the current version. + * + * ## EXAMPLES + * + * wp swim test + * + * @subcommand test + */ + public function test( array $args = [], array $assoc_args = [] ) { + $current_version = self::VERSION; + + WP_CLI::success( "Success. Installed version $current_version." ); + } + /** * Make the website accessible via www. *