From e496d8f481cba7ab9532c3597ab9fa662173896c Mon Sep 17 00:00:00 2001 From: Adam Wood <1017872+adamwoodnz@users.noreply.github.com> Date: Thu, 28 Nov 2024 09:22:34 +1300 Subject: [PATCH] Simplify command semantics --- wp-content/mu-plugins/pub/wporg-learn-cli.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/wp-content/mu-plugins/pub/wporg-learn-cli.php b/wp-content/mu-plugins/pub/wporg-learn-cli.php index 93c84b213..753ca4ccf 100755 --- a/wp-content/mu-plugins/pub/wporg-learn-cli.php +++ b/wp-content/mu-plugins/pub/wporg-learn-cli.php @@ -24,11 +24,11 @@ class WPORG_Learn_Tutorial_To_Lesson_Command extends WP_CLI_Command { * * ## EXAMPLES * - * wp wporg-learn-tutorial-to-lesson convert https://learn.wordpress.org/tutorial/slug - * wp wporg-learn-tutorial-to-lesson convert urls.txt --file - * wp wporg-learn-tutorial-to-lesson convert urls.txt --file --live + * wp wporg-learn convert-tutorial-to-lesson https://learn.wordpress.org/tutorial/slug + * wp wporg-learn convert-tutorial-to-lesson urls.txt --file + * wp wporg-learn convert-tutorial-to-lesson urls.txt --file --live */ - public function convert( $args, $assoc_args ) { + public function __invoke( $args, $assoc_args ) { $source = $args[0]; $is_dry_run = ! isset( $assoc_args['live'] ); $is_file = isset( $assoc_args['file'] ); @@ -110,4 +110,4 @@ private function process_url( $url, $is_dry_run ) { } } -WP_CLI::add_command( 'wporg-learn-tutorial-to-lesson', 'WPORG_Learn_Tutorial_To_Lesson_Command' ); +WP_CLI::add_command( 'wporg-learn convert-tutorial-to-lesson', 'WPORG_Learn_Tutorial_To_Lesson_Command' );