Skip to content

Commit c6ca68b

Browse files
committed
Use get_flag_value
1 parent 11afbb3 commit c6ca68b

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

src/Plugin_Command.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -593,7 +593,7 @@ protected function install_from_repo( $slug, $assoc_args ) {
593593
return $api;
594594
}
595595

596-
if ( isset( $assoc_args['version'] ) || isset( $assoc_args['ignore-requirements'] ) ) {
596+
if ( isset( $assoc_args['version'] ) || Utils\get_flag_value( $assoc_args, 'ignore-requirements' ) ) {
597597
self::alter_api_response( $api, $assoc_args['version'] );
598598
} else {
599599
$requires_php = isset( $api->requires_php ) ? $api->requires_php : null;
@@ -916,7 +916,8 @@ protected function filter_item_list( $items, $args ) {
916916
* for confirmation.
917917
*
918918
* [--ignore-requirements]
919-
* :If set, the command will install the plugin while ignoring any requirements specified by the plugin authors.
919+
* :If set, the command will install the plugin while ignoring any WordPress or PHP version requirements
920+
* specified by the plugin authors.
920921
*
921922
* [--activate]
922923
* : If set, the plugin will be activated immediately after install.

src/Theme_Command.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,7 @@ protected function install_from_repo( $slug, $assoc_args ) {
406406
return $api;
407407
}
408408

409-
if ( isset( $assoc_args['version'] ) || isset( $assoc_args['ignore-requirements'] ) ) {
409+
if ( isset( $assoc_args['version'] ) || Utils\get_flag_value( $assoc_args, 'ignore-requirements' ) ) {
410410
self::alter_api_response( $api, $assoc_args['version'] );
411411
} else {
412412
$requires_php = isset( $api->requires_php ) ? $api->requires_php : null;
@@ -482,7 +482,8 @@ protected function filter_item_list( $items, $args ) {
482482
* for confirmation.
483483
*
484484
* [--ignore-requirements]
485-
* : If set, the command will install the theme while ignoring any requirements specified by the theme authors.
485+
* : If set, the command will install the theme while ignoring any WordPress or PHP version requirements
486+
* specified by the theme authors.
486487
*
487488
* [--activate]
488489
* : If set, the theme will be activated immediately after install.

0 commit comments

Comments
 (0)