|
@@ 42-44 (lines=3) @@
|
| 39 |
|
/* translators: %s is the site URL */ |
| 40 |
|
WP_CLI::line( sprintf( __( 'Checking status for %s', 'jetpack' ), esc_url( get_home_url() ) ) ); |
| 41 |
|
|
| 42 |
|
if ( isset( $args[0] ) && 'full' !== $args[0] ) { |
| 43 |
|
/* translators: %s is a command like "prompt" */ |
| 44 |
|
WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $args[0] ) ); |
| 45 |
|
} |
| 46 |
|
|
| 47 |
|
$master_user_email = Jetpack::get_master_user_email(); |
|
@@ 727-729 (lines=3) @@
|
| 724 |
|
|
| 725 |
|
// Bail if the option isn't found |
| 726 |
|
$option = isset( $args[1] ) ? Jetpack_Options::get_option( $args[1] ) : false; |
| 727 |
|
if ( isset( $args[1] ) && ! $option && 'update' !== $args[0] ) { |
| 728 |
|
WP_CLI::error( __( 'Option not found or is empty. Use "list" to list option names', 'jetpack' ) ); |
| 729 |
|
} |
| 730 |
|
|
| 731 |
|
// Let's print_r the option if it's an array |
| 732 |
|
// Used in the 'get' and 'list' actions |
|
@@ 1842-1847 (lines=6) @@
|
| 1839 |
|
* @param array $assoc_args Associative parameters defined in the scaffold() method. |
| 1840 |
|
*/ |
| 1841 |
|
public function block( $args, $assoc_args ) { |
| 1842 |
|
if ( isset( $args[1] ) ) { |
| 1843 |
|
$title = ucwords( $args[1] ); |
| 1844 |
|
} else { |
| 1845 |
|
WP_CLI::error( esc_html__( 'The title parameter is required.', 'jetpack' ) . ' 👻' ); |
| 1846 |
|
exit( 1 ); |
| 1847 |
|
} |
| 1848 |
|
|
| 1849 |
|
$slug = isset( $assoc_args['slug'] ) |
| 1850 |
|
? $assoc_args['slug'] |