@@ 454-461 (lines=8) @@ | ||
451 | * Done here because it's easier to read the $whitelist array after it's been rebuilt |
|
452 | */ |
|
453 | if ( isset( $args[1] ) && 'list' == $args[1] ) { |
|
454 | if ( ! empty( $whitelist ) ) { |
|
455 | WP_CLI::success( __( 'Here are your whitelisted IPs:', 'jetpack' ) ); |
|
456 | foreach ( $whitelist as $ip ) { |
|
457 | WP_CLI::line( "\t" . str_pad( $ip, 24 ) ) ; |
|
458 | } |
|
459 | } else { |
|
460 | WP_CLI::line( __( 'Whitelist is empty.', "jetpack" ) ) ; |
|
461 | } |
|
462 | break; |
|
463 | } |
|
464 | ||
@@ 707-717 (lines=11) @@ | ||
704 | } else { |
|
705 | WP_CLI::log( __( 'Initialized a new full sync', 'jetpack' ) ); |
|
706 | } |
|
707 | } else { |
|
708 | ||
709 | // Reset sync settings to original. |
|
710 | Jetpack_Sync_Settings::update_settings( $original_settings ); |
|
711 | ||
712 | if ( $modules ) { |
|
713 | WP_CLI::error( sprintf( __( 'Could not start a new full sync with modules: %s', 'jetpack' ), join( ', ', $modules ) ) ); |
|
714 | } else { |
|
715 | WP_CLI::error( __( 'Could not start a new full sync', 'jetpack' ) ); |
|
716 | } |
|
717 | } |
|
718 | ||
719 | // Keep sending to WPCOM until there's nothing to send |
|
720 | $i = 1; |