|
@@ 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 |
|
@@ 1843-1848 (lines=6) @@
|
| 1840 |
|
* @param array $assoc_args Associative parameters defined in the scaffold() method. |
| 1841 |
|
*/ |
| 1842 |
|
public function block( $args, $assoc_args ) { |
| 1843 |
|
if ( isset( $args[1] ) ) { |
| 1844 |
|
$title = ucwords( $args[1] ); |
| 1845 |
|
} else { |
| 1846 |
|
WP_CLI::error( esc_html__( 'The title parameter is required.', 'jetpack' ) . ' 👻' ); |
| 1847 |
|
exit( 1 ); |
| 1848 |
|
} |
| 1849 |
|
|
| 1850 |
|
$slug = isset( $assoc_args['slug'] ) |
| 1851 |
|
? $assoc_args['slug'] |