HubSpot – Free Marketing Plugin for WordPress - Version 7.0.2

Version Description

(2019.01.22) = - Plugin readme update - Fix wrong settings link

Download this release

Release Info

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

Code changes from version 7.0.1 to 7.0.2

Files changed (3) hide show
  1. admin/leadin-admin.php +26 -3
  2. leadin.php +2 -2
  3. readme.txt +8 -4
admin/leadin-admin.php CHANGED
@@ -51,12 +51,13 @@ class WPLeadInAdmin {
51
  add_action( 'admin_menu', array( &$this, 'leadin_add_menu_items' ) );
52
  add_action( 'admin_print_scripts', array( &$this, 'add_leadin_admin_scripts' ) );
53
  add_filter( 'plugin_action_links_' . 'leadin/leadin.php', array( $this, 'leadin_plugin_settings_link' ) );
54
-
55
  if ($affiliate = $this->get_affiliate_code()) {
56
  add_option( 'hubspot_affiliate_code', $affiliate );
57
  }
 
58
  }
59
-
60
  function get_affiliate_code() {
61
  $affiliate = get_option( 'hubspot_affiliate_code');
62
  if (!$affiliate && file_exists(LEADIN_PLUGIN_DIR . '/hs_affiliate.txt' )) {
@@ -68,6 +69,21 @@ class WPLeadInAdmin {
68
  return false;
69
  }
70
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
71
  function leadin_update_check() {
72
  update_option( 'leadin_pluginVersion', LEADIN_PLUGIN_VERSION );
73
  }
@@ -131,7 +147,13 @@ class WPLeadInAdmin {
131
  * @return array
132
  */
133
  function leadin_plugin_settings_link( $links ) {
134
- $url = get_admin_url( get_current_blog_id(), 'admin.php?page=leadin' );
 
 
 
 
 
 
135
  $settings_link = '<a href="' . $url . '">Settings</a>';
136
  array_unshift( $links, $settings_link );
137
  return $links;
@@ -170,6 +192,7 @@ class WPLeadInAdmin {
170
  $leadin_config = array(
171
  'portalId' => get_option( 'leadin_portalId' ),
172
  'affiliateCode' => get_option( 'hubspot_affiliate_code' ),
 
173
  'slumberMode' => get_option( 'leadin_slumber_mode' ),
174
  'env' => constant( 'LEADIN_ENV' ),
175
  'user' => $this->leadin_get_user_for_tracking(),
51
  add_action( 'admin_menu', array( &$this, 'leadin_add_menu_items' ) );
52
  add_action( 'admin_print_scripts', array( &$this, 'add_leadin_admin_scripts' ) );
53
  add_filter( 'plugin_action_links_' . 'leadin/leadin.php', array( $this, 'leadin_plugin_settings_link' ) );
54
+
55
  if ($affiliate = $this->get_affiliate_code()) {
56
  add_option( 'hubspot_affiliate_code', $affiliate );
57
  }
58
+ $this->hydrate_acquisition_attribution();
59
  }
60
+
61
  function get_affiliate_code() {
62
  $affiliate = get_option( 'hubspot_affiliate_code');
63
  if (!$affiliate && file_exists(LEADIN_PLUGIN_DIR . '/hs_affiliate.txt' )) {
69
  return false;
70
  }
71
 
72
+ function get_acquisition_attribution_option() {
73
+ return get_option('hubspot_acquisition_attribution');
74
+ }
75
+
76
+ function hydrate_acquisition_attribution() {
77
+ if ($this->get_acquisition_attribution_option()) {
78
+ return;
79
+ }
80
+
81
+ if (file_exists(LEADIN_PLUGIN_DIR . '/hs_attribution.txt' )) {
82
+ $acquisition_attribution = trim(file_get_contents(LEADIN_PLUGIN_DIR . '/hs_attribution.txt'));
83
+ add_option('hubspot_acquisition_attribution', $acquisition_attribution);
84
+ }
85
+ }
86
+
87
  function leadin_update_check() {
88
  update_option( 'leadin_pluginVersion', LEADIN_PLUGIN_VERSION );
89
  }
147
  * @return array
148
  */
149
  function leadin_plugin_settings_link( $links ) {
150
+ $oAuthMode = get_option('leadin_oauth_mode');
151
+ if ($oAuthMode && $oAuthMode == '1') {
152
+ $page = "leadin_settings";
153
+ } else {
154
+ $page = "leadin";
155
+ }
156
+ $url = get_admin_url( get_current_blog_id(), "admin.php?page=$page" );
157
  $settings_link = '<a href="' . $url . '">Settings</a>';
158
  array_unshift( $links, $settings_link );
159
  return $links;
192
  $leadin_config = array(
193
  'portalId' => get_option( 'leadin_portalId' ),
194
  'affiliateCode' => get_option( 'hubspot_affiliate_code' ),
195
+ 'acquisitionAttributionParams' => $this->get_acquisition_attribution_option(),
196
  'slumberMode' => get_option( 'leadin_slumber_mode' ),
197
  'env' => constant( 'LEADIN_ENV' ),
198
  'user' => $this->leadin_get_user_for_tracking(),
leadin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: Contact Form Builder for WordPress – Conversion Tools by HubSpot
4
  Plugin URI: http://www.hubspot.com/products/wordpress/contact-form
5
  Description: Whether you’re just getting started with HubSpot or already a HubSpot power user, Contact Form Builder for WordPress and Conversion Tools by HubSpot will let you use HubSpot tools on your WordPress website and connect the two platforms without dealing with code.
6
- Version: 7.0.1
7
  Author: HubSpot
8
  Author URI: http://www.hubspot.com
9
  License: GPL2
@@ -33,7 +33,7 @@ if ( ! defined( 'LEADIN_DB_VERSION' ) ) {
33
  }
34
 
35
  if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
36
- define( 'LEADIN_PLUGIN_VERSION', '7.0.1' );
37
  }
38
 
39
  if ( ! defined( 'LEADIN_SOURCE' ) ) {
3
  Plugin Name: Contact Form Builder for WordPress – Conversion Tools by HubSpot
4
  Plugin URI: http://www.hubspot.com/products/wordpress/contact-form
5
  Description: Whether you’re just getting started with HubSpot or already a HubSpot power user, Contact Form Builder for WordPress and Conversion Tools by HubSpot will let you use HubSpot tools on your WordPress website and connect the two platforms without dealing with code.
6
+ Version: 7.0.2
7
  Author: HubSpot
8
  Author URI: http://www.hubspot.com
9
  License: GPL2
33
  }
34
 
35
  if ( ! defined( 'LEADIN_PLUGIN_VERSION' ) ) {
36
+ define( 'LEADIN_PLUGIN_VERSION', '7.0.2' );
37
  }
38
 
39
  if ( ! defined( 'LEADIN_SOURCE' ) ) {
readme.txt CHANGED
@@ -2,8 +2,8 @@
2
  Contributors: HubSpotDev, leadin
3
  Tags: form, forms, form builder, contact form, email
4
  Requires at least: 3.7
5
- Tested up to: 4.9
6
- Stable tag: 7.0.1
7
 
8
  The Contact Form Builder plugin, a part of HubSpot's Conversion Tools, allows you to create WordPress forms using <a href="https://hubspot.com/products/marketing/forms?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">HubSpot's drag & drop Form Builder</a> in a few clicks to start capturing leads on your website.
9
 
@@ -201,8 +201,12 @@ Please <a href="https://community.hubspot.com?utm_source=wordpress-plugin-listin
201
 
202
  == Changelog ==
203
 
204
- - Current version: 7.0.1
205
- - Current version release: 2018-10-12
 
 
 
 
206
 
207
  = 7.0.1 (2018.10.12) =
208
  - Send page analytics data into HubSpot
2
  Contributors: HubSpotDev, leadin
3
  Tags: form, forms, form builder, contact form, email
4
  Requires at least: 3.7
5
+ Tested up to: 5.0
6
+ Stable tag: 7.0.2
7
 
8
  The Contact Form Builder plugin, a part of HubSpot's Conversion Tools, allows you to create WordPress forms using <a href="https://hubspot.com/products/marketing/forms?utm_source=wordpress-plugin-listing&utm_campaign=wordpress&utm_medium=marketplaces" target="_blank">HubSpot's drag & drop Form Builder</a> in a few clicks to start capturing leads on your website.
9
 
201
 
202
  == Changelog ==
203
 
204
+ - Current version: 7.0.2
205
+ - Current version release: 2019-01-22
206
+
207
+ = 7.0.2 (2019.01.22) =
208
+ - Plugin readme update
209
+ - Fix wrong settings link
210
 
211
  = 7.0.1 (2018.10.12) =
212
  - Send page analytics data into HubSpot