@@ 465-472 (lines=8) @@ | ||
462 | * Done here because it's easier to read the $whitelist array after it's been rebuilt |
|
463 | */ |
|
464 | if ( isset( $args[1] ) && 'list' == $args[1] ) { |
|
465 | if ( ! empty( $whitelist ) ) { |
|
466 | WP_CLI::success( __( 'Here are your whitelisted IPs:', 'jetpack' ) ); |
|
467 | foreach ( $whitelist as $ip ) { |
|
468 | WP_CLI::line( "\t" . str_pad( $ip, 24 ) ) ; |
|
469 | } |
|
470 | } else { |
|
471 | WP_CLI::line( __( 'Whitelist is empty.', "jetpack" ) ) ; |
|
472 | } |
|
473 | break; |
|
474 | } |
|
475 | ||
@@ 718-728 (lines=11) @@ | ||
715 | } else { |
|
716 | WP_CLI::log( __( 'Initialized a new full sync', 'jetpack' ) ); |
|
717 | } |
|
718 | } else { |
|
719 | ||
720 | // Reset sync settings to original. |
|
721 | Jetpack_Sync_Settings::update_settings( $original_settings ); |
|
722 | ||
723 | if ( $modules ) { |
|
724 | WP_CLI::error( sprintf( __( 'Could not start a new full sync with modules: %s', 'jetpack' ), join( ', ', $modules ) ) ); |
|
725 | } else { |
|
726 | WP_CLI::error( __( 'Could not start a new full sync', 'jetpack' ) ); |
|
727 | } |
|
728 | } |
|
729 | ||
730 | // Keep sending to WPCOM until there's nothing to send |
|
731 | $i = 1; |