@@ 61-63 (lines=3) @@ | ||
58 | } |
|
59 | ||
60 | $action = isset( $args[0] ) ? $args[0] : 'prompt'; |
|
61 | if ( ! in_array( $action, array( 'blog', 'user', 'prompt' ) ) ) { |
|
62 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
63 | } |
|
64 | ||
65 | if ( in_array( $action, array( 'user' ) ) ) { |
|
66 | if ( isset( $args[1] ) ) { |
|
@@ 130-132 (lines=3) @@ | ||
127 | */ |
|
128 | public function module( $args, $assoc_args ) { |
|
129 | $action = isset( $args[0] ) ? $args[0] : 'list'; |
|
130 | if ( ! in_array( $action, array( 'list', 'activate', 'deactivate', 'toggle' ) ) ) { |
|
131 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
132 | } |
|
133 | ||
134 | if ( in_array( $action, array( 'activate', 'deactivate', 'toggle' ) ) ) { |
|
135 | if ( isset( $args[1] ) ) { |