@@ 255-257 (lines=3) @@ | ||
252 | */ |
|
253 | public function reset( $args, $assoc_args ) { |
|
254 | $action = isset( $args[0] ) ? $args[0] : 'prompt'; |
|
255 | if ( ! in_array( $action, array( 'options', 'modules' ) ) ) { |
|
256 | /* translators: %s is a command like "prompt" */ |
|
257 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
258 | } |
|
259 | ||
260 | // Are you sure? |
|
@@ 578-580 (lines=3) @@ | ||
575 | // Is the option flagged as unsafe? |
|
576 | $flagged = ! in_array( $args[1], $safe_to_modify ); |
|
577 | ||
578 | if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) { |
|
579 | /* translators: %s is a command like "prompt" */ |
|
580 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
581 | } |
|
582 | ||
583 | if ( isset( $args[0] ) ) { |