|
@@ 728-730 (lines=3) @@
|
| 725 |
|
|
| 726 |
|
// Bail if the option isn't found |
| 727 |
|
$option = isset( $args[1] ) ? Jetpack_Options::get_option( $args[1] ) : false; |
| 728 |
|
if ( isset( $args[1] ) && ! $option && 'update' !== $args[0] ) { |
| 729 |
|
WP_CLI::error( __( 'Option not found or is empty. Use "list" to list option names', 'jetpack' ) ); |
| 730 |
|
} |
| 731 |
|
|
| 732 |
|
// Let's print_r the option if it's an array |
| 733 |
|
// Used in the 'get' and 'list' actions |
|
@@ 1826-1831 (lines=6) @@
|
| 1823 |
|
* @param array $assoc_args Associative parameters defined in the scaffold() method. |
| 1824 |
|
*/ |
| 1825 |
|
public function block( $args, $assoc_args ) { |
| 1826 |
|
if ( isset( $args[1] ) ) { |
| 1827 |
|
$title = ucwords( $args[1] ); |
| 1828 |
|
} else { |
| 1829 |
|
WP_CLI::error( esc_html__( 'The title parameter is required.', 'jetpack' ) . ' 👻' ); |
| 1830 |
|
exit( 1 ); |
| 1831 |
|
} |
| 1832 |
|
|
| 1833 |
|
$slug = isset( $assoc_args['slug'] ) |
| 1834 |
|
? $assoc_args['slug'] |