|
@@ 45-48 (lines=4) @@
|
| 42 |
|
/* translators: %s is the site URL */ |
| 43 |
|
WP_CLI::line( sprintf( __( 'Checking status for %s', 'jetpack' ), esc_url( get_home_url() ) ) ); |
| 44 |
|
|
| 45 |
|
if ( isset( $args[0] ) && 'full' !== $args[0] ) { |
| 46 |
|
/* translators: %s is a command like "prompt" */ |
| 47 |
|
WP_CLI::error( sprintf( __( '%s is not a valid command.', 'jetpack' ), $args[0] ) ); |
| 48 |
|
} |
| 49 |
|
|
| 50 |
|
$master_user_email = Jetpack::get_master_user_email(); |
| 51 |
|
|
|
@@ 744-746 (lines=3) @@
|
| 741 |
|
|
| 742 |
|
// Bail if the option isn't found |
| 743 |
|
$option = isset( $args[1] ) ? Jetpack_Options::get_option( $args[1] ) : false; |
| 744 |
|
if ( isset( $args[1] ) && ! $option && 'update' !== $args[0] ) { |
| 745 |
|
WP_CLI::error( __( 'Option not found or is empty. Use "list" to list option names', 'jetpack' ) ); |
| 746 |
|
} |
| 747 |
|
|
| 748 |
|
// Let's print_r the option if it's an array |
| 749 |
|
// Used in the 'get' and 'list' actions |
|
@@ 1875-1880 (lines=6) @@
|
| 1872 |
|
* @param array $assoc_args Associative parameters defined in the scaffold() method. |
| 1873 |
|
*/ |
| 1874 |
|
public function block( $args, $assoc_args ) { |
| 1875 |
|
if ( isset( $args[1] ) ) { |
| 1876 |
|
$title = ucwords( $args[1] ); |
| 1877 |
|
} else { |
| 1878 |
|
WP_CLI::error( esc_html__( 'The title parameter is required.', 'jetpack' ) . ' 👻' ); |
| 1879 |
|
exit( 1 ); |
| 1880 |
|
} |
| 1881 |
|
|
| 1882 |
|
$slug = isset( $assoc_args['slug'] ) |
| 1883 |
|
? $assoc_args['slug'] |