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