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