diff --git a/change_log.txt b/change_log.txt index 9100dff..4e04dce 100644 --- a/change_log.txt +++ b/change_log.txt @@ -1,7 +1,12 @@ +## 2.1.0 | 2024-05-15 +- Added Gravity Forms license key to the oAuth process. +- Added support for async (background) feed processing to improve form submission performance. +- Fixed an issue that causes a PHP deprecation notice to display on the Settings page when using PHP 8.1. + ## 2.0 | 2021-07-07 - Updated authentication method for enhanced security. Important: Manual re-authentication in the add-on suggested. - Fixed an issue where the Add-on icon is missing on the Form Settings page for Gravity Forms 2.5. -- Deprecated old authentication method. Authentication will continue to work until removed. +- Deprecated old authentication method. Authentication will continue to work until removed. ### 1.4 | 2020-09-09 diff --git a/class-gf-trello.php b/class-gf-trello.php index 2b507bf..b454ac6 100644 --- a/class-gf-trello.php +++ b/class-gf-trello.php @@ -161,6 +161,15 @@ class GFTrello extends GFFeedAddOn { */ protected $trello_app_key; + /** + * Enabling background feed processing to prevent performance issues delaying form submission completion. + * + * @since 2.1 + * + * @var bool + */ + protected $_async_feed_processing = true; + /** * Version of this add-on which requires re authentication with the API. * @@ -341,6 +350,12 @@ private function save_access_token( $token ) { } $settings = $this->get_plugin_settings(); + + // Here $settings could be set to false, if so then will be converted to an array. + if ( ! is_array( $settings ) ) { + $settings = array(); + } + $settings['authToken'] = $token; $settings['reauth_version'] = self::LAST_REAUTHENTICATION_VERSION; // Set the API authentication version. $this->update_plugin_settings( $settings ); @@ -570,6 +585,7 @@ private function get_auth_url() { array( 'redirect_to' => urlencode( admin_url( 'admin.php?page=gf_settings&subview=' . $this->_slug ) ), 'state' => $nonce, + 'license' => GFCommon::get_key(), ), $this->get_gravity_api_url( '/auth/trello' ) ); diff --git a/js/admin.min.js b/js/admin.min.js index c30d829..f5f2e3d 100644 --- a/js/admin.min.js +++ b/js/admin.min.js @@ -1 +1 @@ -!function(a){a(document).ready(function(){a("#tab_gravityformstrello #gform-settings-save").hide(),a("#gform_trello_deauth_button").on("click",function(t){t.preventDefault();var e=a(this);if(e.attr("disabled","disabled"),gform_trello_admin_strings.requires_reauth)return a("input#authToken").val(""),void a("#gform-settings-save").trigger("click");a.ajax({async:!0,url:ajaxurl,dataType:"json",method:"POST",data:{action:"gf_trello_deauthorize",nonce:gform_trello_admin_strings.deauth_nonce},success:function(t){t.success&&1==t.success?location.reload():window.alert(t.data.message)}}).fail(function(t,e,a){window.alert(a)}).always(function(){e.removeAttr("disabled")})})})}(jQuery); \ No newline at end of file +!function(a){a(document).ready(function(){a("#tab_gravityformstrello #gform-settings-save").hide(),a("#gform_trello_deauth_button").on("click",function(t){t.preventDefault();var e=a(this);e.attr("disabled","disabled"),gform_trello_admin_strings.requires_reauth?(a("input#authToken").val(""),a("#gform-settings-save").trigger("click")):a.ajax({async:!0,url:ajaxurl,dataType:"json",method:"POST",data:{action:"gf_trello_deauthorize",nonce:gform_trello_admin_strings.deauth_nonce},success:function(t){t.success&&1==t.success?location.reload():window.alert(t.data.message)}}).fail(function(t,e,a){window.alert(a)}).always(function(){e.removeAttr("disabled")})})})}(jQuery); \ No newline at end of file diff --git a/languages/gravityformstrello-ar.mo b/languages/gravityformstrello-ar.mo deleted file mode 100644 index 8cdd11e..0000000 Binary files a/languages/gravityformstrello-ar.mo and /dev/null differ diff --git a/languages/gravityformstrello-ca.mo b/languages/gravityformstrello-ca.mo deleted file mode 100644 index f9f644d..0000000 Binary files a/languages/gravityformstrello-ca.mo and /dev/null differ diff --git a/languages/gravityformstrello-da_DK.mo b/languages/gravityformstrello-da_DK.mo deleted file mode 100644 index 7ec094f..0000000 Binary files a/languages/gravityformstrello-da_DK.mo and /dev/null differ diff --git a/languages/gravityformstrello-de_DE.mo b/languages/gravityformstrello-de_DE.mo deleted file mode 100644 index 183003f..0000000 Binary files a/languages/gravityformstrello-de_DE.mo and /dev/null differ diff --git a/languages/gravityformstrello-de_DE_formal.mo b/languages/gravityformstrello-de_DE_formal.mo deleted file mode 100644 index 809f83e..0000000 Binary files a/languages/gravityformstrello-de_DE_formal.mo and /dev/null differ diff --git a/languages/gravityformstrello-en_AU.mo b/languages/gravityformstrello-en_AU.mo deleted file mode 100644 index 350bf6d..0000000 Binary files a/languages/gravityformstrello-en_AU.mo and /dev/null differ diff --git a/languages/gravityformstrello-en_GB.mo b/languages/gravityformstrello-en_GB.mo deleted file mode 100644 index 063727c..0000000 Binary files a/languages/gravityformstrello-en_GB.mo and /dev/null differ diff --git a/languages/gravityformstrello-es_ES.mo b/languages/gravityformstrello-es_ES.mo deleted file mode 100644 index 04b834a..0000000 Binary files a/languages/gravityformstrello-es_ES.mo and /dev/null differ diff --git a/languages/gravityformstrello-fi.mo b/languages/gravityformstrello-fi.mo deleted file mode 100644 index ca585c7..0000000 Binary files a/languages/gravityformstrello-fi.mo and /dev/null differ diff --git a/languages/gravityformstrello-fr_CA.mo b/languages/gravityformstrello-fr_CA.mo deleted file mode 100644 index 1c9b40e..0000000 Binary files a/languages/gravityformstrello-fr_CA.mo and /dev/null differ diff --git a/languages/gravityformstrello-fr_FR.mo b/languages/gravityformstrello-fr_FR.mo deleted file mode 100644 index e33e1f4..0000000 Binary files a/languages/gravityformstrello-fr_FR.mo and /dev/null differ diff --git a/languages/gravityformstrello-he_IL.mo b/languages/gravityformstrello-he_IL.mo deleted file mode 100644 index 87a5075..0000000 Binary files a/languages/gravityformstrello-he_IL.mo and /dev/null differ diff --git a/languages/gravityformstrello-hi_IN.mo b/languages/gravityformstrello-hi_IN.mo deleted file mode 100644 index 201091d..0000000 Binary files a/languages/gravityformstrello-hi_IN.mo and /dev/null differ diff --git a/languages/gravityformstrello-hu_HU.mo b/languages/gravityformstrello-hu_HU.mo deleted file mode 100644 index a36a896..0000000 Binary files a/languages/gravityformstrello-hu_HU.mo and /dev/null differ diff --git a/languages/gravityformstrello-it_IT.mo b/languages/gravityformstrello-it_IT.mo deleted file mode 100644 index 5f2360e..0000000 Binary files a/languages/gravityformstrello-it_IT.mo and /dev/null differ diff --git a/languages/gravityformstrello-ja.mo b/languages/gravityformstrello-ja.mo deleted file mode 100644 index 0665731..0000000 Binary files a/languages/gravityformstrello-ja.mo and /dev/null differ diff --git a/languages/gravityformstrello-nb_NO.mo b/languages/gravityformstrello-nb_NO.mo deleted file mode 100644 index 91618a5..0000000 Binary files a/languages/gravityformstrello-nb_NO.mo and /dev/null differ diff --git a/languages/gravityformstrello-nl_BE.mo b/languages/gravityformstrello-nl_BE.mo deleted file mode 100644 index 64b4f5d..0000000 Binary files a/languages/gravityformstrello-nl_BE.mo and /dev/null differ diff --git a/languages/gravityformstrello-nl_NL.mo b/languages/gravityformstrello-nl_NL.mo deleted file mode 100644 index ab48484..0000000 Binary files a/languages/gravityformstrello-nl_NL.mo and /dev/null differ diff --git a/languages/gravityformstrello-pt_BR.mo b/languages/gravityformstrello-pt_BR.mo deleted file mode 100644 index de4b1b9..0000000 Binary files a/languages/gravityformstrello-pt_BR.mo and /dev/null differ diff --git a/languages/gravityformstrello-pt_PT.mo b/languages/gravityformstrello-pt_PT.mo deleted file mode 100644 index b699ce3..0000000 Binary files a/languages/gravityformstrello-pt_PT.mo and /dev/null differ diff --git a/languages/gravityformstrello-ru_RU.mo b/languages/gravityformstrello-ru_RU.mo deleted file mode 100644 index 9a1b5f0..0000000 Binary files a/languages/gravityformstrello-ru_RU.mo and /dev/null differ diff --git a/languages/gravityformstrello-sv_SE.mo b/languages/gravityformstrello-sv_SE.mo deleted file mode 100644 index 354813d..0000000 Binary files a/languages/gravityformstrello-sv_SE.mo and /dev/null differ diff --git a/languages/gravityformstrello-tr_TR.mo b/languages/gravityformstrello-tr_TR.mo deleted file mode 100644 index f57d96e..0000000 Binary files a/languages/gravityformstrello-tr_TR.mo and /dev/null differ diff --git a/languages/gravityformstrello-zh_CN.mo b/languages/gravityformstrello-zh_CN.mo deleted file mode 100644 index a143298..0000000 Binary files a/languages/gravityformstrello-zh_CN.mo and /dev/null differ diff --git a/languages/gravityformstrello.pot b/languages/gravityformstrello.pot index a94e11f..b93945c 100644 --- a/languages/gravityformstrello.pot +++ b/languages/gravityformstrello.pot @@ -1,17 +1,17 @@ -# Copyright (C) 2021 Gravity Forms +# Copyright (C) 2024 Gravity Forms # This file is distributed under the GPL-2.0+. msgid "" msgstr "" -"Project-Id-Version: Gravity Forms Trello Add-On 2.0\n" +"Project-Id-Version: Gravity Forms Trello Add-On 2.1.0\n" "Report-Msgid-Bugs-To: https://gravityforms.com/support\n" "Last-Translator: Gravity Forms \n" "Language-Team: Gravity Forms \n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -"POT-Creation-Date: 2021-07-07T14:33:00+00:00\n" +"POT-Creation-Date: 2024-05-15T16:01:02+00:00\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" -"X-Generator: WP-CLI 2.4.0\n" +"X-Generator: WP-CLI 2.8.1\n" "X-Domain: gravityformstrello\n" #. Plugin Name of the plugin @@ -31,153 +31,153 @@ msgstr "" msgid "Gravity Forms" msgstr "" -#: class-gf-trello.php:209 +#: class-gf-trello.php:218 msgid "Create Trello card only when payment is received." msgstr "" -#: class-gf-trello.php:247 +#: class-gf-trello.php:256 msgid "Access denied." msgstr "" -#: class-gf-trello.php:277 +#: class-gf-trello.php:286 msgid "Unable to revoke token at Trello." msgstr "" -#: class-gf-trello.php:304 +#: class-gf-trello.php:313 msgid "Unable to connect to Trello due to mismatched state." msgstr "" -#: class-gf-trello.php:311 +#: class-gf-trello.php:320 msgid "Unable to connect your Trello account." msgstr "" -#: class-gf-trello.php:466 +#: class-gf-trello.php:481 msgid "Authorize with Trello" msgstr "" -#: class-gf-trello.php:518 +#: class-gf-trello.php:533 msgid "Click here to authenticate your Trello account." msgstr "" -#: class-gf-trello.php:523 +#: class-gf-trello.php:538 msgid "Trello has been authenticated with your account." msgstr "" -#: class-gf-trello.php:527 +#: class-gf-trello.php:542 msgid "De-Authorize Trello" msgstr "" -#: class-gf-trello.php:608 +#: class-gf-trello.php:624 msgid "Feed Name" msgstr "" -#: class-gf-trello.php:615 -#: class-gf-trello.php:649 -#: class-gf-trello.php:1123 +#: class-gf-trello.php:631 +#: class-gf-trello.php:665 +#: class-gf-trello.php:1139 msgid "Name" msgstr "" -#: class-gf-trello.php:616 +#: class-gf-trello.php:632 msgid "Enter a feed name to uniquely identify this setup." msgstr "" -#: class-gf-trello.php:621 -#: class-gf-trello.php:1124 +#: class-gf-trello.php:637 +#: class-gf-trello.php:1140 msgid "Trello Board" msgstr "" -#: class-gf-trello.php:626 +#: class-gf-trello.php:642 msgid "You must have at least one Trello board in your account." msgstr "" -#: class-gf-trello.php:630 -#: class-gf-trello.php:1125 +#: class-gf-trello.php:646 +#: class-gf-trello.php:1141 msgid "Trello List" msgstr "" -#: class-gf-trello.php:636 +#: class-gf-trello.php:652 msgid "You must select a Trello board containing lists." msgstr "" -#: class-gf-trello.php:641 +#: class-gf-trello.php:657 msgid "Card Settings" msgstr "" -#: class-gf-trello.php:657 +#: class-gf-trello.php:673 msgid "Description" msgstr "" -#: class-gf-trello.php:662 +#: class-gf-trello.php:678 msgid "Due Date" msgstr "" -#: class-gf-trello.php:663 +#: class-gf-trello.php:679 msgid "days after today" msgstr "" -#: class-gf-trello.php:670 +#: class-gf-trello.php:686 msgid "Labels" msgstr "" -#: class-gf-trello.php:676 +#: class-gf-trello.php:692 msgid "Members" msgstr "" -#: class-gf-trello.php:682 +#: class-gf-trello.php:698 msgid "Feed Conditional Logic" msgstr "" -#: class-gf-trello.php:688 -#: class-gf-trello.php:693 +#: class-gf-trello.php:704 +#: class-gf-trello.php:709 msgid "Conditional Logic" msgstr "" -#: class-gf-trello.php:689 +#: class-gf-trello.php:705 msgid "Enable" msgstr "" -#: class-gf-trello.php:690 +#: class-gf-trello.php:706 msgid "Export to Trello if" msgstr "" -#: class-gf-trello.php:694 +#: class-gf-trello.php:710 msgid "When conditional logic is enabled, form submissions will only be exported to Trello when the condition is met. When disabled, all form submissions will be posted." msgstr "" -#: class-gf-trello.php:711 +#: class-gf-trello.php:727 msgid "Attachments" msgstr "" -#: class-gf-trello.php:772 +#: class-gf-trello.php:788 msgid "Select a Board" msgstr "" -#: class-gf-trello.php:842 +#: class-gf-trello.php:858 msgid "Select a List" msgstr "" -#: class-gf-trello.php:1226 +#: class-gf-trello.php:1242 msgid "Card was not created because API could not be initialized." msgstr "" -#: class-gf-trello.php:1296 +#: class-gf-trello.php:1312 msgid "Card could not be created because no name was provided." msgstr "" -#: class-gf-trello.php:1313 -#: class-gf-trello.php:1322 +#: class-gf-trello.php:1329 +#: class-gf-trello.php:1338 msgid "Card could not be created." msgstr "" -#: class-gf-trello.php:1347 +#: class-gf-trello.php:1363 msgid "Label could not be added to card." msgstr "" -#: class-gf-trello.php:1389 +#: class-gf-trello.php:1405 msgid "File \"%s\" could not be attached to card. %s" msgstr "" #. translators: 1: open tag, 2: close tag -#: class-gf-trello.php:1417 +#: class-gf-trello.php:1433 msgid "Gravity Forms Trello requires re-authentication; %1$sPlease disconnect and re-connect%2$s to continue using this add-on." msgstr "" diff --git a/trello.php b/trello.php index 4bb17f0..c02b5e2 100644 --- a/trello.php +++ b/trello.php @@ -9,7 +9,7 @@ Plugin Name: Gravity Forms Trello Add-On Plugin URI: https://gravityforms.com Description: Integrates Gravity Forms with Trello -Version: 2.0 +Version: 2.1.0 Author: Gravity Forms Author URI: https://gravityforms.com License: GPL-2.0+ @@ -17,7 +17,7 @@ Domain Path: /languages ------------------------------------------------------------------------ -Copyright 2009-2020 Rocketgenius, Inc. +Copyright 2009-2024 Rocketgenius, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -34,7 +34,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ -define( 'GF_TRELLO_VERSION', '2.0' ); +define( 'GF_TRELLO_VERSION', '2.1.0' ); // If Gravity Forms is loaded, bootstrap the Trello Add-On. add_action( 'gform_loaded', array( 'GF_Trello_Bootstrap', 'load' ), 5 );