@@ 243-245 (lines=3) @@ | ||
240 | */ |
|
241 | public function reset( $args, $assoc_args ) { |
|
242 | $action = isset( $args[0] ) ? $args[0] : 'prompt'; |
|
243 | if ( ! in_array( $action, array( 'options', 'modules' ) ) ) { |
|
244 | /* translators: %s is a command like "prompt" */ |
|
245 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
246 | } |
|
247 | ||
248 | // Are you sure? |
|
@@ 541-543 (lines=3) @@ | ||
538 | // Is the option flagged as unsafe? |
|
539 | $flagged = ! in_array( $args[1], $safe_to_modify ); |
|
540 | ||
541 | if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) { |
|
542 | /* translators: %s is a command like "prompt" */ |
|
543 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
544 | } |
|
545 | ||
546 | if ( isset( $args[0] ) ) { |