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