| @@ 661-671 (lines=11) @@ | ||
| 658 | 					} else { | |
| 659 | WP_CLI::log( __( 'Initialized a new full sync', 'jetpack' ) ); | |
| 660 | } | |
| 661 | 				} else { | |
| 662 | ||
| 663 | // Reset sync settings to original. | |
| 664 | Jetpack_Sync_Settings::update_settings( $original_settings ); | |
| 665 | ||
| 666 | 					if ( $modules ) { | |
| 667 | WP_CLI::error( sprintf( __( 'Could not start a new full sync with modules: %s', 'jetpack' ), join( ', ', $modules ) ) ); | |
| 668 | 					} else { | |
| 669 | WP_CLI::error( __( 'Could not start a new full sync', 'jetpack' ) ); | |
| 670 | } | |
| 671 | } | |
| 672 | ||
| 673 | // Keep sending to WPCOM until there's nothing to send | |
| 674 | $i = 1; | |
| @@ 59-64 (lines=6) @@ | ||
| 56 | $schedules = wp_get_schedules(); | |
| 57 | ||
| 58 | ||
| 59 | 			if ( count( $crons ) === 0 ) { | |
| 60 | WP_CLI::success( __( 'Found no available cron jobs.', 'jetpack' ) ); | |
| 61 | ||
| 62 | 			} else { | |
| 63 | WP_CLI::success( sprintf( _n( 'Found %d available cron job.', 'Found %d available cron jobs.', count( $crons ), 'jetpack' ), count( $crons ) ) ); | |
| 64 | } | |
| 65 | ||
| 66 | 			foreach ( $crons as $cron_name => $cron ) { | |
| 67 | $interval = isset( $schedules[ $cron['interval'] ]['display'] ) ? $schedules[ $cron['interval'] ]['display'] : $cron['interval']; | |