|
@@ 188-190 (lines=3) @@
|
| 185 |
|
*/ |
| 186 |
|
public function reset( $args, $assoc_args ) { |
| 187 |
|
$action = isset( $args[0] ) ? $args[0] : 'prompt'; |
| 188 |
|
if ( ! in_array( $action, array( 'options', 'modules' ) ) ) { |
| 189 |
|
/* translators: %s is a command like "prompt" */ |
| 190 |
|
WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
| 191 |
|
} |
| 192 |
|
|
| 193 |
|
// Are you sure? |
|
@@ 487-489 (lines=3) @@
|
| 484 |
|
// Is the option flagged as unsafe? |
| 485 |
|
$flagged = ! in_array( $args[1], $safe_to_modify ); |
| 486 |
|
|
| 487 |
|
if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) { |
| 488 |
|
/* translators: %s is a command like "prompt" */ |
| 489 |
|
WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
| 490 |
|
} |
| 491 |
|
|
| 492 |
|
if ( isset( $args[0] ) ) { |