HubSpot – Free Marketing Plugin for WordPress - Version 6.1.1

Version Description

(2016.11.22) - Fix issue where accounts could not reconnect

Download this release

Release Info

Developer leadin
Plugin Icon 128x128 HubSpot – Free Marketing Plugin for WordPress
Version 6.1.1
Comparing to
See all releases

Code changes from version 6.1.0 to 6.1.1

admin/leadin-admin.php CHANGED
@@ -117,13 +117,7 @@ class WPLeadInAdmin
117
  */
118
  function leadin_plugin_settings_link($links)
119
  {
120
- $fullyRegistered = get_option('leadin_hapikey');
121
- if ($fullyRegistered) {
122
- $url = get_admin_url(get_current_blog_id(), 'admin.php?page=leadin_settings');
123
- } else {
124
- $url = get_admin_url(get_current_blog_id(), 'admin.php?page=leadin');
125
- }
126
-
127
  $settings_link = '<a href="' . $url . '">Settings</a>';
128
  array_unshift($links, $settings_link);
129
  return $links;
117
  */
118
  function leadin_plugin_settings_link($links)
119
  {
120
+ $url = get_admin_url(get_current_blog_id(), 'admin.php?page=leadin');
 
 
 
 
 
 
121
  $settings_link = '<a href="' . $url . '">Settings</a>';
122
  array_unshift($links, $settings_link);
123
  return $links;
inc/leadin-registration.php CHANGED
@@ -14,7 +14,7 @@ function leadin_registration_ajax()
14
  $existingPortalId = get_option('leadin_portalId');
15
  $existingHapikey = get_option('leadin_hapikey');
16
 
17
- if (!empty($existingPortalId) || !empty($existingHapikey)) {
18
  header('HTTP/1.0 400 Bad Request');
19
  wp_die('{"error": "Registration is already complete for this portal"}');
20
  }
@@ -22,24 +22,21 @@ function leadin_registration_ajax()
22
  $data = json_decode(file_get_contents('php://input'), true);
23
 
24
  $newPortalId = $data['portalId'];
25
- $newHapiKey = $data['hapikey'];
26
  $slumberMode = $data['slumberMode'];
27
 
28
  error_log($data['hapikey']);
29
 
30
- if (empty($newPortalId) OR (empty($newHapiKey) AND empty($slumberMode))) {
31
  error_log("Registration error");
32
  header('HTTP/1.0 400 Bad Request');
33
  wp_die('{"error": "Registration missing required fields"}');
34
  }
35
 
36
  add_option('leadin_portalId', $newPortalId);
 
37
 
38
- if (!empty($newHapiKey)) {
39
- add_option('leadin_hapikey', $newHapiKey);
40
- }
41
- if (!empty($slumberMode)) {
42
- add_option('leadin_slumber_mode', $slumberMode);
43
  }
44
 
45
  wp_die('{"message": "Success!"}');
14
  $existingPortalId = get_option('leadin_portalId');
15
  $existingHapikey = get_option('leadin_hapikey');
16
 
17
+ if (!empty($existingPortalId)) {
18
  header('HTTP/1.0 400 Bad Request');
19
  wp_die('{"error": "Registration is already complete for this portal"}');
20
  }
22
  $data = json_decode(file_get_contents('php://input'), true);
23
 
24
  $newPortalId = $data['portalId'];
 
25
  $slumberMode = $data['slumberMode'];
26
 
27
  error_log($data['hapikey']);
28
 
29
+ if (empty($newPortalId)) {
30
  error_log("Registration error");
31
  header('HTTP/1.0 400 Bad Request');
32
  wp_die('{"error": "Registration missing required fields"}');
33
  }
34
 
35
  add_option('leadin_portalId', $newPortalId);
36
+ add_option('leadin_slumber_mode', '1');
37
 
38
+ if (!empty($existingHapikey)) {
39
+ delete_option('leadin_hapikey');
 
 
 
40
  }
41
 
42
  wp_die('{"message": "Success!"}');
leadin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: HubSpot Marketing Free (formerly Leadin)
4
  Plugin URI: http://www.hubspot.com/products/marketing/free
5
  Description: HubSpot Marketing Free is an easy-to-use lead tracking plugin for WordPress that helps you better understand your web site visitors.
6
- Version: 6.1.0
7
  Author: HubSpot
8
  Author URI: http://www.hubspot.com
9
  License: GPL2
@@ -29,7 +29,7 @@ if (!defined('LEADIN_DB_VERSION'))
29
  define('LEADIN_DB_VERSION', '2.2.5');
30
 
31
  if (!defined('LEADIN_PLUGIN_VERSION'))
32
- define('LEADIN_PLUGIN_VERSION', '6.1.0');
33
 
34
  if (!defined('LEADIN_SOURCE'))
35
  define('LEADIN_SOURCE', 'leadin.com');
3
  Plugin Name: HubSpot Marketing Free (formerly Leadin)
4
  Plugin URI: http://www.hubspot.com/products/marketing/free
5
  Description: HubSpot Marketing Free is an easy-to-use lead tracking plugin for WordPress that helps you better understand your web site visitors.
6
+ Version: 6.1.1
7
  Author: HubSpot
8
  Author URI: http://www.hubspot.com
9
  License: GPL2
29
  define('LEADIN_DB_VERSION', '2.2.5');
30
 
31
  if (!defined('LEADIN_PLUGIN_VERSION'))
32
+ define('LEADIN_PLUGIN_VERSION', '6.1.1');
33
 
34
  if (!defined('LEADIN_SOURCE'))
35
  define('LEADIN_SOURCE', 'leadin.com');
readme.txt CHANGED
@@ -3,7 +3,7 @@ Contributors: leadin, sredmond, HubSpotDev
3
  Tags: crm, contacts, lead tracking, click tracking, visitor tracking, analytics, marketing automation, inbound marketing, subscription, marketing, lead generation, mailchimp, constant contact, newsletter, popup, popover, email list, email, contacts database, contact form, forms, form widget, popup form
4
  Requires at least: 3.7
5
  Tested up to: 4.6
6
- Stable tag: 6.1.0
7
 
8
  HubSpot Marketing Free is an easy-to-use contact form and marketing analytics plugin for your website that helps you better understand your website visitors.
9
 
@@ -63,8 +63,11 @@ Having trouble? Check out our <a href="https://leadin.hubspot.com/knowledge/" ta
63
 
64
  == Changelog ==
65
 
66
- - Current version: 6.1.0
67
- - Current version release: 2016-11-16
 
 
 
68
 
69
  = 6.1.0 (2016.11.16) =
70
  - Fix an issue where accounts could not be disconnected
3
  Tags: crm, contacts, lead tracking, click tracking, visitor tracking, analytics, marketing automation, inbound marketing, subscription, marketing, lead generation, mailchimp, constant contact, newsletter, popup, popover, email list, email, contacts database, contact form, forms, form widget, popup form
4
  Requires at least: 3.7
5
  Tested up to: 4.6
6
+ Stable tag: 6.1.1
7
 
8
  HubSpot Marketing Free is an easy-to-use contact form and marketing analytics plugin for your website that helps you better understand your website visitors.
9
 
63
 
64
  == Changelog ==
65
 
66
+ - Current version: 6.1.1
67
+ - Current version release: 2016-11-22
68
+
69
+ = 6.1.1 (2016.11.22)
70
+ - Fix issue where accounts could not reconnect
71
 
72
  = 6.1.0 (2016.11.16) =
73
  - Fix an issue where accounts could not be disconnected