@@ 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? |
|
@@ 566-568 (lines=3) @@ | ||
563 | // Is the option flagged as unsafe? |
|
564 | $flagged = ! in_array( $args[1], $safe_to_modify ); |
|
565 | ||
566 | if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) { |
|
567 | /* translators: %s is a command like "prompt" */ |
|
568 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
569 | } |
|
570 | ||
571 | if ( isset( $args[0] ) ) { |