Skip to content

Commit 3e58946

Browse files
authored
Fix network activate install flag (#26)
* Fix network activate install flag * bump version; update changelog
1 parent 60b477b commit 3e58946

File tree

3 files changed

+12
-9
lines changed

3 files changed

+12
-9
lines changed

cli.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,15 @@
33
Plugin Name: Gravity Forms CLI
44
Plugin URI: http://www.gravityforms.com
55
Description: Manage Gravity Forms with the WP CLI.
6-
Version: 1.1.2
6+
Version: 1.1.3
77
Author: Rocketgenius
88
Author URI: http://www.gravityforms.com
99
License: GPL-2.0+
1010
Text Domain: gravityformscli
1111
Domain Path: /languages
1212
1313
------------------------------------------------------------------------
14-
Copyright 2016-2019 Rocketgenius, Inc.
14+
Copyright 2016-2020 Rocketgenius, Inc.
1515
1616
This program is free software; you can redistribute it and/or modify
1717
it under the terms of the GNU General Public License as published by
@@ -30,7 +30,7 @@
3030
defined( 'ABSPATH' ) || die();
3131

3232
// Defines the current version of the CLI add-on
33-
define( 'GF_CLI_VERSION', '1.1.2' );
33+
define( 'GF_CLI_VERSION', '1.1.3' );
3434

3535
define( 'GF_CLI_MIN_GF_VERSION', '1.9.17.8' );
3636

includes/class-gf-cli-root.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public function version( $args, $assoc_args ) {
7979
* [--activate]
8080
* : If set, the plugin will be activated immediately after install.
8181
*
82-
* [--network-activate]
82+
* [--activate-network]
8383
* : If set, the plugin will be network activated immediately after install
8484
*
8585
*
@@ -89,7 +89,7 @@ public function version( $args, $assoc_args ) {
8989
* wp gf install --force
9090
* wp gf install --key=[A valid Gravity Forms License Key]
9191
* wp gf install gravityformspolls key=[1234ABC]
92-
* @synopsis [<slug>] [--key=<key>] [--version=<version>] [--force] [--activate] [--network-activate]
92+
* @synopsis [<slug>] [--key=<key>] [--version=<version>] [--force] [--activate] [--activate-network]
9393
*/
9494
public function install( $args, $assoc_args ) {
9595
$slug = isset( $args[0] ) ? $args[0] : 'gravityforms';
@@ -122,7 +122,7 @@ public function install( $args, $assoc_args ) {
122122

123123
$activate = WP_CLI\Utils\get_flag_value( $assoc_args, 'activate', false );
124124

125-
$network_activate = WP_CLI\Utils\get_flag_value( $assoc_args, 'network-activate', false );
125+
$activate_network = WP_CLI\Utils\get_flag_value( $assoc_args, 'activate-network', false );
126126

127127
$command = sprintf( 'plugin install "%s"', $download_url );
128128

@@ -138,9 +138,9 @@ public function install( $args, $assoc_args ) {
138138
$command .= ' --activate';
139139
}
140140

141-
if ( $network_activate ) {
142-
$install_assoc_args['network-activate'] = true;
143-
$command .= ' --network-activate';
141+
if ( $activate_network ) {
142+
$install_assoc_args['activate-network'] = true;
143+
$command .= ' --activate-network';
144144
}
145145

146146
$options = array(

readme.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -181,6 +181,9 @@ https://www.gravityforms.com/open-support-ticket/
181181

182182
== ChangeLog ==
183183

184+
= 1.1.3 =
185+
- Fixed an issue where the install command could not network activate plugins.
186+
184187
= 1.1.2 =
185188
- Updated the ids format of the entry list command to support the page-size and offset args. Credit: Ulrich Pogson.
186189
- Updated the form export command to support the optional filename arg e.g. wp gf form export 1 --filename=testing.json. Credit: Timothy Decker.

0 commit comments

Comments
 (0)