WordPress Landing Pages - Version 2.1.6

Version Description

  • Code & responsive improvements to core free templates.
Download this release

Release Info

Developer adbox
Plugin Icon 128x128 WordPress Landing Pages
Version 2.1.6
Comparing to
See all releases

Code changes from version 2.1.3 to 2.1.6

Files changed (45) hide show
  1. assets/lang/landing-pages.mo +0 -0
  2. assets/lang/landing-pages.po +10 -231
  3. assets/libraries/jpicker/css/jPicker.css +1 -1
  4. assets/tests/codeception/acceptance/LoginCept.php +1 -1
  5. classes/class.activation.php +16 -16
  6. classes/class.admin-notices.php +71 -5
  7. classes/class.inbound-statistics.php +6 -6
  8. classes/class.metaboxes.php +2 -2
  9. classes/class.post-type.landing-page.php +34 -30
  10. classes/class.settings.php +1 -1
  11. classes/class.template-management.php +4 -4
  12. classes/class.variations.php +2 -2
  13. classes/class.wp-list-table.templates.php +2 -2
  14. landing-pages.php +12 -9
  15. readme.txt +4 -4
  16. shared/assets/js/admin/marketing-button.js +1 -3
  17. shared/assets/js/frontend/analytics-src/analytics.forms.js +1 -0
  18. shared/assets/js/frontend/analytics-src/analytics.page.js +2 -0
  19. shared/assets/js/frontend/analytics/inboundAnalytics.js +4 -1
  20. shared/assets/js/frontend/analytics/inboundAnalytics.min.js +3 -3
  21. shared/classes/class.ajax.php +37 -10
  22. shared/classes/class.debug.php +1 -1
  23. shared/classes/class.events.php +29 -2
  24. shared/classes/class.lead-storage.php +2 -0
  25. shared/classes/class.post-type.wp-lead.php +71 -2
  26. shared/classes/class.promote.php +3 -3
  27. shared/classes/class.shortcodes.email-template.php +1 -6
  28. shared/classes/class.template-utils.php +4 -1
  29. shared/shortcodes/css/frontend-render.css +0 -11
  30. shared/shortcodes/css/shortcodes.css +3 -3
  31. shared/shortcodes/shortcodes/forms.php +2 -2
  32. templates/countdown-lander/config.php +4 -4
  33. templates/countdown-lander/index.php +9 -2
  34. templates/demo/config.php +1 -1
  35. templates/demo/index.php +7 -5
  36. templates/dropcap/config.php +17 -17
  37. templates/dropcap/index.php +7 -3
  38. templates/half-and-half/index.php +9 -4
  39. templates/simple-solid-lite/config.php +1 -1
  40. templates/simple-solid-lite/index.php +9 -3
  41. templates/simple-two-column/index.php +8 -3
  42. templates/svtle/index.php +11 -5
  43. templates/three-column-lander/index.php +8 -3
  44. templates/tubelar/config.php +2 -2
  45. templates/tubelar/index.php +7 -4
assets/lang/landing-pages.mo CHANGED
Binary file
assets/lang/landing-pages.po CHANGED
@@ -1,243 +1,22 @@
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Landing Pages\n"
4
- "POT-Creation-Date: 2015-09-29 16:45-0500\n"
5
- "PO-Revision-Date: 2015-09-29 16:45-0500\n"
6
"Last-Translator: \n"
7
"Language-Team: InboundNow <support@inboundnow.com>\n"
8
"Language: en_US\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=UTF-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
- "X-Generator: Poedit 1.8.5\n"
13
"X-Poedit-KeywordsList: __;_e\n"
14
- "X-Poedit-Basepath: .\n"
15
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
- "X-Poedit-SearchPath-0: ..\n"
17
- "X-Poedit-SearchPathExcluded-0: ../js\n"
18
- "X-Poedit-SearchPathExcluded-1: ../shared/docs\n"
19
"X-Poedit-SearchPathExcluded-2: ../templates/*.js\n"
20
-
21
- #: ../libraries/class-tgm-plugin-activation.php:301
22
- msgid "Install Required Plugins"
23
- msgstr ""
24
-
25
- #: ../libraries/class-tgm-plugin-activation.php:302
26
- msgid "Install Plugins"
27
- msgstr ""
28
-
29
- #: ../libraries/class-tgm-plugin-activation.php:303
30
- #, php-format
31
- msgid "Installing Plugin: %s"
32
- msgstr ""
33
-
34
- #: ../libraries/class-tgm-plugin-activation.php:304
35
- msgid "Something went wrong with the plugin API."
36
- msgstr ""
37
-
38
- #: ../libraries/class-tgm-plugin-activation.php:365
39
- msgid "Return to Required Plugins Installer"
40
- msgstr ""
41
-
42
- #: ../libraries/class-tgm-plugin-activation.php:366
43
- msgid "Return to the dashboard"
44
- msgstr ""
45
-
46
- #: ../libraries/class-tgm-plugin-activation.php:367
47
- #: ../libraries/class-tgm-plugin-activation.php:2958
48
- msgid "Plugin activated successfully."
49
- msgstr ""
50
-
51
- #: ../libraries/class-tgm-plugin-activation.php:368
52
- msgid "The following plugin was activated successfully:"
53
- msgstr ""
54
-
55
- #: ../libraries/class-tgm-plugin-activation.php:369
56
- #, php-format
57
- msgid "No action taken. Plugin %1$s was already active."
58
- msgstr ""
59
-
60
- #: ../libraries/class-tgm-plugin-activation.php:370
61
- #, php-format
62
- msgid ""
63
- "Plugin not activated. A higher version of %s is needed for this theme. "
64
- "Please update the plugin."
65
- msgstr ""
66
-
67
- #: ../libraries/class-tgm-plugin-activation.php:371
68
- #, php-format
69
- msgid "All plugins installed and activated successfully. %1$s"
70
- msgstr ""
71
-
72
- #: ../libraries/class-tgm-plugin-activation.php:372
73
- msgid "Dismiss this notice"
74
- msgstr ""
75
-
76
- #: ../libraries/class-tgm-plugin-activation.php:373
77
- msgid "Please contact the administrator of this site for help."
78
- msgstr ""
79
-
80
- #: ../libraries/class-tgm-plugin-activation.php:2121
81
- msgid "Required"
82
- msgstr ""
83
-
84
- #: ../libraries/class-tgm-plugin-activation.php:2124
85
- msgid "Recommended"
86
- msgstr ""
87
-
88
- #: ../libraries/class-tgm-plugin-activation.php:2140
89
- msgid "WordPress Repository"
90
- msgstr ""
91
-
92
- #: ../libraries/class-tgm-plugin-activation.php:2143
93
- msgid "External Source"
94
- msgstr ""
95
-
96
- #: ../libraries/class-tgm-plugin-activation.php:2146
97
- msgid "Pre-Packaged"
98
- msgstr ""
99
-
100
- #: ../libraries/class-tgm-plugin-activation.php:2163
101
- msgid "Not Installed"
102
- msgstr ""
103
-
104
- #: ../libraries/class-tgm-plugin-activation.php:2167
105
- msgid "Installed But Not Activated"
106
- msgstr ""
107
-
108
- #: ../libraries/class-tgm-plugin-activation.php:2169
109
- msgid "Active"
110
- msgstr ""
111
-
112
- #: ../libraries/class-tgm-plugin-activation.php:2175
113
- msgid "Required Update not Available"
114
- msgstr ""
115
-
116
- #: ../libraries/class-tgm-plugin-activation.php:2178
117
- msgid "Requires Update"
118
- msgstr ""
119
-
120
- #: ../libraries/class-tgm-plugin-activation.php:2181
121
- msgid "Update recommended"
122
- msgstr ""
123
-
124
- #: ../libraries/class-tgm-plugin-activation.php:2333
125
- msgid "Installed version:"
126
- msgstr ""
127
-
128
- #: ../libraries/class-tgm-plugin-activation.php:2341
129
- msgid "Minimum required version:"
130
- msgstr ""
131
-
132
- #: ../libraries/class-tgm-plugin-activation.php:2353
133
- msgid "Available version:"
134
- msgstr ""
135
-
136
- #: ../libraries/class-tgm-plugin-activation.php:2376
137
- #, php-format
138
- msgid ""
139
- "No plugins to install, update or activate. <a href=\"%1$s\">Return to the "
140
- "Dashboard</a>"
141
- msgstr ""
142
-
143
- #: ../libraries/class-tgm-plugin-activation.php:2390
144
- msgid "Plugin"
145
- msgstr ""
146
-
147
- #: ../libraries/class-tgm-plugin-activation.php:2391
148
- msgid "Source"
149
- msgstr ""
150
-
151
- #: ../libraries/class-tgm-plugin-activation.php:2392
152
- msgid "Type"
153
- msgstr ""
154
-
155
- #: ../libraries/class-tgm-plugin-activation.php:2396
156
- msgid "Version"
157
- msgstr ""
158
-
159
- #: ../libraries/class-tgm-plugin-activation.php:2397
160
- msgid "Status"
161
- msgstr ""
162
-
163
- #: ../libraries/class-tgm-plugin-activation.php:2557
164
- msgid "Install"
165
- msgstr ""
166
-
167
- #: ../libraries/class-tgm-plugin-activation.php:2563
168
- msgid "Update"
169
- msgstr ""
170
-
171
- #: ../libraries/class-tgm-plugin-activation.php:2566
172
- msgid "Activate"
173
- msgstr ""
174
-
175
- #: ../libraries/class-tgm-plugin-activation.php:2597
176
- msgid "No plugins were selected to be installed. No action taken."
177
- msgstr ""
178
-
179
- #: ../libraries/class-tgm-plugin-activation.php:2599
180
- msgid "No plugins were selected to be updated. No action taken."
181
- msgstr ""
182
-
183
- #: ../libraries/class-tgm-plugin-activation.php:2635
184
- msgid "No plugins are available to be installed at this time."
185
- msgstr ""
186
-
187
- #: ../libraries/class-tgm-plugin-activation.php:2637
188
- msgid "No plugins are available to be updated at this time."
189
- msgstr ""
190
-
191
- #: ../libraries/class-tgm-plugin-activation.php:2957
192
- msgid "Plugin activation failed."
193
- msgstr ""
194
-
195
- #: ../libraries/class-tgm-plugin-activation.php:3287
196
- #, php-format
197
- msgid "Updating Plugin %1$s (%2$d/%3$d)"
198
- msgstr ""
199
-
200
- #: ../libraries/class-tgm-plugin-activation.php:3289
201
- #, php-format
202
- msgid "An error occurred while installing %1$s: <strong>%2$s</strong>."
203
- msgstr ""
204
-
205
- #: ../libraries/class-tgm-plugin-activation.php:3290
206
- #, php-format
207
- msgid "The installation of %1$s failed."
208
- msgstr ""
209
-
210
- #: ../libraries/class-tgm-plugin-activation.php:3294
211
- msgid ""
212
- "The installation and activation process is starting. This process may take a "
213
- "while on some hosts, so please be patient."
214
- msgstr ""
215
-
216
- #: ../libraries/class-tgm-plugin-activation.php:3295
217
- #, php-format
218
- msgid "%1$s installed and activated successfully."
219
- msgstr ""
220
-
221
- #: ../libraries/class-tgm-plugin-activation.php:3296
222
- msgid "All installations and activations have been completed."
223
- msgstr ""
224
-
225
- #: ../libraries/class-tgm-plugin-activation.php:3297
226
- #, php-format
227
- msgid "Installing and Activating Plugin %1$s (%2$d/%3$d)"
228
- msgstr ""
229
-
230
- #: ../libraries/class-tgm-plugin-activation.php:3300
231
- msgid ""
232
- "The installation process is starting. This process may take a while on some "
233
- "hosts, so please be patient."
234
- msgstr ""
235
-
236
- #: ../libraries/class-tgm-plugin-activation.php:3302
237
- msgid "All installations have been completed."
238
- msgstr ""
239
-
240
- #: ../libraries/class-tgm-plugin-activation.php:3303
241
- #, php-format
242
- msgid "Installing Plugin %1$s (%2$d/%3$d)"
243
- msgstr ""
1
msgid ""
2
msgstr ""
3
"Project-Id-Version: Landing Pages\n"
4
+ "POT-Creation-Date: 2016-03-10 17:59-0600\n"
5
+ "PO-Revision-Date: 2016-03-10 18:07-0600\n"
6
"Last-Translator: \n"
7
"Language-Team: InboundNow <support@inboundnow.com>\n"
8
"Language: en_US\n"
9
"MIME-Version: 1.0\n"
10
"Content-Type: text/plain; charset=UTF-8\n"
11
"Content-Transfer-Encoding: 8bit\n"
12
+ "X-Generator: Poedit 1.8.7\n"
13
"X-Poedit-KeywordsList: __;_e\n"
14
+ "X-Poedit-Basepath: ..\n"
15
"Plural-Forms: nplurals=2; plural=(n != 1);\n"
16
+ "X-Poedit-SearchPath-0: .\n"
17
+ "X-Poedit-SearchPathExcluded-0: js\n"
18
+ "X-Poedit-SearchPathExcluded-1: shared/docs\n"
19
"X-Poedit-SearchPathExcluded-2: ../templates/*.js\n"
20
+ "X-Poedit-SearchPathExcluded-3: .\n"
21
+ "X-Poedit-SearchPathExcluded-4: ../shared/assets\n"
22
+ "X-Poedit-SearchPathExcluded-5: libraries\n"
assets/libraries/jpicker/css/jPicker.css CHANGED
@@ -1,4 +1,4 @@
1
- @media all
2
{
3
#jPicker { margin: 0px 8px; text-align: left; }
4
#jPicker ul { font-size: 15px; margin: 0px 0px 0px 15px; padding: 0px; }
1
+ @media all
2
{
3
#jPicker { margin: 0px 8px; text-align: left; }
4
#jPicker ul { font-size: 15px; margin: 0px 0px 0px 15px; padding: 0px; }
assets/tests/codeception/acceptance/LoginCept.php CHANGED
@@ -15,7 +15,7 @@ $I = new AcceptanceTester($scenario);
15
16
$I->wantTo('login to wp-admin');
17
$I->amOnPage( site_url().'/wp-login.php' );
18
- $I->fillField('Username', 'admin');
19
$I->fillField('Password','admin');
20
$I->click('Log In');
21
$I->see('Dashboard');
15
16
$I->wantTo('login to wp-admin');
17
$I->amOnPage( site_url().'/wp-login.php' );
18
+ $I->fillField('Username or Email', 'admin');
19
$I->fillField('Password','admin');
20
$I->click('Log In');
21
$I->see('Dashboard');
classes/class.activation.php CHANGED
@@ -130,7 +130,7 @@ class Landing_Pages_Activation {
130
public static function display_upgrade_routine_notice() {
131
?>
132
<div class="error">
133
- <p><?php _e( 'Landing Pages plugin requires a database upgrade:', 'landing-pages' ); ?> <a href='?plugin=landing-pages&plugin_action=upgrade_routines'><?php _e('Upgrade database now' , 'landing-pages' ); ?></a></p>
134
</div>
135
<?php
136
}
@@ -190,10 +190,10 @@ class Landing_Pages_Activation {
190
'title' => 'Installation aborted',
191
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
192
'details' => array(
193
- __( 'Server PHP Version' , 'landing-pages' ) => phpversion(),
194
- __( 'Required PHP Version' , 'landing-pages' ) => self::$version_php
195
),
196
- 'solution' => sprintf( __( 'Please contact your hosting provider to upgrade PHP to %s or greater' , 'landing-pages' ) , self::$version_php )
197
)
198
);
199
}
@@ -204,10 +204,10 @@ class Landing_Pages_Activation {
204
'title' => 'Installation aborted',
205
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
206
'details' => array(
207
- __( 'WordPress Version' , 'landing-pages' ) => $wp_version,
208
- __( 'Required WordPress Version' , 'landing-pages' ) => self::$version_wp
209
),
210
- 'solution' => sprintf( __( 'Please update landing pages to version %s or greater.' , 'landing-pages' ) , self::$version_wp )
211
)
212
);
213
}
@@ -218,10 +218,10 @@ class Landing_Pages_Activation {
218
'title' => 'Installation aborted',
219
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
220
'details' => array(
221
- __( 'Calls to Action Version' , 'landing-pages' ) => WP_CTA_CURRENT_VERSION,
222
- __( 'Required Calls to Action Version' , 'landing-pages' ) => self::$version_cta
223
),
224
- 'solution' => sprintf( __( 'Please update Calls to Action to version %s or greater.' , 'landing-pages' ) , self::$version_cta )
225
)
226
);
227
}
@@ -232,10 +232,10 @@ class Landing_Pages_Activation {
232
'title' => 'Installation aborted',
233
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
234
'details' => array(
235
- __( 'Leads Version' , 'landing-pages' ) => WPL_CURRENT_VERSION,
236
- __( 'Required Leads Version' , 'landing-pages' ) => self::$version_leads
237
),
238
- 'solution' => sprintf( __( 'Please update Leads to version %s or greater.' , 'landing-pages' ) , self::$version_leads )
239
)
240
);
241
}
@@ -246,10 +246,10 @@ class Landing_Pages_Activation {
246
'title' => 'Installation aborted',
247
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
248
'details' => array(
249
- __( 'Extension: Landing Page as Homepage' , 'landing-pages' ) => LP_HOMEPAGE_CURRENT_VERSION,
250
- __( 'Required extension version' , 'landing-pages' ) => self::$version_lpah
251
),
252
- 'solution' => sprintf( __( 'Please update extension to version %s or greater.' , 'landing-pages' ) , self::$version_lpah )
253
)
254
);
255
}
130
public static function display_upgrade_routine_notice() {
131
?>
132
<div class="error">
133
+ <p><?php _e( 'Landing Pages plugin requires a database upgrade:', 'inbound-pro' ); ?> <a href='?plugin=landing-pages&plugin_action=upgrade_routines'><?php _e('Upgrade database now' , 'inbound-pro' ); ?></a></p>
134
</div>
135
<?php
136
}
190
'title' => 'Installation aborted',
191
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
192
'details' => array(
193
+ __( 'Server PHP Version' , 'inbound-pro' ) => phpversion(),
194
+ __( 'Required PHP Version' , 'inbound-pro' ) => self::$version_php
195
),
196
+ 'solution' => sprintf( __( 'Please contact your hosting provider to upgrade PHP to %s or greater' , 'inbound-pro' ) , self::$version_php )
197
)
198
);
199
}
204
'title' => 'Installation aborted',
205
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
206
'details' => array(
207
+ __( 'WordPress Version' , 'inbound-pro' ) => $wp_version,
208
+ __( 'Required WordPress Version' , 'inbound-pro' ) => self::$version_wp
209
),
210
+ 'solution' => sprintf( __( 'Please update landing pages to version %s or greater.' , 'inbound-pro' ) , self::$version_wp )
211
)
212
);
213
}
218
'title' => 'Installation aborted',
219
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
220
'details' => array(
221
+ __( 'Calls to Action Version' , 'inbound-pro' ) => WP_CTA_CURRENT_VERSION,
222
+ __( 'Required Calls to Action Version' , 'inbound-pro' ) => self::$version_cta
223
),
224
+ 'solution' => sprintf( __( 'Please update Calls to Action to version %s or greater.' , 'inbound-pro' ) , self::$version_cta )
225
)
226
);
227
}
232
'title' => 'Installation aborted',
233
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
234
'details' => array(
235
+ __( 'Leads Version' , 'inbound-pro' ) => WPL_CURRENT_VERSION,
236
+ __( 'Required Leads Version' , 'inbound-pro' ) => self::$version_leads
237
),
238
+ 'solution' => sprintf( __( 'Please update Leads to version %s or greater.' , 'inbound-pro' ) , self::$version_leads )
239
)
240
);
241
}
246
'title' => 'Installation aborted',
247
'message' => __('Landing Plugin could not be installed' , 'landing-pages'),
248
'details' => array(
249
+ __( 'Extension: Landing Page as Homepage' , 'inbound-pro' ) => LP_HOMEPAGE_CURRENT_VERSION,
250
+ __( 'Required extension version' , 'inbound-pro' ) => self::$version_lpah
251
),
252
+ 'solution' => sprintf( __( 'Please update extension to version %s or greater.' , 'inbound-pro' ) , self::$version_lpah )
253
)
254
);
255
}
classes/class.admin-notices.php CHANGED
@@ -25,31 +25,45 @@ class Landing_Pages_Admin_Notices {
25
$screen->id === 'theme-install' ||
26
$screen->id === 'update' && isset($_GET['action']) && $_GET['action'] === "upload-theme"
27
) {
28
29
if (is_plugin_active('landing-pages/landing-pages.php')) {
30
$lp = true;
31
}
32
33
if (is_plugin_active('cta/calls-to-action.php')) {
34
$cta = true;
35
}
36
37
$doc = 'http://docs.inboundnow.com/guide/installing-new-templates/';
38
$link = admin_url( 'edit.php?post_type=landing-page&page=lp_templates_upload' );
39
40
?>
41
- <div class="error" style="margin-bottom:10px;">
42
<h3 style='font-weight:normal; margin-bottom:0px;padding-bottom:0px;'>
43
<strong>
44
- <?php _e( 'Attention Landing Page Users:' , 'landing-pages' ); ?>
45
</strong>
46
</h3>
47
- <p style='font-weight:normal; margin-top:0px;margin-bottom:0px;'><?php _e( sprintf( 'If you are trying to install a <strong>landing page template</strong> from Inbound Now, %s Please Follow these instructions%s' , '<a href=\'http://docs.inboundnow.com/guide/installing-new-templates/\' target=\'_blank\'>' , '</a>' ) , 'landing-pages' ); ?>
48
<br>
49
<?php echo "Landing page templates need to be installed <a href='".$link."'>here</a> in the <strong><a href='".$link."'>Landing pages</a> > <a href='".$link."'>Manage templates area</a></strong>"; ?>
50
</p>
51
</div>
52
<?php
53
}
54
}
55
@@ -63,7 +77,7 @@ class Landing_Pages_Admin_Notices {
63
if ((($pagenow == 'edit.php') && ($page_string == "lp_manage_templates")) || (($pagenow == "post-new.php") && (isset($_GET['post_type']) && $_GET['post_type'] == "landing-page"))) {
64
?>
65
<div id="more-templates-button" style="display:none;">
66
- <a target="_blank" href="https://www.inboundnow.com/market/?show=landing-pages" class="button new-lp-button button-primary button-large"><?php _e( 'Download Additional Landing Page Templates' , 'landing-pages' ); ?></a>
67
</div>
68
<script type="text/javascript">
69
jQuery(document).ready(function($) {
@@ -89,7 +103,7 @@ class Landing_Pages_Admin_Notices {
89
?>
90
<div class="error">
91
<p>
92
- <?php _e( 'We\'ve noticed that your permalink settings are set to the default setting. Landing Page varation roation is not possible on this setting. To enable roation please go into Settings->Permalinks and update them to a different format.' , 'landing-pages' ); ?>
93
</p>
94
</div>
95
<?php
@@ -180,6 +194,58 @@ class Landing_Pages_Admin_Notices {
180
}
181
182
183
}
184
185
new Landing_Pages_Admin_Notices;
25
$screen->id === 'theme-install' ||
26
$screen->id === 'update' && isset($_GET['action']) && $_GET['action'] === "upload-theme"
27
) {
28
+ $message_id = 'landing-page-installation';
29
30
if (is_plugin_active('landing-pages/landing-pages.php')) {
31
$lp = true;
32
+ $message_id = 'landing-page-installation';
33
}
34
35
if (is_plugin_active('cta/calls-to-action.php')) {
36
$cta = true;
37
+ $message_id = 'cta-installation';
38
+ }
39
+
40
+ /* check if user viewed message already */
41
+ if (self::check_if_viewed($message_id)) {
42
+ return;
43
}
44
45
$doc = 'http://docs.inboundnow.com/guide/installing-new-templates/';
46
$link = admin_url( 'edit.php?post_type=landing-page&page=lp_templates_upload' );
47
48
+
49
?>
50
+ <div class="error" style="margin-bottom:10px;" id="inbound_notice_<?php echo $message_id; ?>">
51
<h3 style='font-weight:normal; margin-bottom:0px;padding-bottom:0px;'>
52
<strong>
53
+ <?php _e( 'Attention Landing Page Users:' , 'inbound-pro' ); ?>
54
</strong>
55
</h3>
56
+ <p style='font-weight:normal; margin-top:0px;margin-bottom:0px;'><?php _e( sprintf( 'If you are trying to install a <strong>landing page template</strong> from Inbound Now, %s Please Follow these instructions%s' , '<a href=\'http://docs.inboundnow.com/guide/installing-new-templates/\' target=\'_blank\'>' , '</a>' ) , 'inbound-pro' ); ?>
57
<br>
58
<?php echo "Landing page templates need to be installed <a href='".$link."'>here</a> in the <strong><a href='".$link."'>Landing pages</a> > <a href='".$link."'>Manage templates area</a></strong>"; ?>
59
</p>
60
+ <a class="button button-large inbound_dismiss" href="#" id="<?php echo $message_id; ?>" data-notification-id="<?php echo $message_id; ?>" ><?php _e('Dismiss','inbound-pro'); ?></a>
61
+ <br><br>
62
</div>
63
<?php
64
+
65
+ /* echo javascript used to listen for notice closing */
66
+ self::javascript_dismiss_notice();
67
}
68
}
69
77
if ((($pagenow == 'edit.php') && ($page_string == "lp_manage_templates")) || (($pagenow == "post-new.php") && (isset($_GET['post_type']) && $_GET['post_type'] == "landing-page"))) {
78
?>
79
<div id="more-templates-button" style="display:none;">
80
+ <a target="_blank" href="https://www.inboundnow.com/market/?show=landing-pages" class="button new-lp-button button-primary button-large"><?php _e( 'Download Additional Landing Page Templates' , 'inbound-pro' ); ?></a>
81
</div>
82
<script type="text/javascript">
83
jQuery(document).ready(function($) {
103
?>
104
<div class="error">
105
<p>
106
+ <?php _e( 'We\'ve noticed that your permalink settings are set to the default setting. Landing Page varation roation is not possible on this setting. To enable roation please go into Settings->Permalinks and update them to a different format.' , 'inbound-pro' ); ?>
107
</p>
108
</div>
109
<?php
194
}
195
196
197
+ /**
198
+ * check if user has viewed and dismissed cta
199
+ * @param $notificaiton_id
200
+ */
201
+ public static function check_if_viewed( $notificaiton_id ) {
202
+ global $current_user;
203
+
204
+ $user_id = $current_user->ID;
205
+
206
+ return get_user_meta($user_id, 'inbound_notification_' . $notificaiton_id ) ;
207
+ }
208
+
209
+
210
+ public static function javascript_dismiss_notice() {
211
+ global $current_user;
212
+
213
+ $user_id = $current_user->ID;
214
+ ?>
215
+ <script type="text/javascript">
216
+ jQuery( document ).ready(function() {
217
+
218
+ jQuery('body').on('click' , '.inbound_dismiss' , function() {
219
+
220
+ var notification_id = jQuery( this ).data('notification-id');
221
+
222
+ jQuery('#inbound_notice_' + notification_id).hide();
223
+
224
+ jQuery.ajax({
225
+ type: 'POST',
226
+ url: ajaxurl,
227
+ context: this,
228
+ data: {
229
+ action: 'inbound_dismiss_ajax',
230
+ notification_id: notification_id,
231
+ user_id: '<?php echo $user_id; ?>'
232
+ },
233
+
234
+ success: function (data) {
235
+ },
236
+
237
+ error: function (MLHttpRequest, textStatus, errorThrown) {
238
+ alert("Ajax not enabled");
239
+ }
240
+ });
241
+ })
242
+
243
+ });
244
+ </script>
245
+ <?php
246
+ }
247
+
248
+
249
}
250
251
new Landing_Pages_Admin_Notices;
classes/class.inbound-statistics.php CHANGED
@@ -90,7 +90,7 @@ if (!class_exists('Inbound_Content_Statistics')) {
90
$exclude[] = 'download';
91
92
if ( $pagenow === 'post.php' && !in_array($post_type,$exclude) ) {
93
- add_meta_box( 'inbound-content-statistics', __( 'Inbound Statistics' , 'landing-pages' ) , array( __CLASS__ , 'display_statistics' ) , $post_type, 'side', 'high');
94
}
95
96
}
@@ -158,20 +158,20 @@ if (!class_exists('Inbound_Content_Statistics')) {
158
<div class='bab-stat-stats' colspan='2'>
159
<div class='bab-stat-container-impressions bab-number-box'>
160
<span class='bab-stat-span-impressions'><?php echo $impressions; ?></span>
161
- <span class="bab-stat-id"><?php _e( 'Views' , 'landing-pages' ); ?></span>
162
</div>
163
<div class='bab-stat-container-conversions bab-number-box'>
164
<span class='bab-stat-span-conversions'><?php echo $conversions; ?></span>
165
- <span class="bab-stat-id"><?php _e( 'Conversions' , 'landing-pages' ); ?></span></span>
166
</div>
167
<div class='bab-stat-container-conversion_rate bab-number-box'>
168
<span class='bab-stat-span-conversion_rate'><?php echo $conversion_rate; ?></span>
169
- <span class="bab-stat-id bab-rate"><?php _e( 'Conversion Rate' , 'landing-pages' ); ?></span>
170
</div>
171
</div>
172
</div>
173
<div class='bab-stat-control-container'>
174
- <span class="lp-delete-var-stats" rel='<?php echo $post->ID;?>' title="<?php _e( 'Delete this variations stats' , 'landing-pages' ); ?>"><?php _e( 'Clear Stats' , 'landing-pages' ); ?></span>
175
</div>
176
</div>
177
</div>
@@ -189,7 +189,7 @@ if (!class_exists('Inbound_Content_Statistics')) {
189
global $wpdb;
190
191
$newrules = "0";
192
- $post_id = mysql_real_escape_string($_POST['post_id']);
193
$vid = $_POST['variation'];
194
195
update_post_meta( $post_id, '_inbound_impressions_count', '0' );
90
$exclude[] = 'download';
91
92
if ( $pagenow === 'post.php' && !in_array($post_type,$exclude) ) {
93
+ add_meta_box( 'inbound-content-statistics', __( 'Inbound Statistics' , 'inbound-pro' ) , array( __CLASS__ , 'display_statistics' ) , $post_type, 'side', 'high');
94
}
95
96
}
158
<div class='bab-stat-stats' colspan='2'>
159
<div class='bab-stat-container-impressions bab-number-box'>
160
<span class='bab-stat-span-impressions'><?php echo $impressions; ?></span>
161
+ <span class="bab-stat-id"><?php _e( 'Views' , 'inbound-pro' ); ?></span>
162
</div>
163
<div class='bab-stat-container-conversions bab-number-box'>
164
<span class='bab-stat-span-conversions'><?php echo $conversions; ?></span>
165
+ <span class="bab-stat-id"><?php _e( 'Conversions' , 'inbound-pro' ); ?></span></span>
166
</div>
167
<div class='bab-stat-container-conversion_rate bab-number-box'>
168
<span class='bab-stat-span-conversion_rate'><?php echo $conversion_rate; ?></span>
169
+ <span class="bab-stat-id bab-rate"><?php _e( 'Conversion Rate' , 'inbound-pro' ); ?></span>
170
</div>
171
</div>
172
</div>
173
<div class='bab-stat-control-container'>
174
+ <span class="lp-delete-var-stats" rel='<?php echo $post->ID;?>' title="<?php _e( 'Delete this variations stats' , 'inbound-pro' ); ?>"><?php _e( 'Clear Stats' , 'inbound-pro' ); ?></span>
175
</div>
176
</div>
177
</div>
189
global $wpdb;
190
191
$newrules = "0";
192
+ $post_id = inval($_POST['post_id']);
193
$vid = $_POST['variation'];
194
195
update_post_meta( $post_id, '_inbound_impressions_count', '0' );
classes/class.metaboxes.php CHANGED
@@ -942,7 +942,7 @@ class Landing_Pages_Metaboxes {
942
<table style='width:100%'>
943
<tr>
944
<td style='width:22%'>
945
- <?php _e( 'Conversion Shortcode' , 'landing-pages' ); ?>
946
</td>
947
<td>
948
<input type='text' style='width:95%;display:inline;' readonly='readonly' value="[landing-page-conversion id='<?php echo $post->ID; ?>' vid='<?php echo $variation_id; ?>']">
@@ -951,7 +951,7 @@ class Landing_Pages_Metaboxes {
951
</tr>
952
<tr>
953
<td>
954
- <?php _e( 'Conversion Callback URL' , 'landing-pages' ); ?>
955
</td>
956
<td>
957
<input type='text' style='width:95%;display:inline;' readonly='readonly' value="<?php echo add_query_arg( array( 'postback'=>'true' , 'event' => 'lp_conversion' , 'id' => $post->ID , 'vid' => $variation_id , 'salt' => $salt ) , site_url()) ?>">
942
<table style='width:100%'>
943
<tr>
944
<td style='width:22%'>
945
+ <?php _e( 'Conversion Shortcode' , 'inbound-pro' ); ?>
946
</td>
947
<td>
948
<input type='text' style='width:95%;display:inline;' readonly='readonly' value="[landing-page-conversion id='<?php echo $post->ID; ?>' vid='<?php echo $variation_id; ?>']">
951
</tr>
952
<tr>
953
<td>
954
+ <?php _e( 'Conversion Callback URL' , 'inbound-pro' ); ?>
955
</td>
956
<td>
957
<input type='text' style='width:95%;display:inline;' readonly='readonly' value="<?php echo add_query_arg( array( 'postback'=>'true' , 'event' => 'lp_conversion' , 'id' => $post->ID , 'vid' => $variation_id , 'salt' => $salt ) , site_url()) ?>">
classes/class.post-type.landing-page.php CHANGED
@@ -68,16 +68,16 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
68
69
$slug = get_option( 'lp-main-landing-page-permalink-prefix', 'go' );
70
$labels = array(
71
- 'name' => _x('Landing Pages', 'post type general name' , 'landing-pages' ),
72
- 'singular_name' => _x('Landing Page', 'post type singular name' , 'landing-pages' ),
73
- 'add_new' => _x('Add New', 'Landing Page' , 'landing-pages' ),
74
- 'add_new_item' => __('Add New Landing Page' , 'landing-pages' ),
75
- 'edit_item' => __('Edit Landing Page' , 'landing-pages' ),
76
- 'new_item' => __('New Landing Page' , 'landing-pages' ),
77
- 'view_item' => __('View Landing Page' , 'landing-pages' ),
78
- 'search_items' => __('Search Landing Page' , 'landing-pages' ),
79
- 'not_found' => __('Nothing found' , 'landing-pages' ),
80
- 'not_found_in_trash' => __('Nothing found in Trash' , 'landing-pages' ),
81
'parent_item_colon' => ''
82
);
83
@@ -105,7 +105,7 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
105
106
$args = array(
107
'hierarchical' => true,
108
- 'label' => __("Categories", 'landing-pages'),
109
'singular_label' => __("Landing Page Category",
110
'landing-pages'),
111
'show_ui' => true,
@@ -127,12 +127,12 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
127
public static function register_columns($columns) {
128
$columns = array(
129
"cb" => "<input type=\"checkbox\" />",
130
- "thumbnail-lander" => __("Preview", 'landing-pages'),
131
- "title" => __("Landing Page Title", 'landing-pages'),
132
- "stats" => __("Variation Testing Stats", 'landing-pages'),
133
- "impressions" => __("Total<br>Visits", 'landing-pages'),
134
- "actions" => __("Total<br>Conversions", 'landing-pages'),
135
- "cr" => __("Total<br>Conversion Rate", 'landing-pages')
136
);
137
return $columns;
138
}
@@ -225,7 +225,7 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
225
$thumbnail = 'http://s.wordpress.com/mshots/v1/' . urlencode(esc_url($permalink)) . '?w=140';
226
}
227
228
- echo "<a title='" . __('Click to Preview this variation', 'landing-pages') . "' class='thickbox' href='" . $permalink . "?lp-variation-id=0&iframe_window=on&post_id=" . $post->ID . "&TB_iframe=true&width=640&height=703' target='_blank'><img src='" . $thumbnail . "' style='width:155px;height:110px;' title='Click to Preview'></a>";
229
BREAK;
230
case "stats":
231
self::show_stats();
@@ -324,9 +324,15 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
324
* Adds rewrite rules
325
*/
326
public static function add_rewrite_rules() {
327
- $this_path = LANDINGPAGES_PATH;
328
- $this_path = explode('wp-content', $this_path);
329
- $this_path = "wp-content" . $this_path[1];
330
331
$slug = get_option('lp-main-landing-page-permalink-prefix', 'go');
332
/*echo $slug;exit; */
@@ -358,9 +364,7 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
358
359
/* print_r($rules_array);exit; */
360
361
- $this_path = LANDINGPAGES_PATH;
362
- $this_path = explode('wp-content', $this_path);
363
- $this_path = "wp-content" . $this_path[1];
364
$slug = get_option('lp-main-landing-page-permalink-prefix', 'go');
365
366
$i = 0;
@@ -394,7 +398,7 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
394
$permalink = get_permalink($post->ID);
395
$variations = Landing_Pages_Variations::get_variations($post->ID);
396
397
- echo "<span class='show-stats button'> " . __('Show Variation Stats', 'landing-pages') . "</span>";
398
echo "<ul class='lp-varation-stat-ul'>";
399
$cr_array = array();
400
$i = 0;
@@ -422,7 +426,7 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
422
$conversion_rate = round($conversion_rate, 2) * 100;
423
$cr_array[] = $conversion_rate;
424
if ($v_status === "0") {
425
- $final_status = __("(Paused)", 'landing-pages');
426
} else {
427
$final_status = "";
428
}
@@ -430,9 +434,9 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
430
$largest = $cr_array[$i];
431
}
432
(($largest === $conversion_rate)) ? $winner_class = 'lp-current-winner' : $winner_class = ""; */
433
- (($final_conversion === "1")) ? $c_text = __('conversion', 'landing-pages') : $c_text = __("conversions", 'landing-pages');
434
- (($each_impression === "1")) ? $i_text = __('visit', 'landing-pages') : $i_text = __("visits", 'landing-pages');
435
- (($each_notes === "")) ? $each_notes = __('No notes', 'landing-pages') : $each_notes = $each_notes;
436
$data_letter = "data-letter=\"" . $letter . "\"";
437
$edit_link = admin_url('post.php?post=' . $post->ID . '&lp-variation-id=' . $vid . '&action=edit');
438
$popup = "data-notes=\"<span class='lp-pop-description'>" . $each_notes . "</span><span class='lp-pop-controls'><span class='lp-pop-edit button-primary'><a href='" . $edit_link . "'>Edit This variation</a></span><span class='lp-pop-preview button'><a title='Click to Preview this variation' class='thickbox' href='" . $permalink . "?lp-variation-id=" . $vid . "&iframe_window=on&post_id=" . $post->ID . "&TB_iframe=true&width=640&height=703' target='_blank'>Preview This variation</a></span><span class='lp-bottom-controls'><span class='lp-delete-var-stats' data-letter='" . $letter . "' data-vid='" . $vid . "' rel='" . $post->ID . "'>Clear These Stats</span></span></span>\"";
@@ -512,7 +516,7 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
512
return $actions;
513
}
514
515
- $actions['clear'] = '<a href="#clear-stats" id="lp_clear_' . $post->ID . '" class="clear_stats" title="' . esc_attr(__("Clear impression and conversion records", 'landing-pages')) . '" >' . __('Clear All Stats', 'landing-pages') . '</a><span class="hover-description">' . __('Hover over the letters to the right for more options', 'landing-pages') . '</span>';
516
517
return $actions;
518
}
68
69
$slug = get_option( 'lp-main-landing-page-permalink-prefix', 'go' );
70
$labels = array(
71
+ 'name' => __('Landing Pages', 'inbound-pro' ),
72
+ 'singular_name' => __('Landing Page', 'inbound-pro' ),
73
+ 'add_new' => __('Add New', 'inbound-pro' ),
74
+ 'add_new_item' => __('Add New Landing Page' , 'inbound-pro' ),
75
+ 'edit_item' => __('Edit Landing Page' , 'inbound-pro' ),
76
+ 'new_item' => __('New Landing Page' , 'inbound-pro' ),
77
+ 'view_item' => __('View Landing Page' , 'inbound-pro' ),
78
+ 'search_items' => __('Search Landing Page' , 'inbound-pro' ),
79
+ 'not_found' => __('Nothing found' , 'inbound-pro' ),
80
+ 'not_found_in_trash' => __('Nothing found in Trash' , 'inbound-pro' ),
81
'parent_item_colon' => ''
82
);
83
105
106
$args = array(
107
'hierarchical' => true,
108
+ 'label' => __("Categories", 'inbound-pro'),
109
'singular_label' => __("Landing Page Category",
110
'landing-pages'),
111
'show_ui' => true,
127
public static function register_columns($columns) {
128
$columns = array(
129
"cb" => "<input type=\"checkbox\" />",
130
+ "thumbnail-lander" => __("Preview", 'inbound-pro'),
131
+ "title" => __("Landing Page Title", 'inbound-pro'),
132
+ "stats" => __("Variation Testing Stats", 'inbound-pro'),
133
+ "impressions" => __("Total<br>Visits", 'inbound-pro'),
134
+ "actions" => __("Total<br>Conversions", 'inbound-pro'),
135
+ "cr" => __("Total<br>Conversion Rate", 'inbound-pro')
136
);
137
return $columns;
138
}
225
$thumbnail = 'http://s.wordpress.com/mshots/v1/' . urlencode(esc_url($permalink)) . '?w=140';
226
}
227
228
+ echo "<a title='" . __('Click to Preview this variation', 'inbound-pro') . "' class='thickbox' href='" . $permalink . "?lp-variation-id=0&iframe_window=on&post_id=" . $post->ID . "&TB_iframe=true&width=640&height=703' target='_blank'><img src='" . $thumbnail . "' style='width:155px;height:110px;' title='Click to Preview'></a>";
229
BREAK;
230
case "stats":
231
self::show_stats();
324
* Adds rewrite rules
325
*/
326
public static function add_rewrite_rules() {
327
+ if ( !class_exists('Inbound_Pro_Plugin')){
328
+ $this_path = LANDINGPAGES_PATH;
329
+ $this_path = explode('wp-content', $this_path);
330
+ $this_path = "wp-content" . $this_path[1];
331
+ } else {
332
+ $this_path = INBOUND_PRO_PATH;
333
+ $this_path = explode('wp-content', $this_path);
334
+ $this_path = "wp-content" . $this_path[1] . "core/landing-pages/";
335
+ }
336
337
$slug = get_option('lp-main-landing-page-permalink-prefix', 'go');
338
/*echo $slug;exit; */
364
365
/* print_r($rules_array);exit; */
366
367
+
368
$slug = get_option('lp-main-landing-page-permalink-prefix', 'go');
369
370
$i = 0;
398
$permalink = get_permalink($post->ID);
399
$variations = Landing_Pages_Variations::get_variations($post->ID);
400
401
+ echo "<span class='show-stats button'> " . __('Show Variation Stats', 'inbound-pro') . "</span>";
402
echo "<ul class='lp-varation-stat-ul'>";
403
$cr_array = array();
404
$i = 0;
426
$conversion_rate = round($conversion_rate, 2) * 100;
427
$cr_array[] = $conversion_rate;
428
if ($v_status === "0") {
429
+ $final_status = __("(Paused)", 'inbound-pro');
430
} else {
431
$final_status = "";
432
}
434
$largest = $cr_array[$i];
435
}
436
(($largest === $conversion_rate)) ? $winner_class = 'lp-current-winner' : $winner_class = ""; */
437
+ (($final_conversion === "1")) ? $c_text = __('conversion', 'inbound-pro') : $c_text = __("conversions", 'inbound-pro');
438
+ (($each_impression === "1")) ? $i_text = __('visit', 'inbound-pro') : $i_text = __("visits", 'inbound-pro');
439
+ (($each_notes === "")) ? $each_notes = __('No notes', 'inbound-pro') : $each_notes = $each_notes;
440
$data_letter = "data-letter=\"" . $letter . "\"";
441
$edit_link = admin_url('post.php?post=' . $post->ID . '&lp-variation-id=' . $vid . '&action=edit');
442
$popup = "data-notes=\"<span class='lp-pop-description'>" . $each_notes . "</span><span class='lp-pop-controls'><span class='lp-pop-edit button-primary'><a href='" . $edit_link . "'>Edit This variation</a></span><span class='lp-pop-preview button'><a title='Click to Preview this variation' class='thickbox' href='" . $permalink . "?lp-variation-id=" . $vid . "&iframe_window=on&post_id=" . $post->ID . "&TB_iframe=true&width=640&height=703' target='_blank'>Preview This variation</a></span><span class='lp-bottom-controls'><span class='lp-delete-var-stats' data-letter='" . $letter . "' data-vid='" . $vid . "' rel='" . $post->ID . "'>Clear These Stats</span></span></span>\"";
516
return $actions;
517
}
518
519
+ $actions['clear'] = '<a href="#clear-stats" id="lp_clear_' . $post->ID . '" class="clear_stats" title="' . esc_attr(__("Clear impression and conversion records", 'inbound-pro')) . '" >' . __('Clear All Stats', 'inbound-pro') . '</a><span class="hover-description">' . __('Hover over the letters to the right for more options', 'inbound-pro') . '</span>';
520
521
return $actions;
522
}
classes/class.settings.php CHANGED
@@ -32,7 +32,7 @@ class Landing_Pages_Settings {
32
33
/* Setup Main Navigation Tab and Settings */
34
$tab_slug = 'lp-main';
35
- $lp_global_settings[$tab_slug]['label'] = __( 'Global Settings' , 'landing-pages' );
36
37
38
$lp_global_settings[$tab_slug]['settings'] = array(
32
33
/* Setup Main Navigation Tab and Settings */
34
$tab_slug = 'lp-main';
35
+ $lp_global_settings[$tab_slug]['label'] = __( 'Global Settings' , 'inbound-pro' );
36
37
38
$lp_global_settings[$tab_slug]['settings'] = array(
classes/class.template-management.php CHANGED
@@ -89,7 +89,7 @@ class Landing_Pages_Template_Management {
89
echo '<div class="wrap">';
90
?>
91
92
- <h2><?php _e( 'Manage Templates' , 'landing-pages' ); ?>
93
<a href="edit.php?post_type=landing-page&page=lp_templates_upload"
94
class="add-new-h2"><?php echo esc_html_x('Add New Template', 'landing-pages'); ?></a>
95
</h2>
@@ -193,15 +193,15 @@ class Landing_Pages_Template_Management {
193
194
if (!$is_template) {
195
echo '<br><br><br><br>';
196
- die( __('WARNING! This zip file does not seem to be a template file! If you are trying to install a Landing Page extension please use the Plugin\'s upload section! Please press the back button and try again!' , 'landing-pages' ));
197
}
198
199
200
if ($result = $zip->extract(PCLZIP_OPT_PATH, $extended_path, PCLZIP_OPT_REPLACE_NEWER) == 0) {
201
- die( __( 'There was a problem. Please try again!' , 'landing-pages' ) );
202
} else {
203
unlink($_FILES['templatezip']["tmp_name"]);
204
- echo '<div class="updated"><p>' . __( 'Template uploaded successfully!' , 'landing-pages' ) . '</div>';
205
}
206
}
207
89
echo '<div class="wrap">';
90
?>
91
92
+ <h2><?php _e( 'Manage Templates' , 'inbound-pro' ); ?>
93
<a href="edit.php?post_type=landing-page&page=lp_templates_upload"
94
class="add-new-h2"><?php echo esc_html_x('Add New Template', 'landing-pages'); ?></a>
95
</h2>
193
194
if (!$is_template) {
195
echo '<br><br><br><br>';
196
+ die( __('WARNING! This zip file does not seem to be a template file! If you are trying to install a Landing Page extension please use the Plugin\'s upload section! Please press the back button and try again!' , 'inbound-pro' ));
197
}
198
199
200
if ($result = $zip->extract(PCLZIP_OPT_PATH, $extended_path, PCLZIP_OPT_REPLACE_NEWER) == 0) {
201
+ die( __( 'There was a problem. Please try again!' , 'inbound-pro' ) );
202
} else {
203
unlink($_FILES['templatezip']["tmp_name"]);
204
+ echo '<div class="updated"><p>' . __( 'Template uploaded successfully!' , 'inbound-pro' ) . '</div>';
205
}
206
}
207
classes/class.variations.php CHANGED
@@ -743,7 +743,7 @@ if (!class_exists('Landing_Pages_Variations')) {
743
public static function ajax_clear_stats() {
744
global $wpdb;
745
746
- $landing_page_id = mysql_real_escape_string($_POST['page_id']);
747
748
$variations = self::get_variations( $landing_page_id );
749
@@ -763,7 +763,7 @@ if (!class_exists('Landing_Pages_Variations')) {
763
public static function ajax_clear_stats_single() {
764
global $wpdb;
765
766
- $landing_page_id = mysql_real_escape_string($_POST['page_id']);
767
$vid = $_POST['variation'];
768
769
self::set_impressions_count( $landing_page_id , $vid , 0 );
743
public static function ajax_clear_stats() {
744
global $wpdb;
745
746
+ $landing_page_id = intval($_POST['page_id']);
747
748
$variations = self::get_variations( $landing_page_id );
749
763
public static function ajax_clear_stats_single() {
764
global $wpdb;
765
766
+ $landing_page_id = intval($_POST['page_id']);
767
$vid = $_POST['variation'];
768
769
self::set_impressions_count( $landing_page_id , $vid , 0 );
classes/class.wp-list-table.templates.php CHANGED
@@ -211,8 +211,8 @@ class Landing_Pages_Templates_List_Table extends WP_List_Table {
211
if (false !== $api_response) {
212
if (version_compare($version, $api_response['new_version'], '<')) {
213
$template_page = LANDINGPAGES_STORE_URL . "/downloads/" . $item['ID'] . "/";
214
- $html = '<div class="update-message">' . $item['version'] . ' &nbsp;&nbsp; <font class="update-available">Version ' . $api_response['new_version'] . __( 'available' , 'landing-pages' ). '</font><br> <a title="' . $item['name'] . '" class="thickbox" href="' . $template_page . '" target="_blank">'. __( 'View template details' , 'landing-pages' ) .'</a> ';
215
- $html .= 'or <a href="?post_type=landing-page&page=lp_manage_templates&action=upgrade&template%5B%5D=' . $item['ID'] . '">'. __( 'update now' , 'landing-pages' ) .'</a>.</div>';
216
return $html;
217
} else {
218
return $item['version'];
211
if (false !== $api_response) {
212
if (version_compare($version, $api_response['new_version'], '<')) {
213
$template_page = LANDINGPAGES_STORE_URL . "/downloads/" . $item['ID'] . "/";
214
+ $html = '<div class="update-message">' . $item['version'] . ' &nbsp;&nbsp; <font class="update-available">Version ' . $api_response['new_version'] . __( 'available' , 'inbound-pro' ). '</font><br> <a title="' . $item['name'] . '" class="thickbox" href="' . $template_page . '" target="_blank">'. __( 'View template details' , 'inbound-pro' ) .'</a> ';
215
+ $html .= 'or <a href="?post_type=landing-page&page=lp_manage_templates&action=upgrade&template%5B%5D=' . $item['ID'] . '">'. __( 'update now' , 'inbound-pro' ) .'</a>.</div>';
216
return $html;
217
} else {
218
return $item['version'];
landing-pages.php CHANGED
@@ -2,14 +2,14 @@
2
/*
3
Plugin Name: Landing Pages
4
Plugin URI: http://www.inboundnow.com/landing-pages/
5
- Description: The first true all-in-one Landing Page solution for WordPress, including ongoing conversion metrics, a/b split testing, unlimited design options and so much more!
6
- Version: 2.1.3
7
Author: Inbound Now
8
Author URI: http://www.inboundnow.com/
9
- Text Domain: landing-pages
10
- Domain Path: assets/lang
11
*/
12
13
if (!class_exists('Inbound_Landing_Pages_Plugin')) {
14
15
final class Inbound_Landing_Pages_Plugin {
@@ -26,9 +26,9 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
26
27
/* Run Loaders */
28
self::load_constants();
29
self::load_files();
30
self::load_shared_files();
31
- self::load_text_domain_init();
32
33
}
34
@@ -38,7 +38,7 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
38
*/
39
private static function load_constants() {
40
41
- define('LANDINGPAGES_CURRENT_VERSION', '2.1.3' );
42
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
43
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
44
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
@@ -120,14 +120,17 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
120
* Hooks the text domain loader to the init
121
*/
122
private static function load_text_domain_init() {
123
- add_action( 'init' , array( __CLASS__ , 'load_text_domain' ) );
124
}
125
126
/**
127
* Loads the correct .mo file for this plugin
128
*/
129
public static function load_text_domain() {
130
- load_plugin_textdomain( 'landing-pages' , false , LANDINGPAGES_PLUGIN_SLUG . '/assets/lang/' );
131
}
132
133
/**
@@ -153,7 +156,7 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
153
static function fail_php_version() {
154
//add_action( 'plugins_loaded', array( __CLASS__, 'load_text_domain_init' ) );
155
$plugin_url = admin_url( 'plugins.php' );
156
- self::notice( __( 'Landing Pages requires PHP version 5.3+ to run. Your version '.PHP_VERSION.' is not high enough.<br><u>Please contact your hosting provider</u> to upgrade your PHP Version.<br>The plugin is NOT Running. You can disable this warning message by <a href="'.$plugin_url.'">deactivating the plugin</a>', 'landing-pages' ) );
157
}
158
159
/**
2
/*
3
Plugin Name: Landing Pages
4
Plugin URI: http://www.inboundnow.com/landing-pages/
5
+ Description: Landing page template framework with variant testing and lead capturing through cooperation with Inbound Now's Leads plugin. This is the stand alone version served through WordPress.org.
6
+ Version: 2.1.6
7
Author: Inbound Now
8
Author URI: http://www.inboundnow.com/
9
+
10
*/
11
12
+
13
if (!class_exists('Inbound_Landing_Pages_Plugin')) {
14
15
final class Inbound_Landing_Pages_Plugin {
26
27
/* Run Loaders */
28
self::load_constants();
29
+ self::load_text_domain_init();
30
self::load_files();
31
self::load_shared_files();
32
33
}
34
38
*/
39
private static function load_constants() {
40
41
+ define('LANDINGPAGES_CURRENT_VERSION', '2.1.6' );
42
define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
43
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
44
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
120
* Hooks the text domain loader to the init
121
*/
122
private static function load_text_domain_init() {
123
+ add_action( 'init' , array( __CLASS__ , 'load_text_domain' ) , 1 );
124
}
125
126
/**
127
* Loads the correct .mo file for this plugin
128
*/
129
public static function load_text_domain() {
130
+
131
+ if (!class_exists('Inbound_Pro_Plugin')) {
132
+ load_plugin_textdomain('inbound-pro', false, LANDINGPAGES_PLUGIN_SLUG . '/assets/lang/');
133
+ }
134
}
135
136
/**
156
static function fail_php_version() {
157
//add_action( 'plugins_loaded', array( __CLASS__, 'load_text_domain_init' ) );
158
$plugin_url = admin_url( 'plugins.php' );
159
+ self::notice( __( 'Landing Pages requires PHP version 5.3+ to run. Your version '.PHP_VERSION.' is not high enough.<br><u>Please contact your hosting provider</u> to upgrade your PHP Version.<br>The plugin is NOT Running. You can disable this warning message by <a href="'.$plugin_url.'">deactivating the plugin</a>', 'inbound-pro' ) );
160
}
161
162
/**
readme.txt CHANGED
@@ -7,7 +7,7 @@ License URI: http://www.gnu.org/licenses/gpl-2.0.html
7
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
8
Requires at least: 3.8
9
Tested up to: 4.4.2
10
- Stable Tag: 2.1.3
11
12
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
13
@@ -33,9 +33,6 @@ Landing pages are an ideal way to convert more of your passive website visitors
33
* Extend functionality with our growing repository of <a href="http://www.inboundnow.com/market/category/landing-pages/extensions/">third party add ons</a>.
34
* Easily implement your own custom landing page design.
35
36
- This plugin is form agnostic meaning it will work with any form system you use.
37
-
38
- Recommended form plugins (Gravity forms, Ninja Forms or Contact form 7)
39
40
= About the Plugin =
41
@@ -73,6 +70,9 @@ The plugin is also fully extendable and has a number of actions, filters, and ho
73
74
== Changelog ==
75
76
= 2.1.3 =
77
* Call to action updates
78
7
Tags: landing pages, inbound marketing, conversion pages, split testing, a b test, a b testing, a/b test, a/b testing, coming soon page, email list, landing page, list building, maintenance page, squeeze page, inbound now, landing-pages, splash pages, cpa, click tracking, goal tracking, analytics, free landing page templates
8
Requires at least: 3.8
9
Tested up to: 4.4.2
10
+ Stable Tag: 2.1.6
11
12
Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
13
33
* Extend functionality with our growing repository of <a href="http://www.inboundnow.com/market/category/landing-pages/extensions/">third party add ons</a>.
34
* Easily implement your own custom landing page design.
35
36
37
= About the Plugin =
38
70
71
== Changelog ==
72
73
+ = 2.1.6 =
74
+ * Code & responsive improvements to core free templates.
75
+
76
= 2.1.3 =
77
* Call to action updates
78
shared/assets/js/admin/marketing-button.js CHANGED
@@ -58,7 +58,6 @@ var MarketingButton = (function () {
58
},
59
waitForEditorLoad: function() {
60
var that = this;
61
- console.log('wait');
62
jQuery(".acf_postbox .field_type-wysiwyg iframe")
63
.waitUntilExists(function(){
64
console.log('wait');
@@ -141,7 +140,7 @@ var MarketingButton = (function () {
141
jQuery('.inbound-short-list').show();
142
});
143
},
144
- insertTextAreaContent(text, selector) {
145
var cursorPos = selector.prop('selectionStart');
146
var v = selector.val();
147
var textBefore = v.substring(0, cursorPos );
@@ -210,7 +209,6 @@ var MarketingButton = (function () {
210
})();
211
212
jQuery(document).ready(function($) {
213
- console.log('Markeint buttons gooooo')
214
MarketingButton.init();
215
216
});
58
},
59
waitForEditorLoad: function() {
60
var that = this;
61
jQuery(".acf_postbox .field_type-wysiwyg iframe")
62
.waitUntilExists(function(){
63
console.log('wait');
140
jQuery('.inbound-short-list').show();
141
});
142
},
143
+ insertTextAreaContent: function(text, selector) {
144
var cursorPos = selector.prop('selectionStart');
145
var v = selector.val();
146
var textBefore = v.substring(0, cursorPos );
209
})();
210
211
jQuery(document).ready(function($) {
212
MarketingButton.init();
213
214
});
shared/assets/js/frontend/analytics-src/analytics.forms.js CHANGED
@@ -596,6 +596,7 @@ var InboundForms = (function(_inbound) {
596
utils.createCookie("wp_lead_id", leadID);
597
_inbound.totalStorage.deleteItem('page_views'); // remove pageviews
598
_inbound.totalStorage.deleteItem('tracking_events'); // remove events
599
}
600
601
_inbound.trigger('form_after_submission', formData);
596
utils.createCookie("wp_lead_id", leadID);
597
_inbound.totalStorage.deleteItem('page_views'); // remove pageviews
598
_inbound.totalStorage.deleteItem('tracking_events'); // remove events
599
+ utils.eraseCookie('inbound_page_views'); // remove events
600
}
601
602
_inbound.trigger('form_after_submission', formData);
shared/assets/js/frontend/analytics-src/analytics.page.js CHANGED
@@ -349,8 +349,10 @@ var _inboundPageTracking = (function(_inbound) {
349
variation_id: inbound_settings.variation_id,
350
post_type: inbound_settings.post_type,
351
current_url: window.location.href,
352
json: '0'
353
};
354
var firePageCallback = function(leadID) {
355
//_inbound.Events.page_view_saved(leadID);
356
};
349
variation_id: inbound_settings.variation_id,
350
post_type: inbound_settings.post_type,
351
current_url: window.location.href,
352
+ page_views: JSON.stringify(_inbound.PageTracking.getPageViews()),
353
json: '0'
354
};
355
+
356
var firePageCallback = function(leadID) {
357
//_inbound.Events.page_view_saved(leadID);
358
};
shared/assets/js/frontend/analytics/inboundAnalytics.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! Inbound Analyticsv1.0.0 | (c) 2015 Inbound Now | https://github.com/inboundnow/cta */
2
/**
3
* # _inbound
4
*
@@ -1895,6 +1895,7 @@ var InboundForms = (function(_inbound) {
1895
utils.createCookie("wp_lead_id", leadID);
1896
_inbound.totalStorage.deleteItem('page_views'); // remove pageviews
1897
_inbound.totalStorage.deleteItem('tracking_events'); // remove events
1898
}
1899
1900
_inbound.trigger('form_after_submission', formData);
@@ -3408,8 +3409,10 @@ var _inboundPageTracking = (function(_inbound) {
3408
variation_id: inbound_settings.variation_id,
3409
post_type: inbound_settings.post_type,
3410
current_url: window.location.href,
3411
json: '0'
3412
};
3413
var firePageCallback = function(leadID) {
3414
//_inbound.Events.page_view_saved(leadID);
3415
};
1
+ /*! Inbound Analyticsv1.0.0 | (c) 2016 Inbound Now | https://github.com/inboundnow/cta */
2
/**
3
* # _inbound
4
*
1895
utils.createCookie("wp_lead_id", leadID);
1896
_inbound.totalStorage.deleteItem('page_views'); // remove pageviews
1897
_inbound.totalStorage.deleteItem('tracking_events'); // remove events
1898
+ utils.eraseCookie('inbound_page_views'); // remove events
1899
}
1900
1901
_inbound.trigger('form_after_submission', formData);
3409
variation_id: inbound_settings.variation_id,
3410
post_type: inbound_settings.post_type,
3411
current_url: window.location.href,
3412
+ page_views: JSON.stringify(_inbound.PageTracking.getPageViews()),
3413
json: '0'
3414
};
3415
+
3416
var firePageCallback = function(leadID) {
3417
//_inbound.Events.page_view_saved(leadID);
3418
};
shared/assets/js/frontend/analytics/inboundAnalytics.min.js CHANGED
@@ -1,3 +1,3 @@
1
- /*! Inbound Analyticsv1.0.0 | (c) 2015 Inbound Now | https://github.com/inboundnow/cta */
2
- var inbound_data=inbound_data||{},_inboundOptions=_inboundOptions||{},_gaq=_gaq||[],_inbound=function(e){var t={timeout:inbound_settings.is_admin?500:1e4,formAutoTracking:!0,formAutoPopulation:!0},n={init:function(){_inbound.Utils.init(),_inbound.Utils.domReady(window,function(){_inbound.DomLoaded()})},DomLoaded:function(){_inbound.PageTracking.init(),_inbound.Forms.init(),_inbound.Utils.setUrlParams(),_inbound.LeadsAPI.init(),setTimeout(function(){_inbound.Forms.init()},2e3),_inbound.trigger("analytics_ready")},extend:function(e,t){var n,i={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i},debug:function(){},deBugger:function(e,t,n){if(console){var i,o,a,r=document.location.hash?document.location.hash:"",s=r.indexOf("#debug")>-1,t=t||!1;r&&r.match(/debug/)&&(r=r.split("-"),a=r[1]),o="true"===_inbound.Utils.readCookie("inbound_debug")?!0:!1,i="true"===_inbound.Utils.readCookie("inbound_debug_"+e)?!0:!1,(i||s||o)&&(t&&"string"==typeof t&&(o||"all"===a?console.log('logAll "'+e+'" =>',t):i?console.log('log "'+e+'" =>',t):e===a&&console.log('#log "'+e+'" =>',t)),n&&n instanceof Function&&n())}}},i=n.extend(t,e);return n.Settings=i||{},n}(_inboundOptions),_inboundHooks=function(e){var t=function(){function e(e,t,n,i){return"string"==typeof e&&"function"==typeof t&&(n=parseInt(n||10,10),s("actions",e,t,n,i)),d}function t(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t&&u("actions",t,e),d}function n(e,t){return"string"==typeof e&&r("actions",e,t),d}function i(e,t,n){return"string"==typeof e&&"function"==typeof t&&(n=parseInt(n||10,10),s("filters",e,t,n)),d}function o(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t?u("filters",t,e):d}function a(e,t){return"string"==typeof e&&r("filters",e,t),d}function r(e,t,n,i){if(c[e][t])if(n){var o,a=c[e][t];if(i)for(o=a.length;o--;){var r=a[o];r.callback===n&&r.context===i&&a.splice(o,1)}else for(o=a.length;o--;)a[o].callback===n&&a.splice(o,1)}else c[e][t]=[]}function s(e,t,n,i,o){var a={callback:n,priority:i,context:o},r=c[e][t];r?(r.push(a),r=l(r)):r=[a],c[e][t]=r}function l(e){for(var t,n,i,o=1,a=e.length;a>o;o++){for(t=e[o],n=o;(i=e[n-1])&&i.priority>t.priority;)e[n]=e[n-1],--n;e[n]=t}return e}function u(e,t,n){var i=c[e][t];if(!i)return"filters"===e?n[0]:!1;var o=0,a=i.length;if("filters"===e)for(;a>o;o++)n[0]=i[o].callback.apply(i[o].context,n);else for(;a>o;o++)i[o].callback.apply(i[o].context,n);return"filters"===e?n[0]:!0}var d={removeFilter:a,applyFilters:o,addFilter:i,removeAction:n,doAction:t,addAction:e},c={actions:{},filters:{}};return d};return e.hooks=new t,e.add_action=function(){var t=arguments[0].split(" ");for(k in t)arguments[0]="inbound."+t[k],e.hooks.addAction.apply(this,arguments);return this},e.remove_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeAction.apply(this,arguments),this},e.do_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.doAction.apply(this,arguments),this},e.add_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.addFilter.apply(this,arguments),this},e.remove_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeFilter.apply(this,arguments),this},e.apply_filters=function(){return arguments[0]="inbound."+arguments[0],e.hooks.applyFilters.apply(this,arguments)},e}(_inbound||{}),_inboundUtils=function(e){var t,n=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,i=(Object.prototype.toString,("https:"==location.protocol?"https://":"http://")+location.hostname+location.pathname.replace(/\/#x2F;,"")),o={api_host:i,track_pageview:!0,track_links_timeout:300,cookie_name:"_sp",cookie_expiration:365,cookie_domain:(host=location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}#x2F;i))?host[0]:""};return e.Utils={init:function(){this.polyFills(),this.checkLocalStorage(),this.SetUID(),this.storeReferralData()},polyFills:function(){window.console||(window.console={});for(var e=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"],t=0;t<e.length;t++)window.console[e[t]]||(window.console[e[t]]=function(){});Date.prototype.toISOString||!function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();try{new CustomEvent("?")}catch(n){this.CustomEvent=function(e,t){function n(n,o){var a=document.createEvent(e);return null!==n?i.call(a,n,(o||(o=t)).bubbles,o.cancelable,o.detail):a.initCustomEvent=i,a}function i(t,n,i,o){this["init"+e](t,n,i,o),"detail"in this||(this.detail=o)}return n}(this.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),i=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)t=document._qsa.shift(),t.style.removeAttribute("x-qsa"),i.push(t);return document._qsa=null,i}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),!("innerText"in document.createElement("a"))&&"getSelection"in window&&HTMLElement.prototype.__defineGetter__("innerText",function(){for(var e,t=window.getSelection(),n=[],i=0;i<t.rangeCount;i++)n[i]=t.getRangeAt(i);t.removeAllRanges(),t.selectAllChildren(this),e=t.toString(),t.removeAllRanges();for(var i=0;i<n.length;i++)t.addRange(n[i]);return e})},createCookie:function(e,t,n){var i="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=e+"="+t+i+"; path=/"},readCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},eraseCookie:function(e){this.createCookie(e,"",-1)},getAllCookies:function(){var t={};if(document.cookie&&""!==document.cookie)for(var n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i].split("=");o[0]=o[0].replace(/^ /,""),t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e.totalStorage("inbound_cookies",t),t},setUrlParams:function(){var n={};!function(){for(var e,t=function(e){return decodeURIComponent(e).replace(/\+/g," ")},i=window.location.search.substring(1),o=/([^&=]+)=?([^&]*)/g;e=o.exec(i);)if("-1"==e[1].indexOf("["))n[t(e[1])]=t(e[2]);else{var a=e[1].indexOf("["),r=e[1].slice(a+1,e[1].indexOf("]",a)),s=t(e[1].slice(0,a));"object"!=typeof n[s]&&(n[t(s)]={},n[t(s)].length=0),r?n[t(s)][t(r)]=t(e[2]):Array.prototype.push.call(n[t(s)],t(e[2]))}}();for(var i in n)if("object"==typeof n[i])for(var o in n[i])this.createCookie(o,n[i][o],30);else this.createCookie(i,n[i],30);if(t){var a=e.totalStorage("inbound_url_params")||{},r=this.mergeObjs(a,n);e.totalStorage("inbound_url_params",r)}var s={option1:"yo",option2:"woooo"};e.trigger("url_parameters",n,s)},getAllUrlParams:function(){var n={};if(t)var n=e.totalStorage("inbound_url_params");return n},getParameterVal:function(e,t){return(RegExp(e+"=(.+?)(&|$)").exec(t)||[,!1])[1]},checkLocalStorage:function(){if("localStorage"in window)try{ls="undefined"==typeof window.localStorage?void 0:window.localStorage,t="undefined"==typeof ls||"undefined"==typeof window.JSON?!1:!0}catch(e){t=!1}return t},showLocalStorageSize:function(){function e(e){return 2*e.length}function t(e){return e/1024/1024}function n(t){return{name:t,size:e(localStorage[t])}}function i(e){return e.size=t(e.size).toFixed(2)+" MB",e}var o=Object.keys(localStorage).map(n).map(i);console.table(o)},addDays:function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},GetDate:function(){var e=new Date,t=e.getDate(),n=10>t?"0":"",i=e.getFullYear(),o=e.getHours(),a=10>o?"0":"",r=e.getMinutes(),s=10>r?"0":"",l=e.getSeconds(),u=10>l?"0":"",d=e.getMonth()+1,c=10>d?"0":"",m=i+"/"+c+d+"/"+n+t+" "+a+o+":"+s+r+":"+u+l;return m},SetSessionTimeout:function(){var e=(this.readCookie("lead_session_expire"),new Date);e.setTime(e.getTime()+18e5),this.createCookie("lead_session_expire",!0,e)},storeReferralData:function(){var t=new Date,n=document.referrer||"Direct Traffic",i=e.Utils.readCookie("inbound_referral_site"),o=e.totalStorage("inbound_original_referral");t.setTime(t.getTime()+18e5),i||this.createCookie("inbound_referral_site",n,t),o||e.totalStorage("inbound_original_referral",o)},CreateUID:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var i=0;e>i;i++)n+=t[Math.floor(Math.random()*t.length)];return n},generateGUID:function(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,guid)},SetUID:function(e){if(!this.readCookie("wp_lead_uid")){var t=e||this.CreateUID(35);this.createCookie("wp_lead_uid",t)}},countProperties:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&++t;return t},mergeObjs:function(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n},hasClass:function(e,t){var n;if("classList"in document.documentElement)var n=t.classList.contains(e);else var n=new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className);return n},addClass:function(e,t){"classList"in document.documentElement?t.classList.add(e):this.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(e,t){"classList"in document.documentElement?t.classList.remove(e):this.hasClass(t,e)&&(t.className=t.className.replace(new RegExp("(^|\\s)*"+e+"(\\s|$)*","g"),""))},removeElement:function(e){e.parentNode.removeChild(e)},trim:function(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")},ajaxPolyFill:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;for(var e,t=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],n=0;n<t.length;n++)try{e=new ActiveXObject(t[n]);break}catch(i){}return e},ajaxSendData:function(e,t,n,i){var o=this.ajaxPolyFill();setTimeout(function(){o.open(n,e,!0),o.onreadystatechange=function(){4==o.readyState&&t(o.responseText)},"POST"==n&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.send(i)},100)},ajaxGet:function(e,t,n,i){var o=[];for(var a in t)o.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e+"?"+o.join("&"),n,"GET",null,i)},ajaxPost:function(e,t,n,i){var o=[];for(var a in t)o.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e,n,"POST",o.join("&"),i)},sendEvent:function(e,t,i){t=t||{},async=!0;var a=getCookie();if(a){var r;for(r in a)t[r]=a[r]}t.id||(t.id=getId());var s={e:e,t:(new Date).toISOString(),kv:t},l=o.api_host+"/track?data="+encodeURIComponent(JSON.stringify(s));if(n){var u=new XMLHttpRequest;u.open("GET",l,async),u.withCredentials=async,u.send(null)}else{var d=document.createElement("script");d.type="text/javascript",d.async=async,d.defer=async,d.src=l;var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(d,c)}return action(i),self},domReady:function(e,t){var n=!1,i=!0,o=e.document,a=o.documentElement,r=o.addEventListener?"addEventListener":"attachEvent",s=o.addEventListener?"removeEventListener":"detachEvent",l=o.addEventListener?"":"on",u=function(i){("readystatechange"!=i.type||"complete"==o.readyState)&&(("load"==i.type?e:o)[s](l+i.type,u,!1),!n&&(n=!0)&&t.call(e,i.type||i))},d=function(){try{a.doScroll("left")}catch(e){return setTimeout(d,50),void 0}u("poll")};if("complete"==o.readyState)t.call(e,"lazy");else{if(o.createEventObject&&a.doScroll){try{i=!e.frameElement}catch(c){}i&&d()}o[r](l+"DOMContentLoaded",u,!1),o[r](l+"readystatechange",u,!1),e[r](l+"load",u,!1)}},addListener:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)},removeListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},throttle:function(e,t){var n,i,o,a=null,r=0,s=function(){r=new Date,a=null,o=e.apply(n,i)};return function(){var l=new Date;r||(r=l);var u=t-(l-r);return n=this,i=arguments,0>=u?(clearTimeout(a),a=null,r=l,o=e.apply(n,i)):a||(a=setTimeout(s,u)),o}},checkTypeofGA:function(){"function"==typeof ga&&(universalGA=!0),"undefined"!=typeof _gaq&&"function"==typeof _gaq.push&&(classicGA=!0),"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(googleTagManager=!0)}},e}(_inbound||{}),InboundForms=function(e){var t=!1,n=e.Utils,o=[],a=[],r=[],s=e.Settings,l=["first name","last name","name","email","e-mail","phone","website","job title","your favorite food","company","tele","address","comment"];if(e.Forms={init:function(){e.Forms.runFieldMappingFilters(),e.Forms.assignTrackClass(),e.Forms.formTrackInit()},runFieldMappingFilters:function(){l=e.hooks.applyFilters("forms.field_map",l)},debug:function(e,n){if(t&&console){var e=e||!1;e&&"string"==typeof e&&console.log(e),n&&n instanceof Function&&n()}},formTrackInit:function(){for(var e=0;e<window.document.forms.length;e++){var t=!1,n=window.document.forms[e];n.dataset.formProcessed||(n.dataset.formProcessed=!0,t=this.checkTrackStatus(n),t&&(this.attachFormSubmitEvent(n),this.initFormMapping(n)))}},checkTrackStatus:function(t){var n=t.getAttribute("class");return""!==n&&null!==n?n.toLowerCase().indexOf("wpl-track-me")>-1?!0:n.toLowerCase().indexOf("inbound-track")>-1?!0:(cb=function(){console.log(t)},e.deBugger("forms","This form not tracked. Please assign on in settings...",cb),!1):void 0},assignTrackClass:function(){if(window.inbound_settings){if(inbound_settings.inbound_track_include){var t=inbound_settings.inbound_track_include.split(","),n="add selectors "+inbound_settings.inbound_track_include;e.deBugger("forms",n),this.loopClassSelectors(t,"add")}if(inbound_settings.inbound_track_exclude){var t=inbound_settings.inbound_track_exclude.split(","),n="remove selectors "+inbound_settings.inbound_track_exclude;e.deBugger("forms",n),this.loopClassSelectors(t,"remove")}}},loopClassSelectors:function(t,i){for(var o=t.length-1;o>=0;o--){var a=n.trim(t[o]);-1===a.indexOf("#")&&-1===a.indexOf(".")&&(a="#"+a),a=document.querySelector(a),a&&("add"===i?(e.Utils.addClass("wpl-track-me",a),e.Utils.addClass("inbound-track",a)):(e.Utils.removeClass("wpl-track-me",a),e.Utils.removeClass("inbound-track",a)))}},initFormMapping:function(t){for(var n=[],i=0;i<t.elements.length;i++)formInput=t.elements[i],"hidden"!==formInput.type?(this.mapField(formInput),this.rememberInputValues(formInput),s.formAutoPopulation&&!e.Utils.hasClass("nopopulate",t)&&this.fillInputValues(formInput)):n.push(formInput);for(var o=n.length-1;o>=0;o--)formInput=n[o],this.mapField(formInput)},mapField:function(t){var a=t.id||!1,r=t.name||!1,s=this.getInputLabel(t);if(s){var u=this.ignoreFieldByLabel(s[0].innerText);if(u)return t.dataset.ignoreFormField=!0,!1}for(i=0;i<l.length;i++){var d=!1,c=l[i],m=n.trim(c),f=m.replace(/ /g,"_");r&&r.toLowerCase().indexOf(m)>-1?(d=!0,e.deBugger("forms","Found matching name attribute for -> "+m)):a&&a.toLowerCase().indexOf(m)>-1?(d=!0,e.deBugger("forms","Found matching ID attribute for ->"+m)):s?s[0].innerText.toLowerCase().indexOf(m)>-1&&(d=!0,e.deBugger("forms","Found matching sibling label for -> "+m)):o.push(m),d&&(this.addDataAttr(t,f),this.removeArrayItem(l,m),i--)}return inbound_data},formListener:function(t){t.preventDefault(),e.Forms.saveFormData(t.target),document.body.style.cursor="wait"},attachFormSubmitEvent:function(e){n.addListener(e,"submit",this.formListener);document.querySelector(".inbound-email")},ignoreFieldByLabel:function(t){var n=!1;return t?((-1!=t.toLowerCase().indexOf("credit card")||-1!=t.toLowerCase().indexOf("card number"))&&(n=!0),(-1!=t.toLowerCase().indexOf("expiration")||-1!=t.toLowerCase().indexOf("expiry"))&&(n=!0),("month"==t.toLowerCase()||"mm"==t.toLowerCase()||"yy"==t.toLowerCase()||"yyyy"==t.toLowerCase()||"year"==t.toLowerCase())&&(n=!0),(-1!=t.toLowerCase().indexOf("cvv")||-1!=t.toLowerCase().indexOf("cvc")||-1!=t.toLowerCase().indexOf("secure code")||-1!=t.toLowerCase().indexOf("security code"))&&(n=!0),n&&e.deBugger("forms","ignore "+t),n):!1},ignoreFieldByValue:function(e){var t=!1;if(!e)return!1;("visa"==e.toLowerCase()||"mastercard"==e.toLowerCase()||"american express"==e.toLowerCase()||"amex"==e.toLowerCase()||"discover"==e.toLowerCase())&&(t=!0);var n=new RegExp("/^[0-9]+#x2F;");if(n.test(e)){var i=e.replace(" ","");this.isInt(i)&&i.length>=16&&(t=!0)}return t},isInt:function(e){return"number"==typeof e&&isFinite(e)&&e%1===0},releaseFormSubmit:function(e){document.body.style.cursor="default",n.removeClass("wpl-track-me",e),n.removeListener(e,"submit",this.formListener);var t=e.getAttribute("class");return""!==t&&null!==t&&-1!=t.toLowerCase().indexOf("wpcf7-form")?(setTimeout(function(){document.body.style.cursor="default"},300),!0):(e.submit(),setTimeout(function(){for(var t=0;t<e.elements.length;t++)formInput=e.elements[t],type=formInput.type||!1,"submit"===type&&"submit"===formInput.name&&e.elements[t].click()},2e3),void 0)},saveFormData:function(t){for(var i=i||{},o=0;o<t.elements.length;o++)if(formInput=t.elements[o],multiple=!1,formInput.name){if(formInput.dataset.ignoreFormField){e.deBugger("forms","ignore "+formInput.name);continue}switch(inputName=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),i[inputName]||(i[inputName]={}),formInput.type&&(i[inputName].type=formInput.type),i[inputName].name||(i[inputName].name=formInput.name),formInput.dataset.mapFormField&&(i[inputName].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(l=this.getInputValue(formInput),l===!1)continue;break;case"TEXTAREA":l=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var s=0;s<formInput.length;s++)formInput[s].selected&&values.push(encodeURIComponent(formInput[s].value))}else l=formInput.value}if(e.deBugger("forms","Input Value = "+l),l){i[inputName].value||(i[inputName].value=[]),i[inputName].value.push(multiple?values.join(","):encodeURIComponent(l));var l=multiple?values.join(","):encodeURIComponent(l)}}e.deBugger("forms",i);for(var u in i){var d=i[u].value,c=i[u].map;if("undefined"!=typeof d&&null!=d&&""!=d&&a.push(u+"="+i[u].value.join(",")),"undefined"!=typeof c&&null!=c&&i[u].value&&(r.push(c+"="+i[u].value.join(",")),"email"===u))var m=i[u].value.join(",")}var f=a.join("&");e.deBugger("forms","Stringified Raw Form PARAMS: "+f);var g=r.join("&");e.deBugger("forms","Stringified Mapped PARAMS"+g);var m=n.getParameterVal("email",g)||n.readCookie("wp_lead_email");m||(m=n.getParameterVal("wpleads_email_address",g));var p=n.getParameterVal("name",g),v=n.getParameterVal("first_name",g),h=n.getParameterVal("last_name",g);if(!h&&v){var _=decodeURI(v).split(" ");_.length>0&&(v=_[0],h=_[1])}if(p&&!h&&!v){var _=decodeURI(p).split(" ");_.length>0&&(v=_[0],h=_[1])}p=v&&h?v+" "+h:p,v||(v=""),h||(h=""),e.deBugger("forms","fName = "+v),e.deBugger("forms","lName = "+h),e.deBugger("forms","fullName = "+p);var b=e.totalStorage("page_views")||{},y=e.totalStorage("inbound_url_params")||{};if("undefined"!=typeof landing_path_info)var w=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)var w=cta_path_info.variation;else var w=inbound_settings.variation_id;var k=inbound_settings.post_type||"page",C=inbound_settings.post_id||0;search_data={},formData={action:"inbound_lead_store",email:m,full_name:p,first_name:v,last_name:h,raw_params:f,mapped_params:g,url_params:JSON.stringify(y),search_data:"test",page_views:JSON.stringify(b),post_type:k,page_id:C,variation:w,source:n.readCookie("inbound_referral_site")},callback=function(i){e.deBugger("forms","Lead Created with ID: "+i),i=parseInt(i,10),formData.leadID=i,i&&(n.createCookie("wp_lead_id",i),e.totalStorage.deleteItem("page_views"),e.totalStorage.deleteItem("tracking_events")),e.trigger("form_after_submission",formData),e.Forms.releaseFormSubmit(t)},e.trigger("form_before_submission",formData),n.ajaxPost(inbound_settings.admin_url,formData,callback)},rememberInputValues:function(t){var i=(t.name?"inbound_"+t.name:"",t.type?t.type:"text");return"submit"===i||"hidden"===i||"file"===i||"password"===i||t.dataset.ignoreFormField?!1:(n.addListener(t,"change",function(t){if(t.target.name){if("checkbox"!==i)var o=t.target.value;else for(var a=[],r=document.querySelectorAll('input[name="'+t.target.name+'"]'),s=0;s<r.length;s++){var l=r[s].checked;l&&a.push(r[s].value),o=a.join(",")}inputData={name:t.target.name,node:t.target.nodeName.toLowerCase(),type:i,value:o,mapping:t.target.dataset.mapFormField},e.trigger("form_input_change",inputData),n.createCookie("inbound_"+t.target.name,encodeURIComponent(o))}}),void 0)},fillInputValues:function(e){var t=e.name?"inbound_"+e.name:"",i=e.type?e.type:"text";if("submit"===i||"hidden"===i||"file"===i||"password"===i)return!1;if(n.readCookie(t)&&"comment"!=t)if(value=decodeURIComponent(n.readCookie(t)),"checkbox"===i||"radio"===i)for(var o=value.split(","),a=0;a<o.length;a++)e.value.indexOf(o[a])>-1&&(e.checked=!0);else"undefined"!==value&&(e.value=value)},getInputLabel:function(e){var t;return(t=this.siblingsIsLabel(e))?t:(t=this.CheckParentForLabel(e))?t:!1},getInputValue:function(e){var t=!1;switch(e.type){case"radio":case"checkbox":e.checked&&(t=e.value);break;case"text":case"hidden":default:t=e.value}return t},addDataAttr:function(e,t){for(var n=document.getElementsByName(e.name),i=n.length-1;i>=0;i--)e.dataset.mapFormField||(n[i].dataset.mapFormField=t)},removeArrayItem:function(e,t){if(e.indexOf)index=e.indexOf(t);else for(index=e.length-1;index>=0&&e[index]!==t;--index);index>=0&&e.splice(index,1)},siblingsIsLabel:function(e){for(var t=this.getSiblings(e),n=[],i=t.length-1;i>=0;i--)"label"===t[i].nodeName.toLowerCase()&&n.push(t[i]);return n.length>0&&n.length<2?n:!1},getChildren:function(e,t){for(var n=[];e;e=e.nextSibling)1==e.nodeType&&e!=t&&n.push(e);return n},getSiblings:function(e){return this.getChildren(e.parentNode.firstChild,e)},CheckParentForLabel:function(e){if("FORM"===e.nodeName)return null;do{var t=e.getElementsByTagName("label");if(t.length>0&&t.length<2)return e.getElementsByTagName("label")}while(e=e.parentNode);return null},mailCheck:function(){var e=document.querySelector(".inbound-email");e&&(n.addListener(e,"blur",this.mailCheck),u.run({email:document.querySelector(".inbound-email").value,suggested:function(t){var i=document.querySelector(".email_suggestion");i&&n.removeElement(i);var o=document.createElement("span");o.innerHTML="<span class=\"email_suggestion\">Did youu mean <b><i id='email_correction' style='cursor: pointer;' title=\"click to update\">"+t.full+"</b></i>?</span>",e.parentNode.insertBefore(o,e.nextSibling);var a=document.getElementById("email_correction");n.addListener(a,"click",function(){e.value=a.innerHTML,a.parentNode.parentNode.innerHTML="Fixed!"})},empty:function(){}}))}},"undefined"==typeof u)var u={domainThreshold:1,topLevelThreshold:3,defaultDomains:["yahoo.com","google.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","mail.com","outlook.com","icloud.com"],defaultTopLevelDomains:["co.jp","co.uk","com","net","org","info","edu","gov","mil","ca","de"],run:function(e){e.domains=e.domains||u.defaultDomains,e.topLevelDomains=e.topLevelDomains||u.defaultTopLevelDomains,e.distanceFunction=e.distanceFunction||u.sift3Distance;var t=function(e){return e},n=e.suggested||t,i=e.empty||t,o=u.suggest(u.encodeEmail(e.email),e.domains,e.topLevelDomains,e.distanceFunction);return o?n(o):i()},suggest:function(e,t,n,i){e=e.toLowerCase();var o=this.splitEmail(e),a=this.findClosestDomain(o.domain,t,i,this.domainThreshold);if(a){if(a!=o.domain)return{address:o.address,domain:a,full:o.address+"@"+a}}else{var r=this.findClosestDomain(o.topLevelDomain,n,i,this.topLevelThreshold);if(o.domain&&r&&r!=o.topLevelDomain){var s=o.domain;return a=s.substring(0,s.lastIndexOf(o.topLevelDomain))+r,{address:o.address,domain:a,full:o.address+"@"+a}}}return!1},findClosestDomain:function(e,t,n,i){i=i||this.topLevelThreshold;var o,a=99,r=null;if(!e||!t)return!1;n||(n=this.sift3Distance);for(var s=0;s<t.length;s++){if(e===t[s])return e;o=n(e,t[s]),a>o&&(a=o,r=t[s])}return i>=a&&null!==r?r:!1},sift3Distance:function(e,t){if(null===e||0===e.length)return null===t||0===t.length?0:t.length;if(null===t||0===t.length)return e.length;for(var n=0,i=0,o=0,a=0,r=5;n+i<e.length&&n+o<t.length;){if(e.charAt(n+i)==t.charAt(n+o))a++;else{i=0,o=0;for(var s=0;r>s;s++){if(n+s<e.length&&e.charAt(n+s)==t.charAt(n)){i=s;break}if(n+s<t.length&&e.charAt(n)==t.charAt(n+s)){o=s;break}}}n++}return(e.length+t.length)/2-a},splitEmail:function(e){var t=e.trim().split("@");if(t.length<2)return!1;for(var n=0;n<t.length;n++)if(""===t[n])return!1;var i=t.pop(),o=i.split("."),a="";if(0===o.length)return!1;if(1==o.length)a=o[0];else{for(var n=1;n<o.length;n++)a+=o[n]+".";o.length>=2&&(a=a.substring(0,a.length-1))}return{topLevelDomain:a,domain:i,address:t.join("@")}},encodeEmail:function(e){var t=encodeURI(e);return t=t.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};return e}(_inbound||{}),_inboundEvents=function(e){function t(t,i,o){var i=i||{};o=o||{},o.bubbles=o.bubbles||!0,o.cancelable=o.cancelable||!0,i=e.apply_filters("filter_"+t,i);!window.ActiveXObject&&"ActiveXObject"in window;if("function"==typeof CustomEvent)var a=new CustomEvent(t,{detail:i,bubbles:o.bubbles,cancelable:o.cancelable});else{var a=document.createEvent("Event");a.initEvent(t,!0,!0)}window.dispatchEvent(a),e.do_action(t,i),n(t,i)}function n(e,t){if(window.jQuery){var t=t||{};jQuery(document).trigger(e,t)}}e.trigger=function(t,n){e.Events[t](n)};return e.Events={analytics_ready:function(){var e={opt1:!0},n={data:"xyxy"};t("analytics_ready",n,e)},url_parameters:function(e){t("url_parameters",e)},session_start:function(){console.log(""),t("session_start")},session_end:function(e){t("session_end",e),console.log("Session End")},session_active:function(){t("session_active")},session_idle:function(e){t("session_idle",e)},session_resume:function(){t("session_resume")},session_heartbeat:function(e){var n={clock:e,leadData:InboundLeadData};t("session_heartbeat",n)},page_visit:function(e){t("page_view",e)},page_first_visit:function(){t("page_first_visit"),e.deBugger("pages","First Ever Page View of this Page")},page_revisit:function(n){t("page_revisit",n);var i=function(){console.log("pageData",n),console.log("Page Revisit viewed "+n+" times")};e.deBugger("pages",status,i)},tab_hidden:function(){e.deBugger("pages","Tab Hidden"),t("tab_hidden")},tab_visible:function(){e.deBugger("pages","Tab Visible"),t("tab_visible")},tab_mouseout:function(){e.deBugger("pages","Tab Mouseout"),t("tab_mouseout")},form_input_change:function(n){var i=function(){console.log(n)};e.deBugger("forms","inputData change. Data=",i),t("form_input_change",n)},form_before_submission:function(e){t("form_before_submission",e)},form_after_submission:function(e){t("form_after_submission",e)},analyticsError:function(e,t,n){var i=new CustomEvent("inbound_analytics_error",{detail:{MLHttpRequest:e,textStatus:t,errorThrown:n}});window.dispatchEvent(i),console.log("Page Save Error")}},e}(_inbound||{}),InboundTotalStorage=function(e){var t,n,i="_inbound";if("localStorage"in window)try{n="undefined"==typeof window.localStorage?void 0:window.localStorage,t="undefined"==typeof n||"undefined"==typeof window.JSON?!1:!0,window.localStorage.setItem(i,"1"),window.localStorage.removeItem(i)}catch(o){t=!1}e.totalStorage=function(t,n){return e.totalStorage.impl.init(t,n)},e.totalStorage.setItem=function(t,n){return e.totalStorage.impl.setItem(t,n)},e.totalStorage.getItem=function(t){return e.totalStorage.impl.getItem(t)},e.totalStorage.getAll=function(){return e.totalStorage.impl.getAll()},e.totalStorage.deleteItem=function(t){return e.totalStorage.impl.deleteItem(t)},e.totalStorage.impl={init:function(e,t){return"undefined"!=typeof t?this.setItem(e,t):this.getItem(e)},setItem:function(i,o){if(!t)try{return e.Utils.createCookie(i,o),o}catch(a){console.log("Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie")}var r=JSON.stringify(o);return n.setItem(i,r),this.parseResult(r)},getItem:function(i){if(!t)try{return this.parseResult(e.Utils.readCookie(i))}catch(o){return null}var a=n.getItem(i);return this.parseResult(a)},deleteItem:function(i){if(!t)try{return e.Utils.eraseCookie(i,null),!0}catch(o){return!1}return n.removeItem(i),!0},getAll:function(){var i=[];if(t)for(var o in n)o.length&&i.push({key:o,value:this.parseResult(n.getItem(o))});else try{for(var a=document.cookie.split(";"),r=0;r<a.length;r++){var s=a[r].split("="),l=s[0];i.push({key:l,value:this.parseResult(e.Utils.readCookie(l))})}}catch(u){return null}return i},parseResult:function(e){var t;try{t=JSON.parse(e),"undefined"==typeof t&&(t=e),"true"==t&&(t=!0),"false"==t&&(t=!1),parseFloat(t)==t&&"object"!=typeof t&&(t=parseFloat(t))}catch(n){t=e}return t}}}(_inbound||{}),_inboundLeadsAPI=function(e){return e.LeadsAPI={init:function(){var t=e.Utils,n=(t.readCookie("wp_lead_uid"),t.readCookie("wp_lead_id")),i=t.readCookie("lead_session_expire");i||(e.deBugger("leads","expired vistor. Run Processes"),n&&e.LeadsAPI.getAllLeadData())},setGlobalLeadData:function(e){InboundLeadData=e},getAllLeadData:function(){var t=e.Utils.readCookie("wp_lead_id"),n=e.totalStorage("inbound_lead_data"),i=e.Utils.readCookie("lead_data_expire");data={action:"inbound_get_all_lead_data",wp_lead_id:t},success=function(t){var n=JSON.parse(t);e.LeadsAPI.setGlobalLeadData(n),e.totalStorage("inbound_lead_data",n);var i=new Date;i.setTime(i.getTime()+18e5);var o=e.Utils.addDays(i,3);e.Utils.createCookie("lead_data_expire",!0,o)},n?(e.LeadsAPI.setGlobalLeadData(n),e.deBugger("lead","Set Global Lead Data from Localstorage"),i||(e.Utils.ajaxPost(inbound_settings.admin_url,data,success),e.deBugger("lead","localized data old. Pull new from DB"))):e.Utils.ajaxPost(inbound_settings.admin_url,data,success)},getLeadLists:function(){var t=e.Utils.readCookie("wp_lead_id"),n={action:"wpl_check_lists",wp_lead_id:t},i=function(){e.Utils.createCookie("lead_session_list_check",!0,{path:"/",expires:1}),e.deBugger("lead","Lists checked")};e.Utils.ajaxPost(inbound_settings.admin_url,n,i)}},e}(_inbound||{}),_inboundPageTracking=function(e){var t,n,i=!1,o=!1,a=!1,r=parseInt(e.Utils.readCookie("lead_session"),10)||0,s=0,l=(new Date,null),u=null,d=null,c=e.Utils,m=e.Utils.GetDate(),f="page_views",g=e.totalStorage(f)||{},p=inbound_settings.post_id||window.location.pathname,v=e.Settings.timeout||1e4;return e.PageTracking={init:function(i){return"page_views"!==f?!1:(this.CheckTimeOut(),i=i||{},t=parseInt(i.reportInterval,10)||10,n=parseInt(i.idleTimeout,10)||3,c.addListener(document,"keydown",c.throttle(e.PageTracking.pingSession,1e3)),c.addListener(document,"click",c.throttle(e.PageTracking.pingSession,1e3)),c.addListener(window,"mousemove",c.throttle(e.PageTracking.pingSession,1e3)),e.PageTracking.checkVisibility(),this.startSession(),void 0)},setIdle:function(t){var t=t||"No Movement",n="Session IDLE. Activity Timeout due to "+t;e.deBugger("pages",n),clearTimeout(e.PageTracking.idleTimer),e.PageTracking.stopClock(),e.trigger("session_idle")
3
- },checkVisibility:function(){var t,n,i;"undefined"!=typeof document.hidden?(t="hidden",i="visibilitychange",n="visibilityState"):"undefined"!=typeof document.mozHidden?(t="mozHidden",i="mozvisibilitychange",n="mozVisibilityState"):"undefined"!=typeof document.msHidden?(t="msHidden",i="msvisibilitychange",n="msVisibilityState"):"undefined"!=typeof document.webkitHidden&&(t="webkitHidden",i="webkitvisibilitychange",n="webkitVisibilityState");var o=document[t];e.Utils.addListener(document,i,function(){o!=document[t]&&(document[t]?(e.trigger("tab_hidden"),e.PageTracking.setIdle("browser tab switch")):(e.trigger("tab_visible"),e.PageTracking.pingSession()),o=document[t])})},clock:function(){r+=1;var n=r/60,i="Total time spent on Page in this Session: "+n.toFixed(2)+" min";if(e.deBugger("pages",i),r>0&&r%t===0){var o=new Date;o.setTime(o.getTime()+18e5),c.createCookie("lead_session",r,o),e.trigger("session_heartbeat",r)}},inactiveClock:function(){s+=1;var t=(1800-s)/60,n="Time until Session Timeout: "+t.toFixed(2)+" min";e.deBugger("pages",n),s>1800&&(e.trigger("session_end",InboundLeadData),e.Utils.eraseCookie("lead_session"),s=0,clearTimeout(u))},stopClock:function(){o=!0,clearTimeout(l),clearTimeout(u),u=setInterval(e.PageTracking.inactiveClock,1e3)},restartClock:function(){o=!1,e.trigger("session_resume"),e.deBugger("pages","Activity resumed. Session Active"),clearTimeout(l),s=0,clearTimeout(u),l=setInterval(e.PageTracking.clock,1e3)},turnOff:function(){e.PageTracking.setIdle(),a=!0},turnOn:function(){a=!1},startSession:function(){new Date;i=!0,l=setInterval(e.PageTracking.clock,1e3);var t=c.readCookie("lead_session");if(t)e.trigger("session_active");else{e.trigger("session_start");var n=new Date;n.setTime(n.getTime()+18e5),e.Utils.createCookie("lead_session",1,n)}this.pingSession()},resetInactiveFunc:function(){s=0,clearTimeout(u)},pingSession:function(t){a||(i||e.PageTracking.startSession(),o&&e.PageTracking.restartClock(),clearTimeout(d),d=setTimeout(e.PageTracking.setIdle,1e3*n+100),"undefined"!=typeof t&&"mousemove"===t.type&&e.PageTracking.mouseEvents(t))},mouseEvents:function(t){t.pageY<=5&&e.trigger("tab_mouseout")},getPageViews:function(){var t=e.Utils.checkLocalStorage();if(t){var n=localStorage.getItem(f),i=JSON.parse(n);return i}},isRevisit:function(e){var t=!1,e=e||{},n=e[p];return"undefined"!=typeof n&&null!==n&&(t=!0),t},triggerPageView:function(t){var n={title:document.title,url:document.location.href,path:document.location.pathname,count:1};t?(g[p].push(m),n.count=g[p].length,e.trigger("page_revisit",n)):(g[p]=[],g[p].push(m),e.trigger("page_first_visit",n)),e.trigger("page_visit",n),e.totalStorage(f,g),this.storePageView()},CheckTimeOut:function(){var t,n,i=this.isRevisit(g);if(i){var o=g[p].length-1,a=g[p][o],r=Math.abs(new Date(a).getTime()-new Date(m).getTime());n=r>v,n?(t="Timeout Happened. Page view fired",this.triggerPageView(i)):(time_left=.001*Math.abs(v-r),t=v/1e3+" sec timeout not done: "+time_left+" seconds left")}else this.triggerPageView(i);e.deBugger("pages",t)},storePageView:function(){if("off"!=inbound_settings.page_tracking){var t=e.Utils.readCookie("wp_lead_id")?e.Utils.readCookie("wp_lead_id"):"",n=e.Utils.readCookie("wp_lead_uid")?e.Utils.readCookie("wp_lead_uid"):"",i={action:"inbound_track_lead",wp_lead_uid:n,wp_lead_id:t,page_id:inbound_settings.post_id,variation_id:inbound_settings.variation_id,post_type:inbound_settings.post_type,current_url:window.location.href,json:"0"},o=function(){};e.Utils.ajaxPost(inbound_settings.admin_url,i,o)}}},e}(_inbound||{});_inbound.init(),InboundLeadData=_inbound.totalStorage("inbound_lead_data")||null;
1
+ /*! Inbound Analyticsv1.0.0 | (c) 2016 Inbound Now | https://github.com/inboundnow/cta */
2
+ var inbound_data=inbound_data||{},_inboundOptions=_inboundOptions||{},_gaq=_gaq||[],_inbound=function(e){var t={timeout:inbound_settings.is_admin?500:1e4,formAutoTracking:!0,formAutoPopulation:!0},n={init:function(){_inbound.Utils.init(),_inbound.Utils.domReady(window,function(){_inbound.DomLoaded()})},DomLoaded:function(){_inbound.PageTracking.init(),_inbound.Forms.init(),_inbound.Utils.setUrlParams(),_inbound.LeadsAPI.init(),setTimeout(function(){_inbound.Forms.init()},2e3),_inbound.trigger("analytics_ready")},extend:function(e,t){var n,i={};for(n in e)Object.prototype.hasOwnProperty.call(e,n)&&(i[n]=e[n]);for(n in t)Object.prototype.hasOwnProperty.call(t,n)&&(i[n]=t[n]);return i},debug:function(){},deBugger:function(e,t,n){if(console){var i,o,a,r=document.location.hash?document.location.hash:"",s=r.indexOf("#debug")>-1,t=t||!1;r&&r.match(/debug/)&&(r=r.split("-"),a=r[1]),o="true"===_inbound.Utils.readCookie("inbound_debug")?!0:!1,i="true"===_inbound.Utils.readCookie("inbound_debug_"+e)?!0:!1,(i||s||o)&&(t&&"string"==typeof t&&(o||"all"===a?console.log('logAll "'+e+'" =>',t):i?console.log('log "'+e+'" =>',t):e===a&&console.log('#log "'+e+'" =>',t)),n&&n instanceof Function&&n())}}},i=n.extend(t,e);return n.Settings=i||{},n}(_inboundOptions),_inboundHooks=function(e){var t=function(){function e(e,t,n,i){return"string"==typeof e&&"function"==typeof t&&(n=parseInt(n||10,10),s("actions",e,t,n,i)),d}function t(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t&&u("actions",t,e),d}function n(e,t){return"string"==typeof e&&r("actions",e,t),d}function i(e,t,n){return"string"==typeof e&&"function"==typeof t&&(n=parseInt(n||10,10),s("filters",e,t,n)),d}function o(){var e=Array.prototype.slice.call(arguments),t=e.shift();return"string"==typeof t?u("filters",t,e):d}function a(e,t){return"string"==typeof e&&r("filters",e,t),d}function r(e,t,n,i){if(c[e][t])if(n){var o,a=c[e][t];if(i)for(o=a.length;o--;){var r=a[o];r.callback===n&&r.context===i&&a.splice(o,1)}else for(o=a.length;o--;)a[o].callback===n&&a.splice(o,1)}else c[e][t]=[]}function s(e,t,n,i,o){var a={callback:n,priority:i,context:o},r=c[e][t];r?(r.push(a),r=l(r)):r=[a],c[e][t]=r}function l(e){for(var t,n,i,o=1,a=e.length;a>o;o++){for(t=e[o],n=o;(i=e[n-1])&&i.priority>t.priority;)e[n]=e[n-1],--n;e[n]=t}return e}function u(e,t,n){var i=c[e][t];if(!i)return"filters"===e?n[0]:!1;var o=0,a=i.length;if("filters"===e)for(;a>o;o++)n[0]=i[o].callback.apply(i[o].context,n);else for(;a>o;o++)i[o].callback.apply(i[o].context,n);return"filters"===e?n[0]:!0}var d={removeFilter:a,applyFilters:o,addFilter:i,removeAction:n,doAction:t,addAction:e},c={actions:{},filters:{}};return d};return e.hooks=new t,e.add_action=function(){var t=arguments[0].split(" ");for(k in t)arguments[0]="inbound."+t[k],e.hooks.addAction.apply(this,arguments);return this},e.remove_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeAction.apply(this,arguments),this},e.do_action=function(){return arguments[0]="inbound."+arguments[0],e.hooks.doAction.apply(this,arguments),this},e.add_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.addFilter.apply(this,arguments),this},e.remove_filter=function(){return arguments[0]="inbound."+arguments[0],e.hooks.removeFilter.apply(this,arguments),this},e.apply_filters=function(){return arguments[0]="inbound."+arguments[0],e.hooks.applyFilters.apply(this,arguments)},e}(_inbound||{}),_inboundUtils=function(e){var t,n=window.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,i=(Object.prototype.toString,("https:"==location.protocol?"https://":"http://")+location.hostname+location.pathname.replace(/\/#x2F;,"")),o={api_host:i,track_pageview:!0,track_links_timeout:300,cookie_name:"_sp",cookie_expiration:365,cookie_domain:(host=location.hostname.match(/[a-z0-9][a-z0-9\-]+\.[a-z\.]{2,6}#x2F;i))?host[0]:""};return e.Utils={init:function(){this.polyFills(),this.checkLocalStorage(),this.SetUID(),this.storeReferralData()},polyFills:function(){window.console||(window.console={});for(var e=["log","info","warn","error","debug","trace","dir","group","groupCollapsed","groupEnd","time","timeEnd","profile","profileEnd","dirxml","assert","count","markTimeline","timeStamp","clear"],t=0;t<e.length;t++)window.console[e[t]]||(window.console[e[t]]=function(){});Date.prototype.toISOString||!function(){function e(e){var t=String(e);return 1===t.length&&(t="0"+t),t}Date.prototype.toISOString=function(){return this.getUTCFullYear()+"-"+e(this.getUTCMonth()+1)+"-"+e(this.getUTCDate())+"T"+e(this.getUTCHours())+":"+e(this.getUTCMinutes())+":"+e(this.getUTCSeconds())+"."+String((this.getUTCMilliseconds()/1e3).toFixed(3)).slice(2,5)+"Z"}}();try{new CustomEvent("?")}catch(n){this.CustomEvent=function(e,t){function n(n,o){var a=document.createEvent(e);return null!==n?i.call(a,n,(o||(o=t)).bubbles,o.cancelable,o.detail):a.initCustomEvent=i,a}function i(t,n,i,o){this["init"+e](t,n,i,o),"detail"in this||(this.detail=o)}return n}(this.CustomEvent?"CustomEvent":"Event",{bubbles:!1,cancelable:!1,detail:null})}document.querySelectorAll||(document.querySelectorAll=function(e){var t,n=document.createElement("style"),i=[];for(document.documentElement.firstChild.appendChild(n),document._qsa=[],n.styleSheet.cssText=e+"{x-qsa:expression(document._qsa && document._qsa.push(this))}",window.scrollBy(0,0),n.parentNode.removeChild(n);document._qsa.length;)t=document._qsa.shift(),t.style.removeAttribute("x-qsa"),i.push(t);return document._qsa=null,i}),document.querySelector||(document.querySelector=function(e){var t=document.querySelectorAll(e);return t.length?t[0]:null}),!("innerText"in document.createElement("a"))&&"getSelection"in window&&HTMLElement.prototype.__defineGetter__("innerText",function(){for(var e,t=window.getSelection(),n=[],i=0;i<t.rangeCount;i++)n[i]=t.getRangeAt(i);t.removeAllRanges(),t.selectAllChildren(this),e=t.toString(),t.removeAllRanges();for(var i=0;i<n.length;i++)t.addRange(n[i]);return e})},createCookie:function(e,t,n){var i="";if(n){var o=new Date;o.setTime(o.getTime()+24*n*60*60*1e3),i="; expires="+o.toGMTString()}document.cookie=e+"="+t+i+"; path=/"},readCookie:function(e){for(var t=e+"=",n=document.cookie.split(";"),i=0;i<n.length;i++){for(var o=n[i];" "===o.charAt(0);)o=o.substring(1,o.length);if(0===o.indexOf(t))return o.substring(t.length,o.length)}return null},eraseCookie:function(e){this.createCookie(e,"",-1)},getAllCookies:function(){var t={};if(document.cookie&&""!==document.cookie)for(var n=document.cookie.split(";"),i=0;i<n.length;i++){var o=n[i].split("=");o[0]=o[0].replace(/^ /,""),t[decodeURIComponent(o[0])]=decodeURIComponent(o[1])}return e.totalStorage("inbound_cookies",t),t},setUrlParams:function(){var n={};!function(){for(var e,t=function(e){return decodeURIComponent(e).replace(/\+/g," ")},i=window.location.search.substring(1),o=/([^&=]+)=?([^&]*)/g;e=o.exec(i);)if("-1"==e[1].indexOf("["))n[t(e[1])]=t(e[2]);else{var a=e[1].indexOf("["),r=e[1].slice(a+1,e[1].indexOf("]",a)),s=t(e[1].slice(0,a));"object"!=typeof n[s]&&(n[t(s)]={},n[t(s)].length=0),r?n[t(s)][t(r)]=t(e[2]):Array.prototype.push.call(n[t(s)],t(e[2]))}}();for(var i in n)if("object"==typeof n[i])for(var o in n[i])this.createCookie(o,n[i][o],30);else this.createCookie(i,n[i],30);if(t){var a=e.totalStorage("inbound_url_params")||{},r=this.mergeObjs(a,n);e.totalStorage("inbound_url_params",r)}var s={option1:"yo",option2:"woooo"};e.trigger("url_parameters",n,s)},getAllUrlParams:function(){var n={};if(t)var n=e.totalStorage("inbound_url_params");return n},getParameterVal:function(e,t){return(RegExp(e+"=(.+?)(&|$)").exec(t)||[,!1])[1]},checkLocalStorage:function(){if("localStorage"in window)try{ls="undefined"==typeof window.localStorage?void 0:window.localStorage,t="undefined"==typeof ls||"undefined"==typeof window.JSON?!1:!0}catch(e){t=!1}return t},showLocalStorageSize:function(){function e(e){return 2*e.length}function t(e){return e/1024/1024}function n(t){return{name:t,size:e(localStorage[t])}}function i(e){return e.size=t(e.size).toFixed(2)+" MB",e}var o=Object.keys(localStorage).map(n).map(i);console.table(o)},addDays:function(e,t){return new Date(e.getTime()+24*t*60*60*1e3)},GetDate:function(){var e=new Date,t=e.getDate(),n=10>t?"0":"",i=e.getFullYear(),o=e.getHours(),a=10>o?"0":"",r=e.getMinutes(),s=10>r?"0":"",l=e.getSeconds(),u=10>l?"0":"",d=e.getMonth()+1,c=10>d?"0":"",m=i+"/"+c+d+"/"+n+t+" "+a+o+":"+s+r+":"+u+l;return m},SetSessionTimeout:function(){var e=(this.readCookie("lead_session_expire"),new Date);e.setTime(e.getTime()+18e5),this.createCookie("lead_session_expire",!0,e)},storeReferralData:function(){var t=new Date,n=document.referrer||"Direct Traffic",i=e.Utils.readCookie("inbound_referral_site"),o=e.totalStorage("inbound_original_referral");t.setTime(t.getTime()+18e5),i||this.createCookie("inbound_referral_site",n,t),o||e.totalStorage("inbound_original_referral",o)},CreateUID:function(e){var t="0123456789ABCDEFGHIJKLMNOPQRSTUVWXTZabcdefghiklmnopqrstuvwxyz".split(""),n="";e||(e=Math.floor(Math.random()*t.length));for(var i=0;e>i;i++)n+=t[Math.floor(Math.random()*t.length)];return n},generateGUID:function(e){return e?(e^16*Math.random()>>e/4).toString(16):([1e7]+-1e3+-4e3+-8e3+-1e11).replace(/[018]/g,guid)},SetUID:function(e){if(!this.readCookie("wp_lead_uid")){var t=e||this.CreateUID(35);this.createCookie("wp_lead_uid",t)}},countProperties:function(e){var t=0;for(var n in e)e.hasOwnProperty(n)&&++t;return t},mergeObjs:function(e,t){var n={};for(var i in e)n[i]=e[i];for(var i in t)n[i]=t[i];return n},hasClass:function(e,t){var n;if("classList"in document.documentElement)var n=t.classList.contains(e);else var n=new RegExp("(^|\\s)"+e+"(\\s|$)").test(t.className);return n},addClass:function(e,t){"classList"in document.documentElement?t.classList.add(e):this.hasClass(t,e)||(t.className+=(t.className?" ":"")+e)},removeClass:function(e,t){"classList"in document.documentElement?t.classList.remove(e):this.hasClass(t,e)&&(t.className=t.className.replace(new RegExp("(^|\\s)*"+e+"(\\s|$)*","g"),""))},removeElement:function(e){e.parentNode.removeChild(e)},trim:function(e){return e=e.replace(/(^\s*)|(\s*$)/gi,""),e=e.replace(/[ ]{2,}/gi," "),e=e.replace(/\n /,"\n")},ajaxPolyFill:function(){if("undefined"!=typeof XMLHttpRequest)return new XMLHttpRequest;for(var e,t=["MSXML2.XmlHttp.5.0","MSXML2.XmlHttp.4.0","MSXML2.XmlHttp.3.0","MSXML2.XmlHttp.2.0","Microsoft.XmlHttp"],n=0;n<t.length;n++)try{e=new ActiveXObject(t[n]);break}catch(i){}return e},ajaxSendData:function(e,t,n,i){var o=this.ajaxPolyFill();setTimeout(function(){o.open(n,e,!0),o.onreadystatechange=function(){4==o.readyState&&t(o.responseText)},"POST"==n&&o.setRequestHeader("Content-type","application/x-www-form-urlencoded"),o.send(i)},100)},ajaxGet:function(e,t,n,i){var o=[];for(var a in t)o.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e+"?"+o.join("&"),n,"GET",null,i)},ajaxPost:function(e,t,n,i){var o=[];for(var a in t)o.push(encodeURIComponent(a)+"="+encodeURIComponent(t[a]));this.ajaxSendData(e,n,"POST",o.join("&"),i)},sendEvent:function(e,t,i){t=t||{},async=!0;var a=getCookie();if(a){var r;for(r in a)t[r]=a[r]}t.id||(t.id=getId());var s={e:e,t:(new Date).toISOString(),kv:t},l=o.api_host+"/track?data="+encodeURIComponent(JSON.stringify(s));if(n){var u=new XMLHttpRequest;u.open("GET",l,async),u.withCredentials=async,u.send(null)}else{var d=document.createElement("script");d.type="text/javascript",d.async=async,d.defer=async,d.src=l;var c=document.getElementsByTagName("script")[0];c.parentNode.insertBefore(d,c)}return action(i),self},domReady:function(e,t){var n=!1,i=!0,o=e.document,a=o.documentElement,r=o.addEventListener?"addEventListener":"attachEvent",s=o.addEventListener?"removeEventListener":"detachEvent",l=o.addEventListener?"":"on",u=function(i){("readystatechange"!=i.type||"complete"==o.readyState)&&(("load"==i.type?e:o)[s](l+i.type,u,!1),!n&&(n=!0)&&t.call(e,i.type||i))},d=function(){try{a.doScroll("left")}catch(e){return setTimeout(d,50),void 0}u("poll")};if("complete"==o.readyState)t.call(e,"lazy");else{if(o.createEventObject&&a.doScroll){try{i=!e.frameElement}catch(c){}i&&d()}o[r](l+"DOMContentLoaded",u,!1),o[r](l+"readystatechange",u,!1),e[r](l+"load",u,!1)}},addListener:function(e,t,n){e&&(e.addEventListener?e.addEventListener(t,n,!1):e.attachEvent?e.attachEvent("on"+t,n):e["on"+t]=n)},removeListener:function(e,t,n){e.removeEventListener?e.removeEventListener(t,n,!1):e.detachEvent?e.detachEvent("on"+t,n):e["on"+t]=null},throttle:function(e,t){var n,i,o,a=null,r=0,s=function(){r=new Date,a=null,o=e.apply(n,i)};return function(){var l=new Date;r||(r=l);var u=t-(l-r);return n=this,i=arguments,0>=u?(clearTimeout(a),a=null,r=l,o=e.apply(n,i)):a||(a=setTimeout(s,u)),o}},checkTypeofGA:function(){"function"==typeof ga&&(universalGA=!0),"undefined"!=typeof _gaq&&"function"==typeof _gaq.push&&(classicGA=!0),"undefined"!=typeof dataLayer&&"function"==typeof dataLayer.push&&(googleTagManager=!0)}},e}(_inbound||{}),InboundForms=function(e){var t=!1,n=e.Utils,o=[],a=[],r=[],s=e.Settings,l=["first name","last name","name","email","e-mail","phone","website","job title","your favorite food","company","tele","address","comment"];if(e.Forms={init:function(){e.Forms.runFieldMappingFilters(),e.Forms.assignTrackClass(),e.Forms.formTrackInit()},runFieldMappingFilters:function(){l=e.hooks.applyFilters("forms.field_map",l)},debug:function(e,n){if(t&&console){var e=e||!1;e&&"string"==typeof e&&console.log(e),n&&n instanceof Function&&n()}},formTrackInit:function(){for(var e=0;e<window.document.forms.length;e++){var t=!1,n=window.document.forms[e];n.dataset.formProcessed||(n.dataset.formProcessed=!0,t=this.checkTrackStatus(n),t&&(this.attachFormSubmitEvent(n),this.initFormMapping(n)))}},checkTrackStatus:function(t){var n=t.getAttribute("class");return""!==n&&null!==n?n.toLowerCase().indexOf("wpl-track-me")>-1?!0:n.toLowerCase().indexOf("inbound-track")>-1?!0:(cb=function(){console.log(t)},e.deBugger("forms","This form not tracked. Please assign on in settings...",cb),!1):void 0},assignTrackClass:function(){if(window.inbound_settings){if(inbound_settings.inbound_track_include){var t=inbound_settings.inbound_track_include.split(","),n="add selectors "+inbound_settings.inbound_track_include;e.deBugger("forms",n),this.loopClassSelectors(t,"add")}if(inbound_settings.inbound_track_exclude){var t=inbound_settings.inbound_track_exclude.split(","),n="remove selectors "+inbound_settings.inbound_track_exclude;e.deBugger("forms",n),this.loopClassSelectors(t,"remove")}}},loopClassSelectors:function(t,i){for(var o=t.length-1;o>=0;o--){var a=n.trim(t[o]);-1===a.indexOf("#")&&-1===a.indexOf(".")&&(a="#"+a),a=document.querySelector(a),a&&("add"===i?(e.Utils.addClass("wpl-track-me",a),e.Utils.addClass("inbound-track",a)):(e.Utils.removeClass("wpl-track-me",a),e.Utils.removeClass("inbound-track",a)))}},initFormMapping:function(t){for(var n=[],i=0;i<t.elements.length;i++)formInput=t.elements[i],"hidden"!==formInput.type?(this.mapField(formInput),this.rememberInputValues(formInput),s.formAutoPopulation&&!e.Utils.hasClass("nopopulate",t)&&this.fillInputValues(formInput)):n.push(formInput);for(var o=n.length-1;o>=0;o--)formInput=n[o],this.mapField(formInput)},mapField:function(t){var a=t.id||!1,r=t.name||!1,s=this.getInputLabel(t);if(s){var u=this.ignoreFieldByLabel(s[0].innerText);if(u)return t.dataset.ignoreFormField=!0,!1}for(i=0;i<l.length;i++){var d=!1,c=l[i],m=n.trim(c),f=m.replace(/ /g,"_");r&&r.toLowerCase().indexOf(m)>-1?(d=!0,e.deBugger("forms","Found matching name attribute for -> "+m)):a&&a.toLowerCase().indexOf(m)>-1?(d=!0,e.deBugger("forms","Found matching ID attribute for ->"+m)):s?s[0].innerText.toLowerCase().indexOf(m)>-1&&(d=!0,e.deBugger("forms","Found matching sibling label for -> "+m)):o.push(m),d&&(this.addDataAttr(t,f),this.removeArrayItem(l,m),i--)}return inbound_data},formListener:function(t){t.preventDefault(),e.Forms.saveFormData(t.target),document.body.style.cursor="wait"},attachFormSubmitEvent:function(e){n.addListener(e,"submit",this.formListener);document.querySelector(".inbound-email")},ignoreFieldByLabel:function(t){var n=!1;return t?((-1!=t.toLowerCase().indexOf("credit card")||-1!=t.toLowerCase().indexOf("card number"))&&(n=!0),(-1!=t.toLowerCase().indexOf("expiration")||-1!=t.toLowerCase().indexOf("expiry"))&&(n=!0),("month"==t.toLowerCase()||"mm"==t.toLowerCase()||"yy"==t.toLowerCase()||"yyyy"==t.toLowerCase()||"year"==t.toLowerCase())&&(n=!0),(-1!=t.toLowerCase().indexOf("cvv")||-1!=t.toLowerCase().indexOf("cvc")||-1!=t.toLowerCase().indexOf("secure code")||-1!=t.toLowerCase().indexOf("security code"))&&(n=!0),n&&e.deBugger("forms","ignore "+t),n):!1},ignoreFieldByValue:function(e){var t=!1;if(!e)return!1;("visa"==e.toLowerCase()||"mastercard"==e.toLowerCase()||"american express"==e.toLowerCase()||"amex"==e.toLowerCase()||"discover"==e.toLowerCase())&&(t=!0);var n=new RegExp("/^[0-9]+#x2F;");if(n.test(e)){var i=e.replace(" ","");this.isInt(i)&&i.length>=16&&(t=!0)}return t},isInt:function(e){return"number"==typeof e&&isFinite(e)&&e%1===0},releaseFormSubmit:function(e){document.body.style.cursor="default",n.removeClass("wpl-track-me",e),n.removeListener(e,"submit",this.formListener);var t=e.getAttribute("class");return""!==t&&null!==t&&-1!=t.toLowerCase().indexOf("wpcf7-form")?(setTimeout(function(){document.body.style.cursor="default"},300),!0):(e.submit(),setTimeout(function(){for(var t=0;t<e.elements.length;t++)formInput=e.elements[t],type=formInput.type||!1,"submit"===type&&"submit"===formInput.name&&e.elements[t].click()},2e3),void 0)},saveFormData:function(t){for(var i=i||{},o=0;o<t.elements.length;o++)if(formInput=t.elements[o],multiple=!1,formInput.name){if(formInput.dataset.ignoreFormField){e.deBugger("forms","ignore "+formInput.name);continue}switch(inputName=formInput.name.replace(/\[([^\[]*)\]/g,"%5B%5D$1"),i[inputName]||(i[inputName]={}),formInput.type&&(i[inputName].type=formInput.type),i[inputName].name||(i[inputName].name=formInput.name),formInput.dataset.mapFormField&&(i[inputName].map=formInput.dataset.mapFormField),formInput.nodeName){case"INPUT":if(l=this.getInputValue(formInput),l===!1)continue;break;case"TEXTAREA":l=formInput.value;break;case"SELECT":if(formInput.multiple){values=[],multiple=!0;for(var s=0;s<formInput.length;s++)formInput[s].selected&&values.push(encodeURIComponent(formInput[s].value))}else l=formInput.value}if(e.deBugger("forms","Input Value = "+l),l){i[inputName].value||(i[inputName].value=[]),i[inputName].value.push(multiple?values.join(","):encodeURIComponent(l));var l=multiple?values.join(","):encodeURIComponent(l)}}e.deBugger("forms",i);for(var u in i){var d=i[u].value,c=i[u].map;if("undefined"!=typeof d&&null!=d&&""!=d&&a.push(u+"="+i[u].value.join(",")),"undefined"!=typeof c&&null!=c&&i[u].value&&(r.push(c+"="+i[u].value.join(",")),"email"===u))var m=i[u].value.join(",")}var f=a.join("&");e.deBugger("forms","Stringified Raw Form PARAMS: "+f);var g=r.join("&");e.deBugger("forms","Stringified Mapped PARAMS"+g);var m=n.getParameterVal("email",g)||n.readCookie("wp_lead_email");m||(m=n.getParameterVal("wpleads_email_address",g));var p=n.getParameterVal("name",g),v=n.getParameterVal("first_name",g),h=n.getParameterVal("last_name",g);if(!h&&v){var _=decodeURI(v).split(" ");_.length>0&&(v=_[0],h=_[1])}if(p&&!h&&!v){var _=decodeURI(p).split(" ");_.length>0&&(v=_[0],h=_[1])}p=v&&h?v+" "+h:p,v||(v=""),h||(h=""),e.deBugger("forms","fName = "+v),e.deBugger("forms","lName = "+h),e.deBugger("forms","fullName = "+p);var b=e.totalStorage("page_views")||{},y=e.totalStorage("inbound_url_params")||{};if("undefined"!=typeof landing_path_info)var w=landing_path_info.variation;else if("undefined"!=typeof cta_path_info)var w=cta_path_info.variation;else var w=inbound_settings.variation_id;var k=inbound_settings.post_type||"page",C=inbound_settings.post_id||0;search_data={},formData={action:"inbound_lead_store",email:m,full_name:p,first_name:v,last_name:h,raw_params:f,mapped_params:g,url_params:JSON.stringify(y),search_data:"test",page_views:JSON.stringify(b),post_type:k,page_id:C,variation:w,source:n.readCookie("inbound_referral_site")},callback=function(i){e.deBugger("forms","Lead Created with ID: "+i),i=parseInt(i,10),formData.leadID=i,i&&(n.createCookie("wp_lead_id",i),e.totalStorage.deleteItem("page_views"),e.totalStorage.deleteItem("tracking_events"),n.eraseCookie("inbound_page_views")),e.trigger("form_after_submission",formData),e.Forms.releaseFormSubmit(t)},e.trigger("form_before_submission",formData),n.ajaxPost(inbound_settings.admin_url,formData,callback)},rememberInputValues:function(t){var i=(t.name?"inbound_"+t.name:"",t.type?t.type:"text");return"submit"===i||"hidden"===i||"file"===i||"password"===i||t.dataset.ignoreFormField?!1:(n.addListener(t,"change",function(t){if(t.target.name){if("checkbox"!==i)var o=t.target.value;else for(var a=[],r=document.querySelectorAll('input[name="'+t.target.name+'"]'),s=0;s<r.length;s++){var l=r[s].checked;l&&a.push(r[s].value),o=a.join(",")}inputData={name:t.target.name,node:t.target.nodeName.toLowerCase(),type:i,value:o,mapping:t.target.dataset.mapFormField},e.trigger("form_input_change",inputData),n.createCookie("inbound_"+t.target.name,encodeURIComponent(o))}}),void 0)},fillInputValues:function(e){var t=e.name?"inbound_"+e.name:"",i=e.type?e.type:"text";if("submit"===i||"hidden"===i||"file"===i||"password"===i)return!1;if(n.readCookie(t)&&"comment"!=t)if(value=decodeURIComponent(n.readCookie(t)),"checkbox"===i||"radio"===i)for(var o=value.split(","),a=0;a<o.length;a++)e.value.indexOf(o[a])>-1&&(e.checked=!0);else"undefined"!==value&&(e.value=value)},getInputLabel:function(e){var t;return(t=this.siblingsIsLabel(e))?t:(t=this.CheckParentForLabel(e))?t:!1},getInputValue:function(e){var t=!1;switch(e.type){case"radio":case"checkbox":e.checked&&(t=e.value);break;case"text":case"hidden":default:t=e.value}return t},addDataAttr:function(e,t){for(var n=document.getElementsByName(e.name),i=n.length-1;i>=0;i--)e.dataset.mapFormField||(n[i].dataset.mapFormField=t)},removeArrayItem:function(e,t){if(e.indexOf)index=e.indexOf(t);else for(index=e.length-1;index>=0&&e[index]!==t;--index);index>=0&&e.splice(index,1)},siblingsIsLabel:function(e){for(var t=this.getSiblings(e),n=[],i=t.length-1;i>=0;i--)"label"===t[i].nodeName.toLowerCase()&&n.push(t[i]);return n.length>0&&n.length<2?n:!1},getChildren:function(e,t){for(var n=[];e;e=e.nextSibling)1==e.nodeType&&e!=t&&n.push(e);return n},getSiblings:function(e){return this.getChildren(e.parentNode.firstChild,e)},CheckParentForLabel:function(e){if("FORM"===e.nodeName)return null;do{var t=e.getElementsByTagName("label");if(t.length>0&&t.length<2)return e.getElementsByTagName("label")}while(e=e.parentNode);return null},mailCheck:function(){var e=document.querySelector(".inbound-email");e&&(n.addListener(e,"blur",this.mailCheck),u.run({email:document.querySelector(".inbound-email").value,suggested:function(t){var i=document.querySelector(".email_suggestion");i&&n.removeElement(i);var o=document.createElement("span");o.innerHTML="<span class=\"email_suggestion\">Did youu mean <b><i id='email_correction' style='cursor: pointer;' title=\"click to update\">"+t.full+"</b></i>?</span>",e.parentNode.insertBefore(o,e.nextSibling);var a=document.getElementById("email_correction");n.addListener(a,"click",function(){e.value=a.innerHTML,a.parentNode.parentNode.innerHTML="Fixed!"})},empty:function(){}}))}},"undefined"==typeof u)var u={domainThreshold:1,topLevelThreshold:3,defaultDomains:["yahoo.com","google.com","hotmail.com","gmail.com","me.com","aol.com","mac.com","live.com","comcast.net","googlemail.com","msn.com","hotmail.co.uk","yahoo.co.uk","facebook.com","verizon.net","sbcglobal.net","att.net","gmx.com","mail.com","outlook.com","icloud.com"],defaultTopLevelDomains:["co.jp","co.uk","com","net","org","info","edu","gov","mil","ca","de"],run:function(e){e.domains=e.domains||u.defaultDomains,e.topLevelDomains=e.topLevelDomains||u.defaultTopLevelDomains,e.distanceFunction=e.distanceFunction||u.sift3Distance;var t=function(e){return e},n=e.suggested||t,i=e.empty||t,o=u.suggest(u.encodeEmail(e.email),e.domains,e.topLevelDomains,e.distanceFunction);return o?n(o):i()},suggest:function(e,t,n,i){e=e.toLowerCase();var o=this.splitEmail(e),a=this.findClosestDomain(o.domain,t,i,this.domainThreshold);if(a){if(a!=o.domain)return{address:o.address,domain:a,full:o.address+"@"+a}}else{var r=this.findClosestDomain(o.topLevelDomain,n,i,this.topLevelThreshold);if(o.domain&&r&&r!=o.topLevelDomain){var s=o.domain;return a=s.substring(0,s.lastIndexOf(o.topLevelDomain))+r,{address:o.address,domain:a,full:o.address+"@"+a}}}return!1},findClosestDomain:function(e,t,n,i){i=i||this.topLevelThreshold;var o,a=99,r=null;if(!e||!t)return!1;n||(n=this.sift3Distance);for(var s=0;s<t.length;s++){if(e===t[s])return e;o=n(e,t[s]),a>o&&(a=o,r=t[s])}return i>=a&&null!==r?r:!1},sift3Distance:function(e,t){if(null===e||0===e.length)return null===t||0===t.length?0:t.length;if(null===t||0===t.length)return e.length;for(var n=0,i=0,o=0,a=0,r=5;n+i<e.length&&n+o<t.length;){if(e.charAt(n+i)==t.charAt(n+o))a++;else{i=0,o=0;for(var s=0;r>s;s++){if(n+s<e.length&&e.charAt(n+s)==t.charAt(n)){i=s;break}if(n+s<t.length&&e.charAt(n)==t.charAt(n+s)){o=s;break}}}n++}return(e.length+t.length)/2-a},splitEmail:function(e){var t=e.trim().split("@");if(t.length<2)return!1;for(var n=0;n<t.length;n++)if(""===t[n])return!1;var i=t.pop(),o=i.split("."),a="";if(0===o.length)return!1;if(1==o.length)a=o[0];else{for(var n=1;n<o.length;n++)a+=o[n]+".";o.length>=2&&(a=a.substring(0,a.length-1))}return{topLevelDomain:a,domain:i,address:t.join("@")}},encodeEmail:function(e){var t=encodeURI(e);return t=t.replace("%20"," ").replace("%25","%").replace("%5E","^").replace("%60","`").replace("%7B","{").replace("%7C","|").replace("%7D","}")}};return e}(_inbound||{}),_inboundEvents=function(e){function t(t,i,o){var i=i||{};o=o||{},o.bubbles=o.bubbles||!0,o.cancelable=o.cancelable||!0,i=e.apply_filters("filter_"+t,i);!window.ActiveXObject&&"ActiveXObject"in window;if("function"==typeof CustomEvent)var a=new CustomEvent(t,{detail:i,bubbles:o.bubbles,cancelable:o.cancelable});else{var a=document.createEvent("Event");a.initEvent(t,!0,!0)}window.dispatchEvent(a),e.do_action(t,i),n(t,i)}function n(e,t){if(window.jQuery){var t=t||{};jQuery(document).trigger(e,t)}}e.trigger=function(t,n){e.Events[t](n)};return e.Events={analytics_ready:function(){var e={opt1:!0},n={data:"xyxy"};t("analytics_ready",n,e)},url_parameters:function(e){t("url_parameters",e)},session_start:function(){console.log(""),t("session_start")},session_end:function(e){t("session_end",e),console.log("Session End")},session_active:function(){t("session_active")},session_idle:function(e){t("session_idle",e)},session_resume:function(){t("session_resume")},session_heartbeat:function(e){var n={clock:e,leadData:InboundLeadData};t("session_heartbeat",n)},page_visit:function(e){t("page_view",e)},page_first_visit:function(){t("page_first_visit"),e.deBugger("pages","First Ever Page View of this Page")},page_revisit:function(n){t("page_revisit",n);var i=function(){console.log("pageData",n),console.log("Page Revisit viewed "+n+" times")};e.deBugger("pages",status,i)},tab_hidden:function(){e.deBugger("pages","Tab Hidden"),t("tab_hidden")},tab_visible:function(){e.deBugger("pages","Tab Visible"),t("tab_visible")},tab_mouseout:function(){e.deBugger("pages","Tab Mouseout"),t("tab_mouseout")},form_input_change:function(n){var i=function(){console.log(n)};e.deBugger("forms","inputData change. Data=",i),t("form_input_change",n)},form_before_submission:function(e){t("form_before_submission",e)},form_after_submission:function(e){t("form_after_submission",e)},analyticsError:function(e,t,n){var i=new CustomEvent("inbound_analytics_error",{detail:{MLHttpRequest:e,textStatus:t,errorThrown:n}});window.dispatchEvent(i),console.log("Page Save Error")}},e}(_inbound||{}),InboundTotalStorage=function(e){var t,n,i="_inbound";if("localStorage"in window)try{n="undefined"==typeof window.localStorage?void 0:window.localStorage,t="undefined"==typeof n||"undefined"==typeof window.JSON?!1:!0,window.localStorage.setItem(i,"1"),window.localStorage.removeItem(i)}catch(o){t=!1}e.totalStorage=function(t,n){return e.totalStorage.impl.init(t,n)},e.totalStorage.setItem=function(t,n){return e.totalStorage.impl.setItem(t,n)},e.totalStorage.getItem=function(t){return e.totalStorage.impl.getItem(t)},e.totalStorage.getAll=function(){return e.totalStorage.impl.getAll()},e.totalStorage.deleteItem=function(t){return e.totalStorage.impl.deleteItem(t)},e.totalStorage.impl={init:function(e,t){return"undefined"!=typeof t?this.setItem(e,t):this.getItem(e)},setItem:function(i,o){if(!t)try{return e.Utils.createCookie(i,o),o}catch(a){console.log("Local Storage not supported by this browser. Install the cookie plugin on your site to take advantage of the same functionality. You can get it at https://github.com/carhartl/jquery-cookie")}var r=JSON.stringify(o);return n.setItem(i,r),this.parseResult(r)},getItem:function(i){if(!t)try{return this.parseResult(e.Utils.readCookie(i))}catch(o){return null}var a=n.getItem(i);return this.parseResult(a)},deleteItem:function(i){if(!t)try{return e.Utils.eraseCookie(i,null),!0}catch(o){return!1}return n.removeItem(i),!0},getAll:function(){var i=[];if(t)for(var o in n)o.length&&i.push({key:o,value:this.parseResult(n.getItem(o))});else try{for(var a=document.cookie.split(";"),r=0;r<a.length;r++){var s=a[r].split("="),l=s[0];i.push({key:l,value:this.parseResult(e.Utils.readCookie(l))})}}catch(u){return null}return i},parseResult:function(e){var t;try{t=JSON.parse(e),"undefined"==typeof t&&(t=e),"true"==t&&(t=!0),"false"==t&&(t=!1),parseFloat(t)==t&&"object"!=typeof t&&(t=parseFloat(t))}catch(n){t=e}return t}}}(_inbound||{}),_inboundLeadsAPI=function(e){return e.LeadsAPI={init:function(){var t=e.Utils,n=(t.readCookie("wp_lead_uid"),t.readCookie("wp_lead_id")),i=t.readCookie("lead_session_expire");i||(e.deBugger("leads","expired vistor. Run Processes"),n&&e.LeadsAPI.getAllLeadData())},setGlobalLeadData:function(e){InboundLeadData=e},getAllLeadData:function(){var t=e.Utils.readCookie("wp_lead_id"),n=e.totalStorage("inbound_lead_data"),i=e.Utils.readCookie("lead_data_expire");data={action:"inbound_get_all_lead_data",wp_lead_id:t},success=function(t){var n=JSON.parse(t);e.LeadsAPI.setGlobalLeadData(n),e.totalStorage("inbound_lead_data",n);var i=new Date;i.setTime(i.getTime()+18e5);var o=e.Utils.addDays(i,3);e.Utils.createCookie("lead_data_expire",!0,o)},n?(e.LeadsAPI.setGlobalLeadData(n),e.deBugger("lead","Set Global Lead Data from Localstorage"),i||(e.Utils.ajaxPost(inbound_settings.admin_url,data,success),e.deBugger("lead","localized data old. Pull new from DB"))):e.Utils.ajaxPost(inbound_settings.admin_url,data,success)},getLeadLists:function(){var t=e.Utils.readCookie("wp_lead_id"),n={action:"wpl_check_lists",wp_lead_id:t},i=function(){e.Utils.createCookie("lead_session_list_check",!0,{path:"/",expires:1}),e.deBugger("lead","Lists checked")};e.Utils.ajaxPost(inbound_settings.admin_url,n,i)}},e}(_inbound||{}),_inboundPageTracking=function(e){var t,n,i=!1,o=!1,a=!1,r=parseInt(e.Utils.readCookie("lead_session"),10)||0,s=0,l=(new Date,null),u=null,d=null,c=e.Utils,m=e.Utils.GetDate(),f="page_views",g=e.totalStorage(f)||{},p=inbound_settings.post_id||window.location.pathname,v=e.Settings.timeout||1e4;return e.PageTracking={init:function(i){return"page_views"!==f?!1:(this.CheckTimeOut(),i=i||{},t=parseInt(i.reportInterval,10)||10,n=parseInt(i.idleTimeout,10)||3,c.addListener(document,"keydown",c.throttle(e.PageTracking.pingSession,1e3)),c.addListener(document,"click",c.throttle(e.PageTracking.pingSession,1e3)),c.addListener(window,"mousemove",c.throttle(e.PageTracking.pingSession,1e3)),e.PageTracking.checkVisibility(),this.startSession(),void 0)},setIdle:function(t){var t=t||"No Movement",n="Session IDLE. Activity Timeout due to "+t;
3
+ e.deBugger("pages",n),clearTimeout(e.PageTracking.idleTimer),e.PageTracking.stopClock(),e.trigger("session_idle")},checkVisibility:function(){var t,n,i;"undefined"!=typeof document.hidden?(t="hidden",i="visibilitychange",n="visibilityState"):"undefined"!=typeof document.mozHidden?(t="mozHidden",i="mozvisibilitychange",n="mozVisibilityState"):"undefined"!=typeof document.msHidden?(t="msHidden",i="msvisibilitychange",n="msVisibilityState"):"undefined"!=typeof document.webkitHidden&&(t="webkitHidden",i="webkitvisibilitychange",n="webkitVisibilityState");var o=document[t];e.Utils.addListener(document,i,function(){o!=document[t]&&(document[t]?(e.trigger("tab_hidden"),e.PageTracking.setIdle("browser tab switch")):(e.trigger("tab_visible"),e.PageTracking.pingSession()),o=document[t])})},clock:function(){r+=1;var n=r/60,i="Total time spent on Page in this Session: "+n.toFixed(2)+" min";if(e.deBugger("pages",i),r>0&&r%t===0){var o=new Date;o.setTime(o.getTime()+18e5),c.createCookie("lead_session",r,o),e.trigger("session_heartbeat",r)}},inactiveClock:function(){s+=1;var t=(1800-s)/60,n="Time until Session Timeout: "+t.toFixed(2)+" min";e.deBugger("pages",n),s>1800&&(e.trigger("session_end",InboundLeadData),e.Utils.eraseCookie("lead_session"),s=0,clearTimeout(u))},stopClock:function(){o=!0,clearTimeout(l),clearTimeout(u),u=setInterval(e.PageTracking.inactiveClock,1e3)},restartClock:function(){o=!1,e.trigger("session_resume"),e.deBugger("pages","Activity resumed. Session Active"),clearTimeout(l),s=0,clearTimeout(u),l=setInterval(e.PageTracking.clock,1e3)},turnOff:function(){e.PageTracking.setIdle(),a=!0},turnOn:function(){a=!1},startSession:function(){new Date;i=!0,l=setInterval(e.PageTracking.clock,1e3);var t=c.readCookie("lead_session");if(t)e.trigger("session_active");else{e.trigger("session_start");var n=new Date;n.setTime(n.getTime()+18e5),e.Utils.createCookie("lead_session",1,n)}this.pingSession()},resetInactiveFunc:function(){s=0,clearTimeout(u)},pingSession:function(t){a||(i||e.PageTracking.startSession(),o&&e.PageTracking.restartClock(),clearTimeout(d),d=setTimeout(e.PageTracking.setIdle,1e3*n+100),"undefined"!=typeof t&&"mousemove"===t.type&&e.PageTracking.mouseEvents(t))},mouseEvents:function(t){t.pageY<=5&&e.trigger("tab_mouseout")},getPageViews:function(){var t=e.Utils.checkLocalStorage();if(t){var n=localStorage.getItem(f),i=JSON.parse(n);return i}},isRevisit:function(e){var t=!1,e=e||{},n=e[p];return"undefined"!=typeof n&&null!==n&&(t=!0),t},triggerPageView:function(t){var n={title:document.title,url:document.location.href,path:document.location.pathname,count:1};t?(g[p].push(m),n.count=g[p].length,e.trigger("page_revisit",n)):(g[p]=[],g[p].push(m),e.trigger("page_first_visit",n)),e.trigger("page_visit",n),e.totalStorage(f,g),this.storePageView()},CheckTimeOut:function(){var t,n,i=this.isRevisit(g);if(i){var o=g[p].length-1,a=g[p][o],r=Math.abs(new Date(a).getTime()-new Date(m).getTime());n=r>v,n?(t="Timeout Happened. Page view fired",this.triggerPageView(i)):(time_left=.001*Math.abs(v-r),t=v/1e3+" sec timeout not done: "+time_left+" seconds left")}else this.triggerPageView(i);e.deBugger("pages",t)},storePageView:function(){if("off"!=inbound_settings.page_tracking){var t=e.Utils.readCookie("wp_lead_id")?e.Utils.readCookie("wp_lead_id"):"",n=e.Utils.readCookie("wp_lead_uid")?e.Utils.readCookie("wp_lead_uid"):"",i={action:"inbound_track_lead",wp_lead_uid:n,wp_lead_id:t,page_id:inbound_settings.post_id,variation_id:inbound_settings.variation_id,post_type:inbound_settings.post_type,current_url:window.location.href,page_views:JSON.stringify(e.PageTracking.getPageViews()),json:"0"},o=function(){};e.Utils.ajaxPost(inbound_settings.admin_url,i,o)}}},e}(_inbound||{});_inbound.init(),InboundLeadData=_inbound.totalStorage("inbound_lead_data")||null;
shared/classes/class.ajax.php CHANGED
@@ -1,22 +1,22 @@
1
<?php
2
3
/**
4
- * This class loads miscellaneous WordPress AJAX listeners
5
- */
6
if (!class_exists('Inbound_Ajax')) {
7
8
class Inbound_Ajax {
9
10
/**
11
- * Initializes classs
12
- */
13
public function __construct() {
14
self::load_hooks();
15
}
16
17
/**
18
- * Loads hooks and filters
19
- */
20
public static function load_hooks() {
21
22
/* Ajax that runs on pageload */
@@ -31,15 +31,15 @@ if (!class_exists('Inbound_Ajax')) {
31
}
32
33
/**
34
- * Executes hook that runs all ajax actions
35
- */
36
public static function run_ajax_actions() {
37
38
}
39
40
/**
41
- *
42
- */
43
public static function track_lead() {
44
45
global $wpdb;
@@ -51,6 +51,33 @@ if (!class_exists('Inbound_Ajax')) {
51
(isset( $_POST['page_id'] )) ? $lead_data['page_id'] = $_POST['page_id'] : $lead_data['page_id'] = 0;
52
(isset( $_POST['current_url'] )) ? $lead_data['current_url'] = $_POST['current_url'] : $lead_data['current_url'] = 'notfound';
53
54
/* update lead data */
55
if(isset($_POST['wp_lead_id']) && function_exists('wp_leads_update_page_view_obj') ) {
56
wp_leads_update_page_view_obj($lead_data);
1
<?php
2
3
/**
4
+ * This class loads miscellaneous WordPress AJAX listeners
5
+ */
6
if (!class_exists('Inbound_Ajax')) {
7
8
class Inbound_Ajax {
9
10
/**
11
+ * Initializes classs
12
+ */
13
public function __construct() {
14
self::load_hooks();
15
}
16
17
/**
18
+ * Loads hooks and filters
19
+ */
20
public static function load_hooks() {
21
22
/* Ajax that runs on pageload */
31
}
32
33
/**
34
+ * Executes hook that runs all ajax actions
35
+ */
36
public static function run_ajax_actions() {
37
38
}
39
40
/**
41
+ *
42
+ */
43
public static function track_lead() {
44
45
global $wpdb;
51
(isset( $_POST['page_id'] )) ? $lead_data['page_id'] = $_POST['page_id'] : $lead_data['page_id'] = 0;
52
(isset( $_POST['current_url'] )) ? $lead_data['current_url'] = $_POST['current_url'] : $lead_data['current_url'] = 'notfound';
53
54
+
55
+ $page_views = json_decode(stripslashes($_POST['page_views']));
56
+
57
+ /* update funnel cookie */
58
+ if (isset($_COOKIE['inbound_page_views'])) {
59
+ $stored_views = json_decode(stripslashes($_COOKIE['inbound_page_views']), true);
60
+ } else {
61
+ $stored_views = array();
62
+ }
63
+
64
+ foreach ($page_views as $page_id => $visits ) {
65
+ if (!in_array($page_id, $stored_views)) {
66
+ $stored_views[] = $page_id;
67
+ } else {
68
+
69
+ /* check if user doubled back to the first page to convert */
70
+ $funnel_count = count($stored_views);
71
+ $last_key = $funnel_count - 1;
72
+ if ( $funnel_count > 1 && $stored_views[0] == $page_id && $stored_views[$last_key] != $page_id ){
73
+ $stored_views[] = $page_id;
74
+ }
75
+
76
+ }
77
+ }
78
+
79
+ setcookie( 'inbound_page_views' , json_encode($stored_views) , time()+3600 , "/" );
80
+
81
/* update lead data */
82
if(isset($_POST['wp_lead_id']) && function_exists('wp_leads_update_page_view_obj') ) {
83
wp_leads_update_page_view_obj($lead_data);
shared/classes/class.debug.php CHANGED
@@ -48,7 +48,7 @@ if (!class_exists('Inbound_Debug_Scripts')) {
48
$wpdb->query("
49
SELECT `meta_key`, `meta_value`
50
FROM $wpdb->postmeta
51
- WHERE `post_id` = ".mysql_real_escape_string($_GET['post'])."
52
");
53
54
foreach($wpdb->last_result as $k => $v){
48
$wpdb->query("
49
SELECT `meta_key`, `meta_value`
50
FROM $wpdb->postmeta
51
+ WHERE `post_id` = ".intval($_GET['post'])."
52
");
53
54
foreach($wpdb->last_result as $k => $v){
shared/classes/class.events.php CHANGED
@@ -65,6 +65,8 @@ class Inbound_Events {
65
`lead_uid` varchar(255) NOT NULL,
66
`session_id` varchar(255) NOT NULL,
67
`event_details` text NOT NULL,
68
`datetime` datetime NOT NULL,
69
70
UNIQUE KEY id (id)
@@ -72,6 +74,14 @@ class Inbound_Events {
72
73
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
74
dbDelta( $sql );
75
}
76
77
/**
@@ -174,11 +184,23 @@ class Inbound_Events {
174
'session_id' => '',
175
'event_name' => $args['event_name'],
176
'event_details' => '',
177
- 'datetime' => $wordpress_date_time
178
);
179
180
$args = array_merge( $defaults , $args );
181
182
183
/* unset non db ready keys */
184
foreach ($args as $key => $value) {
@@ -464,6 +486,11 @@ class Inbound_Events {
464
/* return null if nothing there */
465
return ($count) ? $count : 0;
466
}
467
}
468
469
- new Inbound_Events();
65
`lead_uid` varchar(255) NOT NULL,
66
`session_id` varchar(255) NOT NULL,
67
`event_details` text NOT NULL,
68
+ `source` text NOT NULL,
69
+ `funnel` text NOT NULL,
70
`datetime` datetime NOT NULL,
71
72
UNIQUE KEY id (id)
74
75
require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
76
dbDelta( $sql );
77
+
78
+ /* add new columns to legacy table */
79
+ $row = $wpdb->get_results( "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE table_name = '{$table_name}' AND column_name = 'source'" );
80
+ if(empty($row)){
81
+ // do your stuff
82
+ $wpdb->get_results( "ALTER TABLE {$table_name} ADD `funnel` text NOT NULL" );
83
+ $wpdb->get_results( "ALTER TABLE {$table_name} ADD `source` text NOT NULL" );
84
+ }
85
}
86
87
/**
184
'session_id' => '',
185
'event_name' => $args['event_name'],
186
'event_details' => '',
187
+ 'datetime' => $wordpress_date_time,
188
+ 'funnel' => ( isset($_COOKIE['inbound_page_views']) ? $_COOKIE['inbound_page_views'] : '' ),
189
+ 'source' => ( isset($_COOKIE['inbound_referral_site']) ? $_COOKIE['inbound_referral_site'] : '' )
190
);
191
192
+
193
$args = array_merge( $defaults , $args );
194
195
+ /* prepare funnel array */
196
+ if ($args['funnel']) {
197
+
198
+ /* check if valid json or if slashes need to be stripepd out */
199
+ if (!self::isJson($args['funnel'])) {
200
+ $args['funnel'] = stripslashes($args['funnel']);
201
+ }
202
+
203
+ }
204
205
/* unset non db ready keys */
206
foreach ($args as $key => $value) {
486
/* return null if nothing there */
487
return ($count) ? $count : 0;
488
}
489
+
490
+ public static function isJson($string) {
491
+ json_decode($string);
492
+ return (json_last_error() == JSON_ERROR_NONE);
493
+ }
494
}
495
496
+ new Inbound_Events();
shared/classes/class.lead-storage.php CHANGED
@@ -109,6 +109,7 @@ if (!class_exists('LeadStorage')) {
109
} else {
110
/* Create new lead if one doesnt exist */
111
$lead['id'] = self::store_new_lead($lead);
112
}
113
114
/* do everything else for lead storage */
@@ -347,6 +348,7 @@ if (!class_exists('LeadStorage')) {
347
include_once( INBOUNDNOW_SHARED_PATH. 'assets/includes/Snowplow/RefererParser/INBOUND_Parser.php');
348
include_once( INBOUNDNOW_SHARED_PATH .'assets/includes/Snowplow/RefererParser/INBOUND_Referer.php');
349
include_once(INBOUNDNOW_SHARED_PATH . 'assets/includes/Snowplow/RefererParser/INBOUND_Medium.php');
350
/* intialized the parser class */
351
$parser = new INBOUND_Parser();
352
/*$array = array('http://google.com', 'http://twitter.com', 'http://tumblr.com?query=test', ''); */
109
} else {
110
/* Create new lead if one doesnt exist */
111
$lead['id'] = self::store_new_lead($lead);
112
+ update_post_meta( $lead['id'] , 'wp_lead_status' , 'new');
113
}
114
115
/* do everything else for lead storage */
348
include_once( INBOUNDNOW_SHARED_PATH. 'assets/includes/Snowplow/RefererParser/INBOUND_Parser.php');
349
include_once( INBOUNDNOW_SHARED_PATH .'assets/includes/Snowplow/RefererParser/INBOUND_Referer.php');
350
include_once(INBOUNDNOW_SHARED_PATH . 'assets/includes/Snowplow/RefererParser/INBOUND_Medium.php');
351
+
352
/* intialized the parser class */
353
$parser = new INBOUND_Parser();
354
/*$array = array('http://google.com', 'http://twitter.com', 'http://tumblr.com?query=test', ''); */
shared/classes/class.post-type.wp-lead.php CHANGED
@@ -55,7 +55,7 @@ if ( !class_exists('Inbound_Leads') ) {
55
$args = array(
56
'labels' => $labels,
57
'public' => false,
58
- 'publicly_queryable' => true,
59
'show_ui' => true,
60
'query_var' => true,
61
'menu_icon' => INBOUNDNOW_SHARED_URLPATH . 'assets/images/global/leads.png',
@@ -144,7 +144,7 @@ if ( !class_exists('Inbound_Leads') ) {
144
'show_in_nav_menus' => false,
145
'update_count_callback' => '_update_post_term_count',
146
'query_var' => true,
147
- 'rewrite' => array( 'slug' => 'lead-tag' ),
148
);
149
150
register_taxonomy( 'lead-tags', 'wp-lead', $args );
@@ -389,6 +389,75 @@ if ( !class_exists('Inbound_Leads') ) {
389
return get_term_by( $search, $list_id, 'wplead_list_category', ARRAY_A);
390
}
391
392
/**
393
* Adds tag to lead
394
*
55
$args = array(
56
'labels' => $labels,
57
'public' => false,
58
+ 'publicly_queryable' => false,
59
'show_ui' => true,
60
'query_var' => true,
61
'menu_icon' => INBOUNDNOW_SHARED_URLPATH . 'assets/images/global/leads.png',
144
'show_in_nav_menus' => false,
145
'update_count_callback' => '_update_post_term_count',
146
'query_var' => true,
147
+ 'rewrite' => false
148
);
149
150
register_taxonomy( 'lead-tags', 'wp-lead', $args );
389
return get_term_by( $search, $list_id, 'wplead_list_category', ARRAY_A);
390
}
391
392
+ /**
393
+ * Get lead status given lead id
394
+ * @dev
395
+ */
396
+ public static function get_lead_status( $lead_id ) {
397
+ $status = get_post_meta( $lead_id , 'wp_lead_status' , true );
398
+ return ($status) ? $status : 'new';
399
+ }
400
+
401
+ /**
402
+ * Get lead status given lead id
403
+ * @dev
404
+ */
405
+ public static function get_lead_statuses( ) {
406
+ $default = array(
407
+ 'new' => array(
408
+ 'priority' => 1,
409
+ 'key' => 'new',
410
+ 'label' => __('New Lead' , 'inbound-pro'),
411
+ 'color' => '#f0ad4e',
412
+ 'nature' => 'core'
413
+ ),
414
+ 'read' => array(
415
+ 'priority' => 2,
416
+ 'key' => 'read',
417
+ 'label' => __('Read' , 'inbound-pro'),
418
+ 'color' => '#27ae60',
419
+ 'nature' => 'core'
420
+ ),
421
+ 'needs-attention' => array(
422
+ 'priority' => 3,
423
+ 'key' => 'needs-attention',
424
+ 'label' => __('Needs Attention' , 'inbound-pro'),
425
+ 'color' => '#ffcc33',
426
+ 'nature' => 'core'
427
+ ),
428
+ 'lost' => array(
429
+ 'priority' => 4,
430
+ 'key' => 'lost',
431
+ 'label' => __('Lost' , 'inbound-pro'),
432
+ 'color' => '#05022E',
433
+ 'nature' => 'core'
434
+ ),
435
+ 'active' => array(
436
+ 'priority' => 5,
437
+ 'key' => 'active',
438
+ 'label' => __('Active' , 'inbound-pro'),
439
+ 'color' => '#FE984E',
440
+ 'nature' => 'core'
441
+ ),
442
+ 'customer' => array(
443
+ 'priority' => 6,
444
+ 'key' => 'customer',
445
+ 'label' => __('Customer' , 'inbound-pro'),
446
+ 'color' => '#48F7A1',
447
+ 'nature' => 'core'
448
+ ),
449
+ 'archive' => array(
450
+ 'priority' => 7,
451
+ 'key' => 'archive',
452
+ 'label' => __('Archive' , 'inbound-pro'),
453
+ 'color' => '#7A3068',
454
+ 'nature' => 'core'
455
+ ),
456
+ );
457
+
458
+ return apply_filters('leads/statuses' , $default );
459
+ }
460
+
461
/**
462
* Adds tag to lead
463
*
shared/classes/class.promote.php CHANGED
@@ -34,11 +34,11 @@ class Inbound_Promote {
34
/* help us translate the plugin */
35
add_action('admin_notices', array( __CLASS__, 'upgrade_to_pro' ));
36
37
- /* Add ajax listeners for switching templates */
38
- add_action( 'wp_ajax_inbound_dismiss_ajax', array(__CLASS__, 'dismiss_notice'));
39
-
40
}
41
42
}
43
44
34
/* help us translate the plugin */
35
add_action('admin_notices', array( __CLASS__, 'upgrade_to_pro' ));
36
37
}
38
39
+ /* Add ajax listeners for switching templates */
40
+ add_action( 'wp_ajax_inbound_dismiss_ajax', array(__CLASS__, 'dismiss_notice'));
41
+
42
}
43
44
shared/classes/class.shortcodes.email-template.php CHANGED
@@ -33,7 +33,7 @@ class Inbound_Email_Template_Shortcodes {
33
$html = '';
34
35
$post_params = apply_filters( 'inbound-email-post-params', $_POST);
36
- $blacklist = array('inbound_submitted', 'inbound_notify', 'inbound_params', 'inbound_furl', 'stop_dirty_subs');
37
38
/* Parse out UTM Params */
39
if(isset($_POST['inbound_params']) && $_POST['inbound_params'] != "") {
@@ -56,11 +56,6 @@ class Inbound_Email_Template_Shortcodes {
56
/*print_r($post_params); exit; */
57
}
58
59
- /* unset google recaptcha */
60
- unset($post_params['g_recaptcha_response']);
61
-
62
- /* unset others */
63
- unset($post_params['page_id']);
64
65
/* filter params */
66
$post_params = apply_filters('inbound_email_response/post_params' , $post_params);
33
$html = '';
34
35
$post_params = apply_filters( 'inbound-email-post-params', $_POST);
36
+ $blacklist = array('g-recaptcha-response','inbound_submitted', 'inbound_notify', 'inbound_params', 'inbound_furl', 'stop_dirty_subs', 'page_id');
37
38
/* Parse out UTM Params */
39
if(isset($_POST['inbound_params']) && $_POST['inbound_params'] != "") {
56
/*print_r($post_params); exit; */
57
}
58
59
60
/* filter params */
61
$post_params = apply_filters('inbound_email_response/post_params' , $post_params);
shared/classes/class.template-utils.php CHANGED
@@ -283,10 +283,13 @@ echo '<!DOCTYPE html>
283
<!-- <script src="<?php echo $urlpath; ?>js/js_file_name.js"></script> -->
284
285
<!-- Load Normal WordPress wp_head() function -->
286
- <?php wp_head(); ?>
287
288
<!-- Load Landing Pages\'s custom pre-load hook for 3rd party plugin integration -->
289
<?php do_action("lp_head"); ?>
290
</head>'. "\r\n\r\n".
291
'<body>'. "\r\n\r\n";
292
//print_r($field_groups); exit;
283
<!-- <script src="<?php echo $urlpath; ?>js/js_file_name.js"></script> -->
284
285
<!-- Load Normal WordPress wp_head() function -->
286
+ <footer>
287
+ <?php do_action("wp_footer"); ?>
288
289
<!-- Load Landing Pages\'s custom pre-load hook for 3rd party plugin integration -->
290
<?php do_action("lp_head"); ?>
291
+
292
+ </footer>
293
</head>'. "\r\n\r\n".
294
'<body>'. "\r\n\r\n";
295
//print_r($field_groups); exit;
shared/shortcodes/css/frontend-render.css CHANGED
@@ -1090,17 +1090,6 @@ input[type=submit].inbound-button, button.inbound-button {
1090
font-style: normal;
1091
}
1092
1093
- format
1094
- (
1095
- 'svg'
1096
- )
1097
- ;
1098
- font-weight:normal
1099
-
1100
- ;
1101
- font-style:normal
1102
-
1103
- }
1104
.fa {
1105
display: inline-block;
1106
font-family: FontAwesome;
1090
font-style: normal;
1091
}
1092
1093
.fa {
1094
display: inline-block;
1095
font-family: FontAwesome;
shared/shortcodes/css/shortcodes.css CHANGED
@@ -37,7 +37,7 @@ input.short-shortcode-input {
37
.reveal-html-block textarea {
38
min-height: 150px !important;
39
}
40
- #inbound-shortcodes-form-table .has-child .child-clone-rows .child-clone-row .child-clone-row-form .child-clone-row-form-row.inbound-tab-class-advanced, {
41
display: none;
42
}
43
.parent-inbound_shortcode_helper-block-one .label {
@@ -200,7 +200,7 @@ float: left;
200
display:block;
201
padding:7px 0;
202
border-bottom:solid 1px #eaeaea;
203
- max-width::520px;
204
}
205
#inbound-shortcodes-form-table tbody tr.form-row.has-child{
206
display:block;
@@ -233,7 +233,7 @@ float: left;
233
#inbound-shortcodes-form-table input[type="url"],
234
#inbound-shortcodes-form-table input[type="number"],
235
#inbound-shortcodes-form-table input[type="password"],
236
- #inbound-shortcodes-form-table textarea{=
237
padding:5px 6px;
238
margin:0 0 0px 0;
239
width: 100%;
37
.reveal-html-block textarea {
38
min-height: 150px !important;
39
}
40
+ #inbound-shortcodes-form-table .has-child .child-clone-rows .child-clone-row .child-clone-row-form .child-clone-row-form-row.inbound-tab-class-advanced {
41
display: none;
42
}
43
.parent-inbound_shortcode_helper-block-one .label {
200
display:block;
201
padding:7px 0;
202
border-bottom:solid 1px #eaeaea;
203
+ max-width:520px;
204
}
205
#inbound-shortcodes-form-table tbody tr.form-row.has-child{
206
display:block;
233
#inbound-shortcodes-form-table input[type="url"],
234
#inbound-shortcodes-form-table input[type="number"],
235
#inbound-shortcodes-form-table input[type="password"],
236
+ #inbound-shortcodes-form-table input[type="textarea"]{
237
padding:5px 6px;
238
margin:0 0 0px 0;
239
width: 100%;
shared/shortcodes/shortcodes/forms.php CHANGED
@@ -229,7 +229,7 @@ $shortcodes_config['forms'] = array(
229
'desc' => __('Enter Your Dropdown Options. Separate by commas. You may also use label|value to have a different value than the label stored.', INBOUNDNOW_TEXT_DOMAIN ),
230
'type' => 'text',
231
'std' => '',
232
- 'placeholder' => __('Choice 1|a, Choice 2, Choice 3' , 'cta' ),
233
'reveal_on' => 'dropdown' // on select choice show this
234
),
235
'radio_options' => array(
@@ -245,7 +245,7 @@ $shortcodes_config['forms'] = array(
245
'desc' => __('Enter Your Checkbox Options. Separate by commas. You may also use label|value to have a different value than the label stored.', INBOUNDNOW_TEXT_DOMAIN ),
246
'type' => 'text',
247
'std' => '',
248
- 'placeholder' => __( 'Choice 1|a, Choice 2, Choice 3', 'cta' ),
249
'reveal_on' => 'checkbox' // on select choice show this
250
),
251
'html_block_options' => array(
229
'desc' => __('Enter Your Dropdown Options. Separate by commas. You may also use label|value to have a different value than the label stored.', INBOUNDNOW_TEXT_DOMAIN ),
230
'type' => 'text',
231
'std' => '',
232
+ 'placeholder' => __('Choice 1|a, Choice 2, Choice 3' , 'inbound-pro' ),
233
'reveal_on' => 'dropdown' // on select choice show this
234
),
235
'radio_options' => array(
245
'desc' => __('Enter Your Checkbox Options. Separate by commas. You may also use label|value to have a different value than the label stored.', INBOUNDNOW_TEXT_DOMAIN ),
246
'type' => 'text',
247
'std' => '',
248
+ 'placeholder' => __( 'Choice 1|a, Choice 2, Choice 3', 'inbound-pro' ),
249
'reveal_on' => 'checkbox' // on select choice show this
250
),
251
'html_block_options' => array(
templates/countdown-lander/config.php CHANGED
@@ -17,10 +17,10 @@ $next_month = date('Y-m-d H:i', $next_month_timestamp);
17
$lp_data[$key]['info'] = array(
18
'data_type' => 'acf4',
19
'version' => "1.0.5",
20
- 'label' => __( 'Countdown Lander' , 'landing-pages' ),
21
'category' => 'Countdown,1 column',
22
'demo' => 'http://demo.inboundnow.com/go/countdown-lander/',
23
- 'description' => __( 'Coundown Lander provides a simple sharp looking countdown page.' , 'landing-pages' )
24
);
25
26
/* register ACF fields */
@@ -55,7 +55,7 @@ if( function_exists('register_field_group') ):
55
'label' => __( 'Conversion Area','landing-pages' ),
56
'name' => 'countdown-lander-conversion-area-content',
57
'type' => 'wysiwyg',
58
- 'instructions' => __( '','landing-pages' ),
59
'required' => 0,
60
'conditional_logic' => 0,
61
'wrapper' => array (
@@ -73,7 +73,7 @@ if( function_exists('register_field_group') ):
73
'label' => __( 'Main Content','landing-pages' ),
74
'name' => 'countdown-lander-main-content',
75
'type' => 'wysiwyg',
76
- 'instructions' => __( '','landing-pages' ),
77
'required' => 0,
78
'conditional_logic' => 0,
79
'wrapper' => array (
17
$lp_data[$key]['info'] = array(
18
'data_type' => 'acf4',
19
'version' => "1.0.5",
20
+ 'label' => __( 'Countdown Lander' , 'inbound-pro' ),
21
'category' => 'Countdown,1 column',
22
'demo' => 'http://demo.inboundnow.com/go/countdown-lander/',
23
+ 'description' => __( 'Coundown Lander provides a simple sharp looking countdown page.' , 'inbound-pro' )
24
);
25
26
/* register ACF fields */
55
'label' => __( 'Conversion Area','landing-pages' ),
56
'name' => 'countdown-lander-conversion-area-content',
57
'type' => 'wysiwyg',
58
+ 'instructions' =>'',
59
'required' => 0,
60
'conditional_logic' => 0,
61
'wrapper' => array (
73
'label' => __( 'Main Content','landing-pages' ),
74
'name' => 'countdown-lander-main-content',
75
'type' => 'wysiwyg',
76
+ 'instructions' => '',
77
'required' => 0,
78
'conditional_logic' => 0,
79
'wrapper' => array (
templates/countdown-lander/index.php CHANGED
@@ -74,7 +74,7 @@ $blue = (isset($RBG_array['b'])) ? $RBG_array['b'] : '0';
74
<meta charset="utf-8" />
75
<title><?php wp_title(); ?></title>
76
<?php /* Load all functions hooked to lp_head including global js and global css */
77
- wp_head(); // Load Regular WP Head
78
do_action('lp_head'); // Load Custom Landing Page Specific Header Items
79
?>
80
@@ -235,9 +235,16 @@ $blue = (isset($RBG_array['b'])) ? $RBG_array['b'] : '0';
235
break; endwhile; endif;
236
237
do_action('lp_footer');
238
- wp_footer();
239
?>
240
</div>
241
242
243
</body>
74
<meta charset="utf-8" />
75
<title><?php wp_title(); ?></title>
76
<?php /* Load all functions hooked to lp_head including global js and global css */
77
+ do_action('wp_head'); // Load Regular WP Head
78
do_action('lp_head'); // Load Custom Landing Page Specific Header Items
79
?>
80
235
break; endwhile; endif;
236
237
do_action('lp_footer');
238
+ do_action('wp_footer');
239
+
240
?>
241
</div>
242
+ <footer>
243
+ <?php
244
+ do_action('lp_footer');
245
+ do_action('wp_footer');
246
+ ?>
247
+ </footer>
248
249
250
</body>
templates/demo/config.php CHANGED
@@ -27,7 +27,7 @@ $lp_data[$key]['info'] = array(
27
'label' => __( 'Demo','landing-pages'), /* Let's give our template a nice name */
28
'category' => 'Demo', /* you can categorize your landing pages by adding comma separated keywords */
29
'demo' => 'http://demo.inboundnow.com/go/demo-template-preview/', /* a link to a third party demo page if applicable */
30
- 'description' => __( 'The Demo theme is here to help developers and designs implement their own designs into the landing page plugin. Study this template to learn about Landing Page Plugin\'s templating system and to assist in building new templates.' , 'landing-pages' ) /* template description here! */
31
);
32
33
/* now setup ACF field definitions */
27
'label' => __( 'Demo','landing-pages'), /* Let's give our template a nice name */
28
'category' => 'Demo', /* you can categorize your landing pages by adding comma separated keywords */
29
'demo' => 'http://demo.inboundnow.com/go/demo-template-preview/', /* a link to a third party demo page if applicable */
30
+ 'description' => __( 'The Demo theme is here to help developers and designs implement their own designs into the landing page plugin. Study this template to learn about Landing Page Plugin\'s templating system and to assist in building new templates.' , 'inbound-pro' ) /* template description here! */
31
);
32
33
/* now setup ACF field definitions */
templates/demo/index.php CHANGED
@@ -76,7 +76,7 @@ $colorpicker = get_field( 'colorpicker',$post->ID , false );
76
<?php
77
78
/* Load Normal WordPress wp_head() function */
79
- wp_head();
80
81
/* Load Landing Pages's custom pre-load hook for 3rd party plugin integration */
82
do_action('lp_head');
@@ -229,10 +229,12 @@ $colorpicker = get_field( 'colorpicker',$post->ID , false );
229
<?php
230
break;
231
endwhile; endif;
232
- /* Load custom landing footer hook for 3rd party extensions */
233
- do_action('lp_footer');
234
- /* Load normal wordpress footer */
235
- wp_footer();
236
?>
237
</body>
238
</html>
76
<?php
77
78
/* Load Normal WordPress wp_head() function */
79
+ do_action('wp_head');
80
81
/* Load Landing Pages's custom pre-load hook for 3rd party plugin integration */
82
do_action('lp_head');
229
<?php
230
break;
231
endwhile; endif;
232
?>
233
+ <footer>
234
+ <?php
235
+ do_action('lp_footer');
236
+ do_action('wp_footer');
237
+ ?>
238
+ </footer>
239
</body>
240
</html>
templates/dropcap/config.php CHANGED
@@ -15,7 +15,7 @@ array(
15
'label' => "Dropcap",
16
'category' => '1 column layout',
17
'demo' => 'http://demo.inboundnow.com/go/dropcap-lander-preview/',
18
- 'description' => __( 'Create a great looking quote styled landing page' , 'landing-pages' )
19
);
20
21
/* Load ACF definitions for Dropcap */
@@ -48,10 +48,10 @@ if( function_exists('register_field_group') ):
48
),
49
array (
50
'key' => 'field_55dcf15e758b0',
51
- 'label' => __( 'Main Content', 'landing-pages' ),
52
'name' => 'dropcap-main-content',
53
'type' => 'wysiwyg',
54
- 'instructions' => __( 'This is the default content from template.', 'landing-pages' ),
55
'required' => 0,
56
'conditional_logic' => 0,
57
'wrapper' => array (
@@ -80,10 +80,10 @@ if( function_exists('register_field_group') ):
80
),
81
array (
82
'key' => 'field_55dcf19d758b1',
83
- 'label' => __( 'Conversion Area', 'landing-pages' ),
84
'name' => 'dropcap-conversion-area-content',
85
'type' => 'wysiwyg',
86
- 'instructions' => __( 'Place your call to action here.', 'landing-pages' ),
87
'required' => 0,
88
'conditional_logic' => 0,
89
'wrapper' => array (
@@ -98,10 +98,10 @@ if( function_exists('register_field_group') ):
98
),
99
array (
100
'key' => 'field_55dcf1d4f7702',
101
- 'label' => __( 'Text Color', 'landing-pages' ),
102
'name' => 'dropcap-text-color',
103
'type' => 'color_picker',
104
- 'instructions' => __( 'Use this setting to change the Text Color', 'landing-pages' ),
105
'required' => 0,
106
'conditional_logic' => 0,
107
'wrapper' => array (
@@ -113,10 +113,10 @@ if( function_exists('register_field_group') ):
113
),
114
array (
115
'key' => 'field_55dcf213a7269',
116
- 'label' => __( 'Content Background Color', 'landing-pages' ),
117
'name' => 'dropcap-content-background',
118
'type' => 'color_picker',
119
- 'instructions' => __( 'Use this setting to change the Content Area Background Color', 'landing-pages' ),
120
'required' => 0,
121
'conditional_logic' => 0,
122
'wrapper' => array (
@@ -128,10 +128,10 @@ if( function_exists('register_field_group') ):
128
),
129
array (
130
'key' => 'field_55dcf24aa726a',
131
- 'label' => __( 'Conversion Area Text Color', 'landing-pages' ),
132
'name' => 'dropcap-form-text-color',
133
'type' => 'color_picker',
134
- 'instructions' => __( 'Use this setting to change the Conversion Area text Color', 'landing-pages' ),
135
'required' => 0,
136
'conditional_logic' => 0,
137
'wrapper' => array (
@@ -143,10 +143,10 @@ if( function_exists('register_field_group') ):
143
),
144
array (
145
'key' => 'field_55dcf276a726b',
146
- 'label' => __( 'Background Settings', 'landing-pages' ),
147
'name' => 'dropcap-background-style',
148
'type' => 'select',
149
- 'instructions' => __( 'Set the template\'s background', 'landing-pages' ),
150
'required' => 0,
151
'conditional_logic' => 0,
152
'wrapper' => array (
@@ -173,10 +173,10 @@ if( function_exists('register_field_group') ):
173
),
174
array (
175
'key' => 'field_55dcf31b70c76',
176
- 'label' => __( 'Background Image', 'landing-pages' ),
177
'name' => 'dropcap-background-image',
178
'type' => 'image',
179
- 'instructions' => __( 'Upload or select a background image from the media library.', 'landing-pages' ),
180
'required' => 0,
181
'conditional_logic' => 0,
182
'wrapper' => array (
@@ -198,10 +198,10 @@ if( function_exists('register_field_group') ):
198
),
199
array (
200
'key' => 'field_55dcf36870c77',
201
- 'label' => __( 'Background Color', 'landing-pages' ),
202
'name' => 'dropcap-background-color',
203
'type' => 'color_picker',
204
- 'instructions' => __( 'Use this setting to change the templates background color', 'landing-pages' ),
205
'required' => 0,
206
'conditional_logic' => 0,
207
'wrapper' => array (
15
'label' => "Dropcap",
16
'category' => '1 column layout',
17
'demo' => 'http://demo.inboundnow.com/go/dropcap-lander-preview/',
18
+ 'description' => __( 'Create a great looking quote styled landing page' , 'inbound-pro' )
19
);
20
21
/* Load ACF definitions for Dropcap */
48
),
49
array (
50
'key' => 'field_55dcf15e758b0',
51
+ 'label' => __( 'Main Content', 'inbound-pro' ),
52
'name' => 'dropcap-main-content',
53
'type' => 'wysiwyg',
54
+ 'instructions' => __( 'This is the default content from template.', 'inbound-pro' ),
55
'required' => 0,
56
'conditional_logic' => 0,
57
'wrapper' => array (
80
),
81
array (
82
'key' => 'field_55dcf19d758b1',
83
+ 'label' => __( 'Conversion Area', 'inbound-pro' ),
84
'name' => 'dropcap-conversion-area-content',
85
'type' => 'wysiwyg',
86
+ 'instructions' => __( 'Place your call to action here.', 'inbound-pro' ),
87
'required' => 0,
88
'conditional_logic' => 0,
89
'wrapper' => array (
98
),
99
array (
100
'key' => 'field_55dcf1d4f7702',
101
+ 'label' => __( 'Text Color', 'inbound-pro' ),
102
'name' => 'dropcap-text-color',
103
'type' => 'color_picker',
104
+ 'instructions' => __( 'Use this setting to change the Text Color', 'inbound-pro' ),
105
'required' => 0,
106
'conditional_logic' => 0,
107
'wrapper' => array (
113
),
114
array (
115
'key' => 'field_55dcf213a7269',
116
+ 'label' => __( 'Content Background Color', 'inbound-pro' ),
117
'name' => 'dropcap-content-background',
118
'type' => 'color_picker',
119
+ 'instructions' => __( 'Use this setting to change the Content Area Background Color', 'inbound-pro' ),
120
'required' => 0,
121
'conditional_logic' => 0,
122
'wrapper' => array (
128
),
129
array (
130
'key' => 'field_55dcf24aa726a',
131
+ 'label' => __( 'Conversion Area Text Color', 'inbound-pro' ),
132
'name' => 'dropcap-form-text-color',
133
'type' => 'color_picker',
134
+ 'instructions' => __( 'Use this setting to change the Conversion Area text Color', 'inbound-pro' ),
135
'required' => 0,
136
'conditional_logic' => 0,
137
'wrapper' => array (
143
),
144
array (
145
'key' => 'field_55dcf276a726b',
146
+ 'label' => __( 'Background Settings', 'inbound-pro' ),
147
'name' => 'dropcap-background-style',
148
'type' => 'select',
149
+ 'instructions' => __( 'Set the template\'s background', 'inbound-pro' ),
150
'required' => 0,
151
'conditional_logic' => 0,
152
'wrapper' => array (
173
),
174
array (
175
'key' => 'field_55dcf31b70c76',
176
+ 'label' => __( 'Background Image', 'inbound-pro' ),
177
'name' => 'dropcap-background-image',
178
'type' => 'image',
179
+ 'instructions' => __( 'Upload or select a background image from the media library.', 'inbound-pro' ),
180
'required' => 0,
181
'conditional_logic' => 0,
182
'wrapper' => array (
198
),
199
array (
200
'key' => 'field_55dcf36870c77',
201
+ 'label' => __( 'Background Color', 'inbound-pro' ),
202
'name' => 'dropcap-background-color',
203
'type' => 'color_picker',
204
+ 'instructions' => __( 'Use this setting to change the templates background color', 'inbound-pro' ),
205
'required' => 0,
206
'conditional_logic' => 0,
207
'wrapper' => array (
templates/dropcap/index.php CHANGED
@@ -62,7 +62,7 @@ if ($background_style === "fullscreen") {
62
<link href="<?php echo $path; ?>assets/css/style.css" rel="stylesheet">
63
64
65
- <?php wp_head(); // Load Regular WP Head ?>
66
67
68
<style type="text/css">
@@ -141,8 +141,6 @@ if ($background_style === "fullscreen") {
141
endwhile;
142
endif; // end wordpress loop
143
144
- do_action('lp_footer'); // Load Landing Page Footer Hook
145
- wp_footer();
146
?>
147
<link href="<?php echo $path; ?>assets/css/form.css" rel="stylesheet">
148
<script type="text/javascript">
@@ -151,5 +149,11 @@ wp_footer();
151
});
152
153
</script>
154
</body>
155
</html>
62
<link href="<?php echo $path; ?>assets/css/style.css" rel="stylesheet">
63
64
65
+ <?php do_action('wp_head'); // Load Regular WP Head ?>
66
67
68
<style type="text/css">
141
endwhile;
142
endif; // end wordpress loop
143
144
?>
145
<link href="<?php echo $path; ?>assets/css/form.css" rel="stylesheet">
146
<script type="text/javascript">
149
});
150
151
</script>
152
+ <footer>
153
+ <?php
154
+ do_action('lp_footer');
155
+ do_action('wp_footer');
156
+ ?>
157
+ </footer>
158
</body>
159
</html>
templates/half-and-half/index.php CHANGED
@@ -97,7 +97,7 @@ if (have_posts()) : while (have_posts()) : the_post();
97
/* Import Google Font Stylesheet */
98
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300);
99
</style>
100
- <?php wp_head(); // Load Regular WP Head ?>
101
<?php do_action('lp_head'); // Load Landing Page Specific Header Items ?>
102
</head>
103
<body>
@@ -142,9 +142,14 @@ if (have_posts()) : while (have_posts()) : the_post();
142
margin-left: -240px;
143
}
144
</style>
145
- <?php break; endwhile; endif; // end WordPress Loop
146
- do_action('lp_footer'); // load landing pages footer hook
147
- wp_footer(); // load normal wordpress footer
148
?>
149
</body>
150
</html>
97
/* Import Google Font Stylesheet */
98
@import url(http://fonts.googleapis.com/css?family=Open+Sans:400,300);
99
</style>
100
+ <?php dp_action('wp_head'); // Load Regular WP Head ?>
101
<?php do_action('lp_head'); // Load Landing Page Specific Header Items ?>
102
</head>
103
<body>
142
margin-left: -240px;
143
}
144
</style>
145
+ <?php
146
+ break; endwhile; endif; // end WordPress Loop
147
?>
148
+ <footer>
149
+ <?php
150
+ do_action('lp_footer');
151
+ do_action('wp_footer');
152
+ ?>
153
+ </footer>
154
</body>
155
</html>
templates/simple-solid-lite/config.php CHANGED
@@ -17,7 +17,7 @@ $lp_data[$key]['info'] = array(
17
'label' => 'Simple Solid Lite',
18
'category' => '1 Column',
19
'demo' => 'http://demo.inboundnow.com/go/simple/',
20
- 'description' => __( 'This is a free template provided by Inbound Now' , 'landing-pages' )
21
);
22
23
/* Configures template ACF fields here */
17
'label' => 'Simple Solid Lite',
18
'category' => '1 Column',
19
'demo' => 'http://demo.inboundnow.com/go/simple/',
20
+ 'description' => __( 'This is a free template provided by Inbound Now' , 'inbound-pro' )
21
);
22
23
/* Configures template ACF fields here */
templates/simple-solid-lite/index.php CHANGED
@@ -80,7 +80,8 @@ $test = inbound_color_scheme($background_color, 'hex');
80
<script src="<?php echo $path; ?>js/selectivizr-min.js"></script><![endif]-->
81
82
83
- <?php wp_head();
84
do_action('lp_head'); ?>
85
<style id="inbound-style-overrides" type="text/css">
86
@@ -213,7 +214,12 @@ $test = inbound_color_scheme($background_color, 'hex');
213
<?php break;
214
endwhile;
215
endif;
216
- do_action('lp_footer');
217
- wp_footer(); ?>
218
</body>
219
</html>
80
<script src="<?php echo $path; ?>js/selectivizr-min.js"></script><![endif]-->
81
82
83
+ <?php
84
+ do_action('wp_head');
85
do_action('lp_head'); ?>
86
<style id="inbound-style-overrides" type="text/css">
87
214
<?php break;
215
endwhile;
216
endif;
217
+ ?>
218
+ <footer>
219
+ <?php
220
+ do_action('lp_footer');
221
+ do_action('wp_footer');
222
+ ?>
223
+ </footer>
224
</body>
225
</html>
templates/simple-two-column/index.php CHANGED
@@ -128,7 +128,7 @@ if ($submit_button_color != "") {
128
129
</style>
130
<?php /* Load all functions hooked to lp_head including global js and global css */
131
- wp_head(); // Load Regular WP Head
132
do_action('lp_head'); // Load Custom Landing Page Specific Header Items
133
?>
134
<script type="text/javascript">
@@ -186,8 +186,13 @@ if ($social_display==="1" ) { // Show Social Media Icons?>
186
endwhile;
187
endif; // end wordpress loop
188
189
- do_action('lp_footer'); // load landing pages footer hook
190
- wp_footer(); // load normal wordpress footer ?>
191
192
</body>
193
</html>
128
129
</style>
130
<?php /* Load all functions hooked to lp_head including global js and global css */
131
+ do_action('wp_head'); // Load Regular WP Head
132
do_action('lp_head'); // Load Custom Landing Page Specific Header Items
133
?>
134