Crowdsignal Forms - Version 1.1.1

Version Description

Download this release

Release Info

Developer cgastrell
Plugin Icon wp plugin Crowdsignal Forms
Version 1.1.1
Comparing to
See all releases

Code changes from version 1.1.0 to 1.1.1

README.TXT CHANGED
@@ -4,7 +4,7 @@ Tags: polls, forms, surveys, gutenberg, block
4
  Requires at least: 5.0
5
  Requires PHP: 5.6.20
6
  Tested up to: 5.4.2
7
- Stable tag: 1.1.0
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -66,6 +66,10 @@ Compare our [simple and affordable plans](https://crowdsignal.com/pricing/) or t
66
  4. Use the poll block inside of other blocks
67
 
68
  == Changelog ==
 
 
 
 
69
  = 1.1.0 =
70
  * Implement a poll width setting
71
  * fix method used when updating poll ids in post meta
4
  Requires at least: 5.0
5
  Requires PHP: 5.6.20
6
  Tested up to: 5.4.2
7
+ Stable tag: 1.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
66
  4. Use the poll block inside of other blocks
67
 
68
  == Changelog ==
69
+ = 1.1.1 =
70
+ * Don't Request User Code on Save if there is nothing to save
71
+ * Skip the setup screen if a user code is saved
72
+
73
  = 1.1.0 =
74
  * Implement a poll width setting
75
  * fix method used when updating poll ids in post meta
changelog.txt CHANGED
@@ -1,20 +1,24 @@
1
- = 1.1.0 =
2
- * Implement a poll width setting (#255)
3
- * fix method used when updating poll ids in post meta (#257)
4
- * Fix archiving of poll blocks in comments (#256)
5
- * Address the comments from the p2tenberg compatibility pr. (#252)
6
- * P2tenberg: Get The Edit Bar To Display in p2tenberg (#254)
7
- * keep button placeholder on focus of button answers for a less jarring editing experience (#242)
8
- * P2tenberg compatibility (#175)
9
- * Change radio/checkbox fill colour to text colour (#241)
10
- * Add release preparation script (#240)
11
- * Add Button Answer Type (with actual buttons) (#230)
12
- * Add a link for crowdsignal.com In Sidebar for an Unpublished Poll (#239)
13
- * remove ios styling from submit button (#225)
14
- * Move asset definitions to the `block` class to simplify adding new blocks (#224)
15
- * update branches that travis will build (#233)
16
- * Add wp-editor dependency
17
-
 
 
 
 
18
  = 1.0 =
19
  * Update default sidebar status
20
  * Increase Default Poll Margins
1
+ = 1.1.1 =
2
+ * Don't Request User Code on Save if there is nothing to save (#284)
3
+ * Skip the setup screen if a user code is saved (#282)
4
+
5
+ = 1.1.0 =
6
+ * Implement a poll width setting (#255)
7
+ * fix method used when updating poll ids in post meta (#257)
8
+ * Fix archiving of poll blocks in comments (#256)
9
+ * Address the comments from the p2tenberg compatibility pr. (#252)
10
+ * P2tenberg: Get The Edit Bar To Display in p2tenberg (#254)
11
+ * keep button placeholder on focus of button answers for a less jarring editing experience (#242)
12
+ * P2tenberg compatibility (#175)
13
+ * Change radio/checkbox fill colour to text colour (#241)
14
+ * Add release preparation script (#240)
15
+ * Add Button Answer Type (with actual buttons) (#230)
16
+ * Add a link for crowdsignal.com In Sidebar for an Unpublished Poll (#239)
17
+ * remove ios styling from submit button (#225)
18
+ * Move asset definitions to the `block` class to simplify adding new blocks (#224)
19
+ * update branches that travis will build (#233)
20
+ * Add wp-editor dependency
21
+
22
  = 1.0 =
23
  * Update default sidebar status
24
  * Increase Default Poll Margins
crowdsignal-forms.php CHANGED
@@ -15,7 +15,7 @@
15
  * Plugin Name: Crowdsignal Forms
16
  * Plugin URI: https://crowdsignal.com/crowdsignal-forms/
17
  * Description: Crowdsignal Form Blocks
18
- * Version: 1.1.0
19
  * Author: Automattic
20
  * Author URI: https://automattic.com/
21
  * License: GPL-2.0+
@@ -28,7 +28,7 @@ if ( ! defined( 'ABSPATH' ) ) {
28
  die;
29
  }
30
 
31
- define( 'CROWDSIGNAL_FORMS_VERSION', '1.1.0' );
32
  define( 'CROWDSIGNAL_FORMS_PLUGIN_FILE', __FILE__ );
33
  define( 'CROWDSIGNAL_FORMS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
34
 
15
  * Plugin Name: Crowdsignal Forms
16
  * Plugin URI: https://crowdsignal.com/crowdsignal-forms/
17
  * Description: Crowdsignal Form Blocks
18
+ * Version: 1.1.1
19
  * Author: Automattic
20
  * Author URI: https://automattic.com/
21
  * License: GPL-2.0+
28
  die;
29
  }
30
 
31
+ define( 'CROWDSIGNAL_FORMS_VERSION', '1.1.1' );
32
  define( 'CROWDSIGNAL_FORMS_PLUGIN_FILE', __FILE__ );
33
  define( 'CROWDSIGNAL_FORMS_PLUGIN_BASENAME', plugin_basename( __FILE__ ) );
34
 
includes/admin/class-crowdsignal-forms-settings.php CHANGED
@@ -42,7 +42,7 @@ class Crowdsignal_Forms_Settings {
42
  * Enqueues scripts for setup page.
43
  */
44
  public function admin_enqueue_scripts() {
45
- wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.1.0' );
46
  }
47
 
48
  /**
42
  * Enqueues scripts for setup page.
43
  */
44
  public function admin_enqueue_scripts() {
45
+ wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.1.1' );
46
  }
47
 
48
  /**
includes/admin/class-crowdsignal-forms-setup.php CHANGED
@@ -64,7 +64,7 @@ class Crowdsignal_Forms_Setup {
64
  * Enqueues scripts for setup page.
65
  */
66
  public function admin_enqueue_scripts() {
67
- wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.1.0' );
68
  wp_enqueue_script( 'videopress', 'https://videopress.com/videopress-iframe.js', array(), '1.0', false );
69
  }
70
 
64
  * Enqueues scripts for setup page.
65
  */
66
  public function admin_enqueue_scripts() {
67
+ wp_enqueue_style( 'admin-styles', plugin_dir_url( __FILE__ ) . '/admin-styles.css', array(), '1.1.1' );
68
  wp_enqueue_script( 'videopress', 'https://videopress.com/videopress-iframe.js', array(), '1.0', false );
69
  }
70
 
includes/auth/class-crowdsignal-forms-api-authenticator.php CHANGED
@@ -61,6 +61,14 @@ class Crowdsignal_Forms_Api_Authenticator {
61
  return $user_code;
62
  }
63
 
 
 
 
 
 
 
 
 
64
  /**
65
  * Get the Crowdsignal API key.
66
  *
61
  return $user_code;
62
  }
63
 
64
+ /**
65
+ * Checks if a Crowdsignal user code has already been retrieved.
66
+ */
67
+ public function has_user_code() {
68
+ $user_code = get_option( self::USER_CODE_NAME );
69
+ return ! empty( $user_code );
70
+ }
71
+
72
  /**
73
  * Get the Crowdsignal API key.
74
  *
includes/class-crowdsignal-forms.php CHANGED
@@ -171,6 +171,12 @@ final class Crowdsignal_Forms {
171
  public function activate_redirect() {
172
  if ( get_option( 'crowdsignal_forms_do_activation_redirect', false ) ) {
173
  delete_option( 'crowdsignal_forms_do_activation_redirect' );
 
 
 
 
 
 
174
  wp_safe_redirect( admin_url( 'admin.php?page=crowdsignal-forms-setup' ) );
175
  exit();
176
  }
171
  public function activate_redirect() {
172
  if ( get_option( 'crowdsignal_forms_do_activation_redirect', false ) ) {
173
  delete_option( 'crowdsignal_forms_do_activation_redirect' );
174
+
175
+ // If a user code is set, skip the redirect.
176
+ if ( get_option( Crowdsignal_Forms_Api_Authenticator::USER_CODE_NAME ) ) {
177
+ return;
178
+ }
179
+
180
  wp_safe_redirect( admin_url( 'admin.php?page=crowdsignal-forms-setup' ) );
181
  exit();
182
  }
includes/synchronization/class-poll-block-synchronizer.php CHANGED
@@ -68,6 +68,13 @@ class Poll_Block_Synchronizer {
68
  }
69
 
70
  $this->authenticator = Crowdsignal_Forms::instance()->get_api_authenticator();
 
 
 
 
 
 
 
71
  if ( ! $this->authenticator->get_user_code() ) {
72
  // Plugin hasn't been authenticated yet, abort sync.
73
  return;
68
  }
69
 
70
  $this->authenticator = Crowdsignal_Forms::instance()->get_api_authenticator();
71
+
72
+ // if there aren't any CS blocks AND a user code hasn't been requested yet, then there is nothing to sync.
73
+ if ( ! $this->entity_bridge->has_crowdsignal_forms_blocks()
74
+ && ! $this->authenticator->has_user_code() ) {
75
+ return;
76
+ }
77
+
78
  if ( ! $this->authenticator->get_user_code() ) {
79
  // Plugin hasn't been authenticated yet, abort sync.
80
  return;
languages/crowdsignal-forms.pot CHANGED
@@ -2,14 +2,14 @@
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
- "Project-Id-Version: Crowdsignal Forms 1.1.0\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/crowdsignal-forms\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
- "POT-Creation-Date: 2020-09-14T19:42:46+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0-alpha-75cb7e3\n"
15
  "X-Domain: crowdsignal-forms\n"
2
  # This file is distributed under the GPL-2.0+.
3
  msgid ""
4
  msgstr ""
5
+ "Project-Id-Version: Crowdsignal Forms 1.1.1\n"
6
  "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/crowdsignal-forms\n"
7
  "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
8
  "Language-Team: LANGUAGE <LL@li.org>\n"
9
  "MIME-Version: 1.0\n"
10
  "Content-Type: text/plain; charset=UTF-8\n"
11
  "Content-Transfer-Encoding: 8bit\n"
12
+ "POT-Creation-Date: 2020-09-16T20:33:47+00:00\n"
13
  "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
14
  "X-Generator: WP-CLI 2.5.0-alpha-75cb7e3\n"
15
  "X-Domain: crowdsignal-forms\n"