Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions change_log.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
= 1.5 =
- Updated the plugin to allow its usage as a WP-CLI package.

= 1.4 =
- Fixed an issue where the version comparison performed when using `wp gf update` with an add-on slug uses the Gravity Forms version number.
- Added support for using `--version=beta` with the `wp gf install` and `wp gf update` commands. Add-On beta releases are not currently supported.
Expand Down
2 changes: 1 addition & 1 deletion class-gf-cli.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

// Include the Gravity Forms add-on framework
GFForms::include_addon_framework();
Expand Down
14 changes: 7 additions & 7 deletions cli.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Plugin Name: Gravity Forms CLI
Plugin URI: https://gravityforms.com
Description: Manage Gravity Forms with the WP CLI.
Version: 1.4
Version: 1.5
Author: Rocketgenius
Author URI: https://gravityforms.com
License: GPL-2.0+
Expand All @@ -27,17 +27,15 @@
along with this program. If not, see http://www.gnu.org/licenses.
*/

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

// Defines the current version of the CLI add-on
define( 'GF_CLI_VERSION', '1.4' );
define( 'GF_CLI_VERSION', '1.5' );

define( 'GF_CLI_MIN_GF_VERSION', '1.9.17.8' );

add_action( 'init', array( 'GF_CLI_Bootstrap', 'load_cli' ), 1 );

// After GF is loaded, load the CLI add-on
add_action( 'gform_loaded', array( 'GF_CLI_Bootstrap', 'load_addon' ), 1 );
defined( 'ABSPATH' ) && add_action( 'gform_loaded', array( 'GF_CLI_Bootstrap', 'load_addon' ), 1 );



Expand Down Expand Up @@ -71,7 +69,7 @@ public static function load_cli() {
if ( defined( 'WP_CLI' ) && WP_CLI ) {

// Checks for files within the includes directory, and includes them.
foreach ( glob( plugin_dir_path( __FILE__ ) . 'includes/*.php' ) as $filename ) {
foreach ( glob( dirname( __FILE__ ) . '/includes/*.php' ) as $filename ) {
require_once( $filename );
}
$command_args = array( 'before_invoke' => array( 'GF_CLI_Bootstrap', 'before_invoke' ) );
Expand Down Expand Up @@ -101,6 +99,8 @@ public static function before_invoke() {
}
}

GF_CLI_Bootstrap::load_cli();

/**
* Returns an instance of the GF_CLI class
*
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "gravityforms/gravityformscli",
"description": "A set of WP-CLI commands to manage Gravity Forms.",
"type": "wordpress-plugin",
"type": "wp-cli-package",
"homepage": "https://github.com/gravityforms/gravityformscli",
"support": {
"issues": "https://gravityforms.com"
Expand Down
2 changes: 1 addition & 1 deletion includes/class-gf-cli-entry-notification.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

/**
* Send Gravity Forms Notifications.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-gf-cli-entry.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

/**
* Manage Gravity Forms Entries.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-gf-cli-form-field.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

/**
* Manage Gravity Forms Form Fields.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-gf-cli-form-notification.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

/**
* Manage Gravity Forms Notifications.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-gf-cli-form.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

/**
* Manage Gravity Forms.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-gf-cli-license.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

/**
* Manage the Gravity Forms License Key.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-gf-cli-root.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

/**
* Manage Gravity Forms.
Expand Down
2 changes: 1 addition & 1 deletion includes/class-gf-cli-tool.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php

defined( 'ABSPATH' ) || die();
defined( 'ABSPATH' ) || defined( 'WP_CLI' ) || die();

/**
* Misc Gravity Forms Tools.
Expand Down
2 changes: 1 addition & 1 deletion readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
Contributors: rocketgenius, stevehenty
Tags: gravity forms
Requires at least: 4.2
Tested up to: 5.8
Tested up to: 6.4
Stable tag: 1.4
License: GPL-2.0+
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Expand Down