|
@@ 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? |
|
@@ 544-546 (lines=3) @@
|
| 541 |
|
// Is the option flagged as unsafe? |
| 542 |
|
$flagged = ! in_array( $args[1], $safe_to_modify ); |
| 543 |
|
|
| 544 |
|
if ( ! in_array( $action, array( 'list', 'get', 'delete', 'update' ) ) ) { |
| 545 |
|
/* translators: %s is a command like "prompt" */ |
| 546 |
|
WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $action ) ); |
| 547 |
|
} |
| 548 |
|
|
| 549 |
|
if ( isset( $args[0] ) ) { |