HubSpot – Free Marketing Plugin for WordPress - Version 6.1.6

Version Description

(2018.06.22) = - Add shortcodes to use forms and ctas tools

Download this release

Release Info

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

Code changes from version 6.1.5 to 6.1.6

Files changed (3) hide show
  1. inc/class-leadin.php +1 -1
  2. leadin.php +62 -4
  3. readme.txt +6 -3
inc/class-leadin.php CHANGED
@@ -45,7 +45,7 @@ class WPLeadIn {
45
  $slumberMode = get_option( 'leadin_slumber_mode' );
46
 
47
  if ( empty( $portalId ) ) {
48
- echo '<!-- Leadin embed JS disabled as a portalId has not yet been configured -->';
49
  return;
50
  }
51
 
45
  $slumberMode = get_option( 'leadin_slumber_mode' );
46
 
47
  if ( empty( $portalId ) ) {
48
+ echo '<!-- HubSpot embed JS disabled as a portalId has not yet been configured -->';
49
  return;
50
  }
51
 
leadin.php CHANGED
@@ -3,7 +3,7 @@
3
  Plugin Name: HubSpot - Free Marketing Plugin for WordPress
4
  Plugin URI: http://www.hubspot.com/products/marketing/free
5
  Description: HubSpot Marketing Free is the ultimate marketing plugin for WordPress for building an email list, generating and tracking leads, and tracking user behavior on your website.
6
- Version: 6.1.5
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', '6.1.5' );
37
  }
38
 
39
  if ( ! defined( 'LEADIN_SOURCE' ) ) {
@@ -188,11 +188,69 @@ function activate_leadin_on_new_blog( $blog_id, $user_id, $domain, $path, $site_
188
  }
189
  }
190
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  /**
192
  * Checks the stored database version against the current data version + updates if needed
193
  */
194
- function leadin_init() {
195
- $leadin_wp = new WPLeadIn();
 
 
196
  }
197
 
198
 
3
  Plugin Name: HubSpot - Free Marketing Plugin for WordPress
4
  Plugin URI: http://www.hubspot.com/products/marketing/free
5
  Description: HubSpot Marketing Free is the ultimate marketing plugin for WordPress for building an email list, generating and tracking leads, and tracking user behavior on your website.
6
+ Version: 6.1.6
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', '6.1.6' );
37
  }
38
 
39
  if ( ! defined( 'LEADIN_SOURCE' ) ) {
188
  }
189
  }
190
 
191
+
192
+ //=============================================
193
+ // Shortcodes
194
+ //=============================================
195
+ function addHubspotShortcode($attributes) {
196
+ $parsedAttributes = shortcode_atts(array(
197
+ 'type' => NULL,
198
+ 'portal' => NULL,
199
+ 'id' => NULL,
200
+ ), $attributes);
201
+
202
+ if (
203
+ !isset($parsedAttributes['type']) ||
204
+ !isset($parsedAttributes['portal']) ||
205
+ !isset($parsedAttributes['id'])
206
+ ) {
207
+ return;
208
+ }
209
+
210
+ $portalId = $parsedAttributes['portal'];
211
+ $id = $parsedAttributes['id'];
212
+
213
+ switch ($parsedAttributes['type']) {
214
+ case 'form':
215
+ return '
216
+ <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/shell.js"></script>
217
+ <script>
218
+ hbspt.forms.create({
219
+ portalId: '. $portalId . ',
220
+ formId: "' . $id . '",
221
+ shortcode: "wp"
222
+ });
223
+ </script>
224
+ ';
225
+ case 'cta':
226
+ return '
227
+ <!--HubSpot Call-to-Action Code -->
228
+ <span class="hs-cta-wrapper" id="hs-cta-wrapper-' . $id . '">
229
+ <span class="hs-cta-node hs-cta-' . $id . '" id="'. $id . '">
230
+ <!--[if lte IE 8]>
231
+ <div id="hs-cta-ie-element"></div>
232
+ <![endif]-->
233
+ <a href="https://cta-redirect.hubspot.com/cta/redirect/' . $portalId . '/'. $id . '" >
234
+ <img class="hs-cta-img" id="hs-cta-img-' . $id . '" style="border-width:0px;" src="https://no-cache.hubspot.com/cta/default/' . $portalId . '/' . $id . '.png" alt="New call-to-action"/>
235
+ </a>
236
+ </span>
237
+ <script charset="utf-8" src="//js.hubspot.com/cta/current.js"></script>
238
+ <script type="text/javascript">
239
+ hbspt.cta.load(' . $portalId . ', \''. $id . '\', {});
240
+ </script>
241
+ </span>
242
+ <!-- end HubSpot Call-to-Action Code -->
243
+ ';
244
+ }
245
+ }
246
+
247
  /**
248
  * Checks the stored database version against the current data version + updates if needed
249
  */
250
+ function leadin_init()
251
+ {
252
+ $leadin_wp = new WPLeadIn();
253
+ add_shortcode('hubspot', 'addHubspotShortcode');
254
  }
255
 
256
 
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.8
6
- Stable tag: 6.1.5
7
 
8
  Add the free HubSpot Marketing plugin to your WordPress site! Easy to set up. The plugin has everything you need to capture, track, and convert leads.
9
 
@@ -147,8 +147,11 @@ Please <a href="https://community.hubspot.com/" target="_blank">head over to our
147
 
148
  == Changelog ==
149
 
150
- - Current version: 6.1.5
151
- - Current version release: 2017-05-22
 
 
 
152
 
153
  = 6.1.5 (2018.05.22) =
154
  - Code cleanup
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.8
6
+ Stable tag: 6.1.6
7
 
8
  Add the free HubSpot Marketing plugin to your WordPress site! Easy to set up. The plugin has everything you need to capture, track, and convert leads.
9
 
147
 
148
  == Changelog ==
149
 
150
+ - Current version: 6.1.6
151
+ - Current version release: 2018-06-22
152
+
153
+ = 6.1.6 (2018.06.22) =
154
+ - Add shortcodes to use forms and ctas tools
155
 
156
  = 6.1.5 (2018.05.22) =
157
  - Code cleanup