@@ 270-279 (lines=10) @@ | ||
267 | ||
268 | $is_dry_run = ! empty( $assoc_args['dry-run'] ); |
|
269 | ||
270 | if ( $is_dry_run ) { |
|
271 | WP_CLI::warning( |
|
272 | __( "\nThis is a dry run.\n", 'jetpack' ) . |
|
273 | __( "No actions will be taken.\n", 'jetpack' ) . |
|
274 | __( "The following messages will give you preview of what will happen when you run this command.\n\n", 'jetpack' ) |
|
275 | ); |
|
276 | } else { |
|
277 | // We only need to confirm "Are you sure?" when we are not doing a dry run. |
|
278 | jetpack_cli_are_you_sure(); |
|
279 | } |
|
280 | ||
281 | switch ( $action ) { |
|
282 | case 'options': |
|
@@ 963-974 (lines=12) @@ | ||
960 | } else { |
|
961 | WP_CLI::log( __( 'Initialized a new full sync', 'jetpack' ) ); |
|
962 | } |
|
963 | } else { |
|
964 | ||
965 | // Reset sync settings to original. |
|
966 | Jetpack_Sync_Settings::update_settings( $original_settings ); |
|
967 | ||
968 | if ( $modules ) { |
|
969 | /* translators: %s is a comma separated list of Jetpack modules */ |
|
970 | WP_CLI::error( sprintf( __( 'Could not start a new full sync with modules: %s', 'jetpack' ), join( ', ', $modules ) ) ); |
|
971 | } else { |
|
972 | WP_CLI::error( __( 'Could not start a new full sync', 'jetpack' ) ); |
|
973 | } |
|
974 | } |
|
975 | ||
976 | // Keep sending to WPCOM until there's nothing to send |
|
977 | $i = 1; |
@@ 101-106 (lines=6) @@ | ||
98 | ||
99 | $time = $scheduler->check_cron( $args[0] ); |
|
100 | ||
101 | if ( ! $time ) { |
|
102 | WP_CLI::success( __( 'The cron is not scheduled to run.', 'jetpack' ) ); |
|
103 | ||
104 | } else { |
|
105 | WP_CLI::success( sprintf( __( 'Cron will run at: %s GMT', 'jetpack' ), gmdate( 'Y-m-d H:i:s', $time ) ) ); |
|
106 | } |
|
107 | } |
|
108 | ||
109 | /** |