@@ 267-270 (lines=4) @@ | ||
264 | */ |
|
265 | public function reset( $args, $assoc_args ) { |
|
266 | $action = isset( $args[0] ) ? $args[0] : 'prompt'; |
|
267 | if ( ! in_array( $action, array( 'options', 'modules', 'sync-checksum' ), true ) ) { |
|
268 | /* translators: %s is a command like "prompt" */ |
|
269 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
270 | } |
|
271 | ||
272 | $is_dry_run = ! empty( $assoc_args['dry-run'] ); |
|
273 | ||
@@ 701-703 (lines=3) @@ | ||
698 | // Is the option flagged as unsafe? |
|
699 | $flagged = ! in_array( $args[1], $safe_to_modify ); |
|
700 | ||
701 | if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) { |
|
702 | /* translators: %s is a command like "prompt" */ |
|
703 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
704 | } |
|
705 | ||
706 | if ( isset( $args[0] ) ) { |