@@ 234-236 (lines=3) @@ | ||
231 | */ |
|
232 | public function reset( $args, $assoc_args ) { |
|
233 | $action = isset( $args[0] ) ? $args[0] : 'prompt'; |
|
234 | if ( ! in_array( $action, array( 'options', 'modules' ) ) ) { |
|
235 | /* translators: %s is a command like "prompt" */ |
|
236 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
237 | } |
|
238 | ||
239 | // Are you sure? |
|
@@ 533-535 (lines=3) @@ | ||
530 | // Is the option flagged as unsafe? |
|
531 | $flagged = ! in_array( $args[1], $safe_to_modify ); |
|
532 | ||
533 | if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) { |
|
534 | /* translators: %s is a command like "prompt" */ |
|
535 | WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
|
536 | } |
|
537 | ||
538 | if ( isset( $args[0] ) ) { |