|
@@ 714-716 (lines=3) @@
|
| 711 |
|
|
| 712 |
|
// Bail if the option isn't found |
| 713 |
|
$option = isset( $args[1] ) ? Jetpack_Options::get_option( $args[1] ) : false; |
| 714 |
|
if ( isset( $args[1] ) && ! $option && 'update' !== $args[0] ) { |
| 715 |
|
WP_CLI::error( __( 'Option not found or is empty. Use "list" to list option names', 'jetpack' ) ); |
| 716 |
|
} |
| 717 |
|
|
| 718 |
|
// Let's print_r the option if it's an array |
| 719 |
|
// Used in the 'get' and 'list' actions |
|
@@ 1800-1805 (lines=6) @@
|
| 1797 |
|
* @param array $assoc_args Associative parameters defined in the scaffold() method. |
| 1798 |
|
*/ |
| 1799 |
|
public function block( $args, $assoc_args ) { |
| 1800 |
|
if ( isset( $args[1] ) ) { |
| 1801 |
|
$title = ucwords( $args[1] ); |
| 1802 |
|
} else { |
| 1803 |
|
WP_CLI::error( esc_html__( 'The title parameter is required.', 'jetpack' ) . ' 👻' ); |
| 1804 |
|
exit( 1 ); |
| 1805 |
|
} |
| 1806 |
|
|
| 1807 |
|
$slug = isset( $assoc_args['slug'] ) |
| 1808 |
|
? $assoc_args['slug'] |