Skip to content

Commit

Permalink
Simplify command semantics
Browse files Browse the repository at this point in the history
  • Loading branch information
adamwoodnz committed Nov 27, 2024
1 parent 8bd6228 commit e496d8f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions wp-content/mu-plugins/pub/wporg-learn-cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -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'] );
Expand Down Expand Up @@ -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' );

0 comments on commit e496d8f

Please sign in to comment.