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