|
@@ 276-285 (lines=10) @@
|
| 273 |
|
|
| 274 |
|
$is_dry_run = ! empty( $assoc_args['dry-run'] ); |
| 275 |
|
|
| 276 |
|
if ( $is_dry_run ) { |
| 277 |
|
WP_CLI::warning( |
| 278 |
|
__( "\nThis is a dry run.\n", 'jetpack' ) . |
| 279 |
|
__( "No actions will be taken.\n", 'jetpack' ) . |
| 280 |
|
__( "The following messages will give you preview of what will happen when you run this command.\n\n", 'jetpack' ) |
| 281 |
|
); |
| 282 |
|
} else { |
| 283 |
|
// We only need to confirm "Are you sure?" when we are not doing a dry run. |
| 284 |
|
jetpack_cli_are_you_sure(); |
| 285 |
|
} |
| 286 |
|
|
| 287 |
|
switch ( $action ) { |
| 288 |
|
case 'options': |
|
@@ 960-971 (lines=12) @@
|
| 957 |
|
} else { |
| 958 |
|
WP_CLI::log( __( 'Initialized a new full sync', 'jetpack' ) ); |
| 959 |
|
} |
| 960 |
|
} else { |
| 961 |
|
|
| 962 |
|
// Reset sync settings to original. |
| 963 |
|
Settings::update_settings( $original_settings ); |
| 964 |
|
|
| 965 |
|
if ( $modules ) { |
| 966 |
|
/* translators: %s is a comma separated list of Jetpack modules */ |
| 967 |
|
WP_CLI::error( sprintf( __( 'Could not start a new full sync with modules: %s', 'jetpack' ), join( ', ', $modules ) ) ); |
| 968 |
|
} else { |
| 969 |
|
WP_CLI::error( __( 'Could not start a new full sync', 'jetpack' ) ); |
| 970 |
|
} |
| 971 |
|
} |
| 972 |
|
|
| 973 |
|
// Keep sending to WPCOM until there's nothing to send |
| 974 |
|
$i = 1; |