@@ 720-722 (lines=3) @@ | ||
717 | ||
718 | // Bail if the option isn't found |
|
719 | $option = isset( $args[1] ) ? Jetpack_Options::get_option( $args[1] ) : false; |
|
720 | if ( isset( $args[1] ) && ! $option && 'update' !== $args[0] ) { |
|
721 | WP_CLI::error( __( 'Option not found or is empty. Use "list" to list option names', 'jetpack' ) ); |
|
722 | } |
|
723 | ||
724 | // Let's print_r the option if it's an array |
|
725 | // Used in the 'get' and 'list' actions |
|
@@ 1818-1823 (lines=6) @@ | ||
1815 | * @param array $assoc_args Associative parameters defined in the scaffold() method. |
|
1816 | */ |
|
1817 | public function block( $args, $assoc_args ) { |
|
1818 | if ( isset( $args[1] ) ) { |
|
1819 | $title = ucwords( $args[1] ); |
|
1820 | } else { |
|
1821 | WP_CLI::error( esc_html__( 'The title parameter is required.', 'jetpack' ) . ' 👻' ); |
|
1822 | exit( 1 ); |
|
1823 | } |
|
1824 | ||
1825 | $slug = isset( $assoc_args['slug'] ) |
|
1826 | ? $assoc_args['slug'] |