|
@@ 39-41 (lines=3) @@
|
| 36 |
|
/* translators: %s is the site URL */ |
| 37 |
|
WP_CLI::line( sprintf( __( 'Checking status for %s', 'jetpack' ), esc_url( get_home_url() ) ) ); |
| 38 |
|
|
| 39 |
|
if ( isset( $args[0] ) && 'full' !== $args[0] ) { |
| 40 |
|
/* translators: %s is a command like "prompt" */ |
| 41 |
|
WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $args[0] ) ); |
| 42 |
|
} |
| 43 |
|
|
| 44 |
|
$master_user_email = Jetpack::get_master_user_email(); |
|
@@ 725-727 (lines=3) @@
|
| 722 |
|
|
| 723 |
|
// Bail if the option isn't found |
| 724 |
|
$option = isset( $args[1] ) ? Jetpack_Options::get_option( $args[1] ) : false; |
| 725 |
|
if ( isset( $args[1] ) && ! $option && 'update' !== $args[0] ) { |
| 726 |
|
WP_CLI::error( __( 'Option not found or is empty. Use "list" to list option names', 'jetpack' ) ); |
| 727 |
|
} |
| 728 |
|
|
| 729 |
|
// Let's print_r the option if it's an array |
| 730 |
|
// Used in the 'get' and 'list' actions |
|
@@ 1825-1830 (lines=6) @@
|
| 1822 |
|
* @param array $assoc_args Associative parameters defined in the scaffold() method. |
| 1823 |
|
*/ |
| 1824 |
|
public function block( $args, $assoc_args ) { |
| 1825 |
|
if ( isset( $args[1] ) ) { |
| 1826 |
|
$title = ucwords( $args[1] ); |
| 1827 |
|
} else { |
| 1828 |
|
WP_CLI::error( esc_html__( 'The title parameter is required.', 'jetpack' ) . ' 👻' ); |
| 1829 |
|
exit( 1 ); |
| 1830 |
|
} |
| 1831 |
|
|
| 1832 |
|
$slug = isset( $assoc_args['slug'] ) |
| 1833 |
|
? $assoc_args['slug'] |