|
@@ 492-499 (lines=8) @@
|
| 489 |
|
* Done here because it's easier to read the $whitelist array after it's been rebuilt |
| 490 |
|
*/ |
| 491 |
|
if ( isset( $args[1] ) && 'list' == $args[1] ) { |
| 492 |
|
if ( ! empty( $whitelist ) ) { |
| 493 |
|
WP_CLI::success( __( 'Here are your whitelisted IPs:', 'jetpack' ) ); |
| 494 |
|
foreach ( $whitelist as $ip ) { |
| 495 |
|
WP_CLI::line( "\t" . str_pad( $ip, 24 ) ) ; |
| 496 |
|
} |
| 497 |
|
} else { |
| 498 |
|
WP_CLI::line( __( 'Whitelist is empty.', "jetpack" ) ) ; |
| 499 |
|
} |
| 500 |
|
break; |
| 501 |
|
} |
| 502 |
|
|
|
@@ 745-755 (lines=11) @@
|
| 742 |
|
} else { |
| 743 |
|
WP_CLI::log( __( 'Initialized a new full sync', 'jetpack' ) ); |
| 744 |
|
} |
| 745 |
|
} else { |
| 746 |
|
|
| 747 |
|
// Reset sync settings to original. |
| 748 |
|
Jetpack_Sync_Settings::update_settings( $original_settings ); |
| 749 |
|
|
| 750 |
|
if ( $modules ) { |
| 751 |
|
WP_CLI::error( sprintf( __( 'Could not start a new full sync with modules: %s', 'jetpack' ), join( ', ', $modules ) ) ); |
| 752 |
|
} else { |
| 753 |
|
WP_CLI::error( __( 'Could not start a new full sync', 'jetpack' ) ); |
| 754 |
|
} |
| 755 |
|
} |
| 756 |
|
|
| 757 |
|
// Keep sending to WPCOM until there's nothing to send |
| 758 |
|
$i = 1; |