WordPress Landing Pages - Version 1.4.8

Version Description

  • Added Google Analytics Custom Event Tracking for form submissions
  • Added Ability: automatically sort leads into lists on form completions
  • Added Ability: Send lead notification emails to multiple people. Use comma separated values
  • Improved Social Media Buttons called with lp_social_media() function
  • Fixed qTranslate plugin bug
  • Fixed Genesis Title tag conflict
  • Added improved asset loader
  • Updated main docs.inboundnow.com site. Check it out!
Download this release

Release Info

Developer DavidWells
Plugin Icon 128x128 WordPress Landing Pages
Version 1.4.8
Comparing to
See all releases

Code changes from version 1.4.7 to 1.4.8

Files changed (110) hide show
  1. css/admin-style.css +13 -7
  2. css/new-customizer-admin.css +2 -5
  3. js/admin/admin.post-edit.js +110 -91
  4. js/admin/admin.post-new.js +4 -0
  5. landing-pages.php +10 -4
  6. modules/module.ab-testing.metaboxes.php +1 -1
  7. modules/module.activate.php +15 -19
  8. modules/module.ajax-setup.php +1 -1
  9. modules/module.global-settings.php +2 -2
  10. modules/module.javascript-admin.php +8 -20
  11. modules/module.javascript-frontend.php +25 -77
  12. modules/module.metaboxes.php +1 -1
  13. modules/module.post-type.php +7 -43
  14. modules/module.redirect-ab-testing.php +8 -2
  15. modules/module.templates.php +1 -1
  16. modules/module.track.php +1 -1
  17. modules/module.track.php.orig +1 -0
  18. modules/module.utils.php +39 -27
  19. modules/module.welcome.php +3 -3
  20. modules/module.widgets.php +4 -4
  21. readme.txt +16 -2
  22. shared/.SyncIgnore +22 -12
  23. shared/assets/admin/css/global-inbound-admin.css +136 -0
  24. shared/assets/admin/images/inbound-now-logo.png +0 -0
  25. shared/assets/admin/js/select2.js +3137 -0
  26. shared/assets/admin/js/select2.min.js +22 -0
  27. shared/assets/assets.loader.class.php +148 -0
  28. shared/assets/frontend/js/page-tracking.js +508 -0
  29. shared/assets/frontend/js/store.lead.ajax.js +495 -0
  30. shared/assets/global/fonts/fontawesome/FontAwesome.otf +0 -0
  31. shared/assets/global/fonts/fontawesome/README.md +17 -0
  32. shared/assets/global/fonts/fontawesome/fontawesome-webfont.eot +0 -0
  33. shared/assets/global/fonts/fontawesome/fontawesome-webfont.eot~HEAD +0 -0
  34. shared/assets/global/fonts/fontawesome/fontawesome-webfont.svg +414 -0
  35. shared/assets/global/fonts/fontawesome/fontawesome-webfont.svg~HEAD +414 -0
  36. shared/assets/global/fonts/fontawesome/fontawesome-webfont.ttf +0 -0
  37. shared/assets/global/fonts/fontawesome/fontawesome-webfont.ttf~HEAD +0 -0
  38. shared/assets/global/fonts/fontawesome/fontawesome-webfont.woff +0 -0
  39. shared/assets/global/fonts/fontawesome/fontawesome-webfont.woff~HEAD +0 -0
  40. shared/assets/global/images/leads.png +0 -0
  41. shared/assets/global/images/shortcodes-blue.png +0 -0
  42. shared/assets/global/js/jquery.cookie.js +1 -0
  43. shared/assets/global/js/jquery.total-storage.min.js +22 -0
  44. shared/assets/readme.txt +7 -0
  45. shared/classes/chart.class.php +290 -290
  46. shared/classes/compatibility.class.php +133 -133
  47. shared/classes/debug.class.php +382 -378
  48. shared/classes/feedback.class.php +380 -380
  49. shared/classes/form.class.php +24 -8
  50. shared/classes/js/debug.js +36 -36
  51. shared/classes/js/inbound-dequeue-scripts.js +49 -49
  52. shared/classes/menu.class.php +661 -784
  53. shared/functions.templates.php +110 -110
  54. shared/functions/global.leads.cpt.php +221 -0
  55. shared/functions/global.shared.functions.php +209 -0
  56. shared/inbound-shortcodes/css/form-cpt.css +133 -133
  57. shared/inbound-shortcodes/css/frontend-render.css +1065 -1065
  58. shared/inbound-shortcodes/css/shortcodes.css +591 -591
  59. shared/inbound-shortcodes/inbound-shortcodes.php +5 -1
  60. shared/inbound-shortcodes/inbound-shortcodes.php.orig +699 -0
  61. shared/inbound-shortcodes/js/form-cpt.js +128 -128
  62. shared/inbound-shortcodes/js/shortcodes-plugins.js +31 -31
  63. shared/inbound-shortcodes/js/shortcodes.js +969 -919
  64. shared/inbound-shortcodes/js/tinymce.js +166 -166
  65. shared/inbound-shortcodes/popup.php +68 -68
  66. shared/inbound-shortcodes/preview.php +211 -214
  67. shared/inbound-shortcodes/shortcodes-fields.php +311 -294
  68. shared/inbound-shortcodes/shortcodes-includes.php +107 -107
  69. shared/inbound-shortcodes/shortcodes/alert.php +45 -45
  70. shared/inbound-shortcodes/shortcodes/button.php +108 -108
  71. shared/inbound-shortcodes/shortcodes/call-to-action.php +21 -21
  72. shared/inbound-shortcodes/shortcodes/callout.php +166 -166
  73. shared/inbound-shortcodes/shortcodes/column.php +169 -169
  74. shared/inbound-shortcodes/shortcodes/content-box.php +77 -77
  75. shared/inbound-shortcodes/shortcodes/divider.php +113 -113
  76. shared/inbound-shortcodes/shortcodes/forms.php +675 -652
  77. shared/inbound-shortcodes/shortcodes/gmap.php +154 -154
  78. shared/inbound-shortcodes/shortcodes/icon.php +58 -58
  79. shared/inbound-shortcodes/shortcodes/intro.php +92 -92
  80. shared/inbound-shortcodes/shortcodes/landing-page-list.php +136 -136
  81. shared/inbound-shortcodes/shortcodes/landing_pages.php +205 -205
  82. shared/inbound-shortcodes/shortcodes/leadp.php +43 -43
  83. shared/inbound-shortcodes/shortcodes/list-icon.php +64 -64
  84. shared/inbound-shortcodes/shortcodes/lists.php +59 -59
  85. shared/inbound-shortcodes/shortcodes/pricing.php +211 -211
  86. shared/inbound-shortcodes/shortcodes/profile.php +183 -183
  87. shared/inbound-shortcodes/shortcodes/quick-forms.php +36 -36
  88. shared/inbound-shortcodes/shortcodes/social-share.php +101 -101
  89. shared/inbound-shortcodes/shortcodes/social.php +93 -93
  90. shared/inbound-shortcodes/shortcodes/tabs.php +130 -130
  91. shared/inbound-shortcodes/shortcodes/teaser.php +254 -254
  92. shared/inbound-shortcodes/shortcodes/testimonial.php +178 -178
  93. shared/inbound-shortcodes/shortcodes/video.php +31 -31
  94. shared/inboundnow/inboundnow.global-settings.php +34 -20
  95. shared/js/selectron.js +189 -189
  96. shared/metaboxes/template.metaboxes.php +0 -4
  97. shared/tracking/js/inprogress.store.lead.ajax.js +630 -630
  98. shared/tracking/js/store.lead.ajax.js +1 -523
  99. shared/tracking/page-tracking.js +1 -454
  100. shared/tracking/store.lead.php +373 -288
  101. shared/tracking/store.lead.php.orig +297 -0
  102. templates/demo/config.php +12 -13
  103. templates/demo/index.php +33 -36
  104. templates/simple-solid-lite/config.php +89 -0
  105. templates/simple-solid-lite/images/inbound-logo.png +0 -0
  106. templates/simple-solid-lite/index.php +151 -0
  107. templates/simple-solid-lite/js/jquery.min.js +6 -0
  108. templates/simple-solid-lite/js/scripts.js +8 -0
  109. templates/simple-solid-lite/js/selectivizr-min.js +5 -0
  110. templates/simple-solid-lite/thumbnail.png +0 -0
css/admin-style.css CHANGED
@@ -25,13 +25,16 @@
25
padding-top: 5px;
26
padding-left: 10px;
27
28
}
29
@font-face {
30
font-family: 'FontAwesome';
31
- src: url('../shared/fonts/fontawesome/fontawesome-webfont.eot?v=3.0.2');
32
- src: url('../shared/fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=3.0.2') format('embedded-opentype'),
33
- url('../shared/fonts/fontawesome/fontawesome-webfont.woff?v=3.0.2') format('woff'),
34
- url('../shared/fonts/fontawesome/fontawesome-webfont.ttf?v=3.0.2') format('truetype');
35
font-weight: normal;
36
font-style: normal;
37
}
@@ -243,9 +246,12 @@ th.landing-page-table-header {width:230px; line-height: 22px;}
243
#lp_template_change h2 {display: inline-block;}
244
245
#lp_template_change {
246
- margin-left: 17px;
247
- margin-top: -20px;
248
- float: right;
249
}
250
251
/* Split Testing Splash */
25
padding-top: 5px;
26
padding-left: 10px;
27
28
+ }
29
+ #menu-posts-landing-page .wp-submenu.wp-submenu-wrap {
30
+ z-index: 99999999999;
31
}
32
@font-face {
33
font-family: 'FontAwesome';
34
+ src: url('../shared/assets/global/fonts/fontawesome/fontawesome-webfont.eot?v=3.0.2');
35
+ src: url('../shared/assets/global/fonts/fontawesome/fontawesome-webfont.eot?#iefix&v=3.0.2') format('embedded-opentype'),
36
+ url('../shared/assets/global/fonts/fontawesome/fontawesome-webfont.woff?v=3.0.2') format('woff'),
37
+ url('../shared/assets/global/fonts/fontawesome/fontawesome-webfont.ttf?v=3.0.2') format('truetype');
38
font-weight: normal;
39
font-style: normal;
40
}
246
#lp_template_change h2 {display: inline-block;}
247
248
#lp_template_change {
249
+ margin-left: 17px;
250
+ margin-top: -20px;
251
+ float: right;
252
+ position: absolute;
253
+ top: 0px;
254
+ right: 10px;
255
}
256
257
/* Split Testing Splash */
css/new-customizer-admin.css CHANGED
@@ -10,7 +10,7 @@ html.wp-toolbar {
10
.auto-fold #wpcontent, .auto-fold #wpfooter {
11
margin-left: 10px !important;
12
}
13
- .version-3-8 #wpbody-content {
14
padding-bottom: 90px !important;
15
width: 100% !important;
16
}
@@ -41,10 +41,7 @@ margin-left: 0px !important;
41
width: 105%;
42
margin-left: -6px;
43
}
44
- #wpbody-content {
45
- padding-bottom: 60px !important;
46
- width: 76% !important;
47
- }
48
@media screen and (max-width: 600px) {
49
.version-3-8 #wpbody {
50
padding-top: 5px !important;
10
.auto-fold #wpcontent, .auto-fold #wpfooter {
11
margin-left: 10px !important;
12
}
13
+ #wpbody-content {
14
padding-bottom: 90px !important;
15
width: 100% !important;
16
}
41
width: 105%;
42
margin-left: -6px;
43
}
44
+
45
@media screen and (max-width: 600px) {
46
.version-3-8 #wpbody {
47
padding-top: 5px !important;
js/admin/admin.post-edit.js CHANGED
@@ -1,41 +1,63 @@
1
- jQuery(document).ready(function ($) {
2
3
4
- // Isotope Styling
5
jQuery('#template-filter li').first().addClass('button-primary');
6
- // filter items when filter link is clicked
7
- jQuery('#template-filter a').click(function(){
8
- var selector = jQuery(this).attr('data-filter');
9
- jQuery("ul#template-filter li").removeClass('button-primary');
10
jQuery(this).parent().addClass('button-primary');
11
12
- return false;
13
- });
14
-
15
- /* Ajax loading tabs
16
- jQuery.koolSwap({
17
- swapBox : '#poststuff',
18
- outDuration : 550,
19
- inDuration : 600,
20
- });
21
- */
22
-
23
- jQuery("body").on('click', '#content-tmce, .wp-switch-editor.switch-tmce', function () {
24
- $.cookie("lp-edit-view-choice", "editor", { path: '/', expires: 7 });
25
- });
26
-
27
- jQuery("body").on('click', '#content-html, .wp-switch-editor.switch-html', function () {
28
- $.cookie("lp-edit-view-choice", "html", { path: '/', expires: 7 });
29
- });
30
-
31
- var which_editor = $.cookie("lp-edit-view-choice");
32
- if(which_editor === null){
33
- setTimeout(function() {
34
- //jQuery("#content-tmce").click();
35
- //jQuery(".wp-switch-editor.switch-tmce").click();
36
- }, 1000);
37
38
}
39
/*
40
41
var chtml= jQuery('#content-html');
@@ -46,16 +68,16 @@ jQuery(document).ready(function ($) {
46
switchEditors.switchto(ctmce[0]); // switch to tinymce
47
48
*/
49
- if(which_editor === 'editor'){
50
- setTimeout(function() {
51
52
var ctmce= jQuery('#content-tmce');
53
switchEditors.switchto(ctmce[0]); // switch to tinymce
54
55
var conversion_area = jQuery("#landing-page-myeditor-tmce");
56
switchEditors.switchto(conversion_area[0]); // switch to tinymce
57
- //jQuery("#content-tmce").click();
58
- //jQuery(".wp-switch-editor.switch-tmce").click();
59
jQuery('.inbound-wysiwyg-option textarea').each(function(){
60
var chtml= "#" + jQuery(this).attr('id') + '-html';
61
var ctmce= "#" + jQuery(this).attr('id') + '-tmce';
@@ -63,8 +85,8 @@ jQuery(document).ready(function ($) {
63
var tinymce_box = jQuery(ctmce);
64
switchEditors.switchto(tinymce_box[0]); // switch to tinymce
65
});
66
- }, 1000);
67
- }
68
69
/* Tour Start JS */
70
var tourbutton = '<a class="" id="lp-tour" style="font-size:13px;">Need help? Take the tour</a>';
@@ -90,10 +112,10 @@ jQuery(document).ready(function ($) {
90
// Fix inactivate theme display
91
jQuery("#template-box a").live('click', function () {
92
93
- setTimeout(function() {
94
- jQuery('#TB_window iframe').contents().find("#customize-controls").hide();
95
- jQuery('#TB_window iframe').contents().find(".wp-full-overlay.expanded").css("margin-left", "0px");
96
- }, 600);
97
98
});
99
@@ -177,62 +199,59 @@ jQuery(document).ready(function ($) {
177
jQuery('.lp_select_template').click(function(){
178
var template = jQuery(this).attr('id');
179
var label = jQuery(this).attr('label');
180
- var selected_template_id = "#" + template;
181
- var currentlabel = jQuery(".currently_selected").show();
182
- var current_template = jQuery("input#lp_select_template ").val();
183
var current_template_meta = "#lp_" + current_template + "_custom_meta_box";
184
var current_template_h3 = "#lp_" + current_template + "_custom_meta_box h3";
185
var current_template_div = "#lp_" + current_template + "_custom_meta_box .handlediv";
186
var open_variation = jQuery("#open_variation").val();
187
188
- if (open_variation>0)
189
- {
190
- var variation_tag = "-"+open_variation;
191
- }
192
- else
193
- {
194
- var variation_tag = "";
195
- }
196
197
- jQuery("#template-box.default_template_highlight").removeClass("default_template_highlight");
198
199
jQuery(selected_template_id).parent().addClass("default_template_highlight").prepend(currentlabel);
200
-
201
- jQuery(".lp-template-selector-container").fadeOut(500,function(){
202
- jQuery('#lp_metabox_select_template input').remove();
203
- jQuery('#lp_metabox_select_template .form-table').remove();
204
-
205
- var ajax_data = {
206
- action: 'lp_get_template_meta',
207
- selected_template: template,
208
- post_id: lp_post_edit_ui.post_id,
209
- };
210
-
211
- jQuery.ajax({
212
- type: "POST",
213
- url: lp_post_edit_ui.ajaxurl,
214
- data: ajax_data,
215
- dataType: 'html',
216
- timeout: 7000,
217
- success: function (response) {
218
- //alert(response);
219
- var html = '<input id="lp_select_template" type="hidden" value="'+template+'" name="lp-selected-template'+variation_tag+'">'
220
- + '<input type="hidden" value="'+lp_post_edit_ui.lp_template_nonce+'" name="lp_lp_custom_fields_nonce">'
221
- + '<h3 class="hndle" style="cursor: default;">'
222
- + '<span>'
223
- + '<small>'+ template +' Options:</small>'
224
- + '</span>'
225
- + '</h3>'
226
- + response;
227
-
228
- jQuery('#lp_metabox_select_template #template-display-options').html(html);
229
- jQuery('.time-picker').timepicker({ 'timeFormat': 'H:i' });
230
-
231
- },
232
- error: function(request, status, err) {
233
- alert(status);
234
- }
235
- });
236
jQuery(".wrap").fadeIn(500, function(){
237
});
238
});
@@ -329,7 +348,7 @@ jQuery(document).ready(function ($) {
329
jQuery(".currently_selected").show();
330
jQuery('#lp-cancel-selection').show();
331
});
332
- jQuery("#template-filter li a").first().click();
333
});
334
});
335
@@ -474,7 +493,7 @@ jQuery(document).ready(function ($) {
474
*/
475
476
477
- // SAVE META
478
var nonce_val = lp_post_edit_ui.wp_landing_page_meta_nonce; // NEED CORRECT NONCE
479
jQuery(document).on('mousedown', '.new-save-lp', function () {
480
var type_input = jQuery(this).parent().find("input").attr("type");
1
+ jQuery(document).ready(function($) {
2
+
3
+ var cookies = (typeof (jQuery.cookie) != "undefined" ? true : false); // Check for JQuery Cookie
4
+ function cookie_notice() {
5
+ alert('Oh no! jQuery Cookie not loaded. Your Server Might be Blocking this. Some functionality may be impaired');
6
+ }
7
8
9
+ // Filter Styling
10
jQuery('#template-filter li').first().addClass('button-primary');
11
+ // filter items when filter link is clicked
12
+ jQuery('#template-filter a').click(function(){
13
+ var selector = jQuery(this).attr('data-filter');
14
+ jQuery("ul#template-filter li").removeClass('button-primary');
15
jQuery(this).parent().addClass('button-primary');
16
+ $(".template-item-boxes").fadeOut(500);
17
+ setTimeout(function() {
18
+ $(selector).fadeIn(500);
19
+ }, 500);
20
+
21
+ return false;
22
+ });
23
+
24
+ /* Ajax loading tabs
25
+ jQuery.koolSwap({
26
+ swapBox : '#poststuff',
27
+ outDuration : 550,
28
+ inDuration : 600,
29
+ });
30
+ */
31
+
32
+ jQuery("body").on('click', '#content-tmce, .wp-switch-editor.switch-tmce', function () {
33
+ if(cookies) {
34
+ $.cookie("lp-edit-view-choice", "editor", { path: '/', expires: 7 });
35
+ } else {
36
+ cookie_notice();
37
+ }
38
+ });
39
40
+ jQuery("body").on('click', '#content-html, .wp-switch-editor.switch-html', function () {
41
+ if(cookies) {
42
+ $.cookie("lp-edit-view-choice", "html", { path: '/', expires: 7 });
43
+ } else {
44
+ cookie_notice();
45
+ }
46
+ });
47
48
+ if(cookies) {
49
+ var which_editor = $.cookie("lp-edit-view-choice");
50
+ } else {
51
+ var which_editor = 'editor';
52
+ cookie_notice();
53
}
54
+ if(which_editor === null){
55
+ setTimeout(function() {
56
+ //jQuery("#content-tmce").click();
57
+ //jQuery(".wp-switch-editor.switch-tmce").click();
58
+ }, 1000);
59
+
60
+ }
61
/*
62
63
var chtml= jQuery('#content-html');
68
switchEditors.switchto(ctmce[0]); // switch to tinymce
69
70
*/
71
+ if(which_editor === 'editor'){
72
+ setTimeout(function() {
73
74
var ctmce= jQuery('#content-tmce');
75
switchEditors.switchto(ctmce[0]); // switch to tinymce
76
77
var conversion_area = jQuery("#landing-page-myeditor-tmce");
78
switchEditors.switchto(conversion_area[0]); // switch to tinymce
79
+ //jQuery("#content-tmce").click();
80
+ //jQuery(".wp-switch-editor.switch-tmce").click();
81
jQuery('.inbound-wysiwyg-option textarea').each(function(){
82
var chtml= "#" + jQuery(this).attr('id') + '-html';
83
var ctmce= "#" + jQuery(this).attr('id') + '-tmce';
85
var tinymce_box = jQuery(ctmce);
86
switchEditors.switchto(tinymce_box[0]); // switch to tinymce
87
});
88
+ }, 1000);
89
+ }
90
91
/* Tour Start JS */
92
var tourbutton = '<a class="" id="lp-tour" style="font-size:13px;">Need help? Take the tour</a>';
112
// Fix inactivate theme display
113
jQuery("#template-box a").live('click', function () {
114
115
+ setTimeout(function() {
116
+ jQuery('#TB_window iframe').contents().find("#customize-controls").hide();
117
+ jQuery('#TB_window iframe').contents().find(".wp-full-overlay.expanded").css("margin-left", "0px");
118
+ }, 600);
119
120
});
121
199
jQuery('.lp_select_template').click(function(){
200
var template = jQuery(this).attr('id');
201
var label = jQuery(this).attr('label');
202
+ var selected_template_id = "#" + template;
203
+ var currentlabel = jQuery(".currently_selected").show();
204
+ var current_template = jQuery("input#lp_select_template ").val();
205
var current_template_meta = "#lp_" + current_template + "_custom_meta_box";
206
var current_template_h3 = "#lp_" + current_template + "_custom_meta_box h3";
207
var current_template_div = "#lp_" + current_template + "_custom_meta_box .handlediv";
208
var open_variation = jQuery("#open_variation").val();
209
210
+ if (open_variation>0) {
211
+ var variation_tag = "-"+open_variation;
212
+ } else {
213
+ var variation_tag = "";
214
+ }
215
216
+ jQuery("#template-box.default_template_highlight").removeClass("default_template_highlight");
217
218
jQuery(selected_template_id).parent().addClass("default_template_highlight").prepend(currentlabel);
219
+ function capitaliseFirstLetter(string) {
220
+ return string.charAt(0).toUpperCase() + string.slice(1);
221
+ }
222
+ jQuery(".lp-template-selector-container").fadeOut(500,function(){
223
+ jQuery('#lp_metabox_select_template input').remove();
224
+ jQuery('#lp_metabox_select_template .form-table').remove();
225
+
226
+ var ajax_data = {
227
+ action: 'lp_get_template_meta',
228
+ selected_template: template,
229
+ post_id: lp_post_edit_ui.post_id,
230
+ };
231
+
232
+ jQuery.ajax({
233
+ type: "POST",
234
+ url: lp_post_edit_ui.ajaxurl,
235
+ data: ajax_data,
236
+ dataType: 'html',
237
+ timeout: 7000,
238
+ success: function (response) {
239
+ //alert(response);
240
+ var html = '<input id="lp_select_template" type="hidden" value="'+template+'" name="lp-selected-template'+variation_tag+'">'
241
+ + '<input type="hidden" value="'+lp_post_edit_ui.lp_template_nonce+'" name="lp_lp_custom_fields_nonce">'
242
+ + response;
243
+
244
+ jQuery('#lp_metabox_select_template #template-display-options').html(html);
245
+ jQuery('.time-picker').timepicker({ 'timeFormat': 'H:i' });
246
+ var template_name = capitaliseFirstLetter(template).replace("-", " ");
247
+ var template_name = template_name.replace("_", " ");
248
+ jQuery("#lp_metabox_select_template .hndle").first().text(template_name + " Template Options");
249
+
250
+ },
251
+ error: function(request, status, err) {
252
+ alert(status);
253
+ }
254
+ });
255
jQuery(".wrap").fadeIn(500, function(){
256
});
257
});
348
jQuery(".currently_selected").show();
349
jQuery('#lp-cancel-selection').show();
350
});
351
+
352
});
353
});
354
493
*/
494
495
496
+ // SAVE META
497
var nonce_val = lp_post_edit_ui.wp_landing_page_meta_nonce; // NEED CORRECT NONCE
498
jQuery(document).on('mousedown', '.new-save-lp', function () {
499
var type_input = jQuery(this).parent().find("input").attr("type");
js/admin/admin.post-new.js CHANGED
@@ -65,6 +65,10 @@ jQuery(document).ready(function ($) {
65
var selector = jQuery(this).attr('data-filter');
66
jQuery("ul#template-filter li").removeClass('button-primary');
67
jQuery(this).parent().addClass('button-primary');
68
69
return false;
70
});
65
var selector = jQuery(this).attr('data-filter');
66
jQuery("ul#template-filter li").removeClass('button-primary');
67
jQuery(this).parent().addClass('button-primary');
68
+ $(".template-item-boxes").fadeOut(500);
69
+ setTimeout(function() {
70
+ $(selector).fadeIn(500);
71
+ }, 500);
72
73
return false;
74
});
landing-pages.php CHANGED
@@ -3,19 +3,19 @@
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: 1.4.7
7
Author: Inbound Now
8
Author URI: http://www.inboundnow.com/
9
Text Domain: landing-pages
10
Domain Path: shared/languages/landing-pages/
11
*/
12
13
- define('LANDINGPAGES_CURRENT_VERSION', '1.4.7' );
14
define('LANDINGPAGES_URLPATH', WP_PLUGIN_URL.'/'.plugin_basename( dirname(__FILE__) ).'/' );
15
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
16
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
17
define('LANDINGPAGES_FILE', __FILE__ );
18
- define('LANDINGPAGES_STORE_URL', 'http://www.inboundnow.com/landing-pages/' );
19
$uploads = wp_upload_dir();
20
define('LANDINGPAGES_UPLOADS_PATH', $uploads['basedir'].'/landing-pages/templates/' );
21
define('LANDINGPAGES_UPLOADS_URLPATH', $uploads['baseurl'].'/landing-pages/templates/' );
@@ -82,6 +82,10 @@ switch (is_admin()) :
82
BREAK;
83
endswitch;
84
85
86
87
/* Inbound Core Shared Files. Lead files take presidence */
@@ -107,7 +111,9 @@ function inbound_load_shared_landing_pages(){
107
include_once('shared/inboundnow/inboundnow.extension-licensing.php'); // Inboundnow Package Licensing
108
include_once('shared/inboundnow/inboundnow.extension-updating.php'); // Inboundnow Package Updating
109
include_once('shared/inboundnow/inboundnow.global-settings.php'); // Inboundnow Global Settings
110
-
111
112
}
113
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: 1.4.8
7
Author: Inbound Now
8
Author URI: http://www.inboundnow.com/
9
Text Domain: landing-pages
10
Domain Path: shared/languages/landing-pages/
11
*/
12
13
+ define('LANDINGPAGES_CURRENT_VERSION', '1.4.8' );
14
define('LANDINGPAGES_URLPATH', WP_PLUGIN_URL.'/'.plugin_basename( dirname(__FILE__) ).'/' );
15
define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
16
define('LANDINGPAGES_PLUGIN_SLUG', plugin_basename( dirname(__FILE__) ) );
17
define('LANDINGPAGES_FILE', __FILE__ );
18
+ define('LANDINGPAGES_STORE_URL', 'http://www.inboundnow.com/' );
19
$uploads = wp_upload_dir();
20
define('LANDINGPAGES_UPLOADS_PATH', $uploads['basedir'].'/landing-pages/templates/' );
21
define('LANDINGPAGES_UPLOADS_URLPATH', $uploads['baseurl'].'/landing-pages/templates/' );
82
BREAK;
83
endswitch;
84
85
+ add_action( 'init', 'inbound_load_shared_lp_init' , 11 );
86
+ function inbound_load_shared_lp_init(){
87
+
88
+ }
89
90
91
/* Inbound Core Shared Files. Lead files take presidence */
111
include_once('shared/inboundnow/inboundnow.extension-licensing.php'); // Inboundnow Package Licensing
112
include_once('shared/inboundnow/inboundnow.extension-updating.php'); // Inboundnow Package Updating
113
include_once('shared/inboundnow/inboundnow.global-settings.php'); // Inboundnow Global Settings
114
+ include_once('shared/assets/assets.loader.class.php'); // Load Shared CSS and JS Assets
115
+ include_once('shared/functions/global.shared.functions.php'); // Global Shared Utility functions
116
+ include_once('shared/functions/global.leads.cpt.php'); // Shared Lead functionality
117
118
}
119
modules/module.ab-testing.metaboxes.php CHANGED
@@ -193,7 +193,7 @@ function lp_ab_testing_add_tabs()
193
}
194
195
echo '<h2 class="nav-tab-wrapper a_b_tabs">';
196
- echo '<a href="?post='.$post->ID.'&lp-variation-id=0&action=edit" class="lp-ab-tab nav-tab nav-tab-special-'.$first_class.'" id="tabs-0">'.__("A",LANDINGPAGES_TEXT_DOMAIN).'</a>';
197
198
$var_id_marker = 1;
199
193
}
194
195
echo '<h2 class="nav-tab-wrapper a_b_tabs">';
196
+ echo '<a href="?post='.$post->ID.'&lp-variation-id=0&action=edit" class="lp-ab-tab nav-tab nav-tab-special-'.$first_class.'" id="tabs-0">'.__("<span>Version</span> <b>A</b>",LANDINGPAGES_TEXT_DOMAIN).'</a>';
197
198
$var_id_marker = 1;
199
modules/module.activate.php CHANGED
@@ -7,36 +7,26 @@ register_activation_hook( LANDINGPAGES_FILE , 'landing_page_activate');
7
function landing_page_activate($wp = '3.6', $php = '5.3', $cta = '1.2.1', $leads = '1.2.1')
8
{
9
global $wp_version;
10
- if ( version_compare( phpversion(), $php, '<' ) )
11
- {
12
$flag = 'PHP';
13
- $version = 'PHP' == $flag ? $php : $wp;
14
- wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires'.$flag.' version '.$php.' or greater.</p>' , LANDINGPAGES_TEXT_DOMAIN) , __( 'Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN) , array( 'response'=>200, 'back_link'=>TRUE ) );
15
deactivate_plugins( basename( __FILE__ ) );
16
- }
17
- elseif ( version_compare( $wp_version, $wp, '<' ) )
18
- {
19
$flag = 'WordPress';
20
wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires'.$flag.' version '.$wp.' or greater.</p>' , LANDINGPAGES_TEXT_DOMAIN), __('Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN), array( 'response'=>200, 'back_link'=>TRUE ) );
21
deactivate_plugins( basename( __FILE__ ) );
22
- }
23
- elseif (defined('WP_CTA_CURRENT_VERSION') && version_compare( WP_CTA_CURRENT_VERSION, $cta, '<' ))
24
- {
25
$flag = __('WordPress Calls to Action' , LANDINGPAGES_TEXT_DOMAIN);
26
wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires '.$flag.' version '.$cta.' or greater. <br><br>Please Update WordPress Call to Action Plugin to update & install WordPress Landing Pages</p>' , LANDINGPAGES_TEXT_DOMAIN) , __('Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN) , array( 'response'=>200, 'back_link'=>TRUE ) );
27
- }
28
- elseif (defined('WPL_CURRENT_VERSION') && version_compare( WPL_CURRENT_VERSION, $leads, '<' ))
29
- {
30
$flag = 'WordPress Leads';
31
wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires '.$flag.' version '.$leads.' or greater. <br><br>Please Update WordPress Leads Plugin to update & install WordPress Landing Pages</p>' , INBOUDNOW_LABEL ) , __( 'Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN) , array( 'response'=>200, 'back_link'=>TRUE ) );
32
- }
33
- elseif (defined('LP_HOMEPAGE_CURRENT_VERSION') && version_compare( LP_HOMEPAGE_CURRENT_VERSION, '1.0.8', '<' ))
34
- {
35
$flag = 'Homepage Addon';
36
wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires '.$flag.' version 1.0.8 or greater. <br><br>Please Update Homepage Addon to update & install WordPress Landing Pages</p>' , INBOUDNOW_LABEL ) , __( 'Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN) , array( 'response'=>200, 'back_link'=>TRUE ) );
37
- }
38
- else
39
- {
40
// Activate Plugin
41
// Add Upgraded From Option
42
$current_version = get_option( 'landing_page_version' );
@@ -54,6 +44,12 @@ function landing_page_activate($wp = '3.6', $php = '5.3', $cta = '1.2.1', $leads
54
//$wp_rewrite->flush_rules();
55
}
56
57
do_action('lp_activate_update_db');
58
}
59
7
function landing_page_activate($wp = '3.6', $php = '5.3', $cta = '1.2.1', $leads = '1.2.1')
8
{
9
global $wp_version;
10
+ if ( version_compare( phpversion(), $php, '<' ) ) {
11
$flag = 'PHP';
12
+ $php_version = phpversion();
13
+ $version = 'PHP' == $flag ? $php : $wp;
14
+ wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires '.$flag.' version '.$php.' or greater.</p> Your server is running version '. $php_version . '. Please Contact your hosting provider to update your PHP version. PHP 5.3 came out in December of 2010.' , LANDINGPAGES_TEXT_DOMAIN) , __( 'Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN) , array( 'response'=>200, 'back_link'=>TRUE ) );
15
deactivate_plugins( basename( __FILE__ ) );
16
+ } elseif ( version_compare( $wp_version, $wp, '<' ) ) {
17
$flag = 'WordPress';
18
wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires'.$flag.' version '.$wp.' or greater.</p>' , LANDINGPAGES_TEXT_DOMAIN), __('Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN), array( 'response'=>200, 'back_link'=>TRUE ) );
19
deactivate_plugins( basename( __FILE__ ) );
20
+ } elseif (defined('WP_CTA_CURRENT_VERSION') && version_compare( WP_CTA_CURRENT_VERSION, $cta, '<' )) {
21
$flag = __('WordPress Calls to Action' , LANDINGPAGES_TEXT_DOMAIN);
22
wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires '.$flag.' version '.$cta.' or greater. <br><br>Please Update WordPress Call to Action Plugin to update & install WordPress Landing Pages</p>' , LANDINGPAGES_TEXT_DOMAIN) , __('Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN) , array( 'response'=>200, 'back_link'=>TRUE ) );
23
+ } elseif (defined('WPL_CURRENT_VERSION') && version_compare( WPL_CURRENT_VERSION, $leads, '<' )) {
24
$flag = 'WordPress Leads';
25
wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires '.$flag.' version '.$leads.' or greater. <br><br>Please Update WordPress Leads Plugin to update & install WordPress Landing Pages</p>' , INBOUDNOW_LABEL ) , __( 'Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN) , array( 'response'=>200, 'back_link'=>TRUE ) );
26
+ } elseif (defined('LP_HOMEPAGE_CURRENT_VERSION') && version_compare( LP_HOMEPAGE_CURRENT_VERSION, '1.0.8', '<' )) {
27
$flag = 'Homepage Addon';
28
wp_die( __('<p>The <strong>WordPress Landing Pages</strong> plugin requires '.$flag.' version 1.0.8 or greater. <br><br>Please Update Homepage Addon to update & install WordPress Landing Pages</p>' , INBOUDNOW_LABEL ) , __( 'Plugin Activation Error' , LANDINGPAGES_TEXT_DOMAIN) , array( 'response'=>200, 'back_link'=>TRUE ) );
29
+ } else {
30
// Activate Plugin
31
// Add Upgraded From Option
32
$current_version = get_option( 'landing_page_version' );
44
//$wp_rewrite->flush_rules();
45
}
46
47
+ if (is_plugin_active('leads/wordpress-leads.php')) {
48
+ add_option( 'Leads_Activated', true );
49
+ } else {
50
+ delete_option( 'Leads_Activated');
51
+ }
52
+
53
do_action('lp_activate_update_db');
54
}
55
modules/module.ajax-setup.php CHANGED
@@ -1 +1 @@
1
- <?php
2
* Adds Ajax for Clear Stats button
3
* clear stats for all variations
4
*/
5
* Adds Ajax for Clear Stats button
6
* clear stats for single variations
7
*/
8
* Click tracking moved to module.click-tracking.php
9
* Adds ajax to record landing page impressions
10
* future plans to integrate with google analytics
11
* Adds Ajax Template Selection
12
* @return prints out landing page meta options
13
*/
14
* Add ajax for post meta save options
15
*/
16
17
* Adds Ajax for Clear Stats button
18
* clear stats for all variations
19
*/
20
* Adds Ajax for Clear Stats button
21
* clear stats for single variations
22
*/
23
* Click tracking moved to module.click-tracking.php
24
* Adds ajax to record landing page impressions
25
* future plans to integrate with google analytics
26
* Adds Ajax Template Selection
27
* @return prints out landing page meta options
28
*/
29
* Add ajax for post meta save options
30
*/
1
* Adds Ajax for Clear Stats button
2
* clear stats for all variations
3
*/
4
* Adds Ajax for Clear Stats button
5
* clear stats for single variations
6
*/
7
* Click tracking moved to module.click-tracking.php
8
* Adds ajax to record landing page impressions
9
* future plans to integrate with google analytics
10
* Adds Ajax Template Selection
11
* @return prints out landing page meta options
12
*/
13
* Add ajax for post meta save options
14
*/
15
16
+ <?php
17
* Adds Ajax for Clear Stats button
18
* clear stats for all variations
19
*/
20
* Adds Ajax for Clear Stats button
21
* clear stats for single variations
22
*/
23
* Click tracking moved to module.click-tracking.php
24
* Adds ajax to record landing page impressions
25
* future plans to integrate with google analytics
26
* Adds Ajax Template Selection
27
* @return prints out landing page meta options
28
*/
29
* Add ajax for post meta save options
30
*/
modules/module.global-settings.php CHANGED
@@ -279,13 +279,13 @@ function lp_display_global_settings()
279
<hr>
280
<div id="more-templates">
281
<center>
282
- <a href="http://www.inboundnow.com/landing-pages/downloads/category/templates/" target="_blank"><img src="<?php echo LANDINGPAGES_URLPATH;?>/images/templates-image.png"></a>
283
284
</center>
285
</div>
286
<div id="more-addons">
287
<center>
288
- <a href="http://www.inboundnow.com/landing-pages/downloads/category/add-ons/" target="_blank"><img src="<?php echo LANDINGPAGES_URLPATH;?>/images/add-on-image.png"></a>
289
</center>
290
</div>
291
<div id="custom-templates">
279
<hr>
280
<div id="more-templates">
281
<center>
282
+ <a href="http://www.inboundnow.com/products/landing-pages/templates/" target="_blank"><img src="<?php echo LANDINGPAGES_URLPATH;?>/images/templates-image.png"></a>
283
284
</center>
285
</div>
286
<div id="more-addons">
287
<center>
288
+ <a href="http://www.inboundnow.com/products/landing-pages/extensions/" target="_blank"><img src="<?php echo LANDINGPAGES_URLPATH;?>/images/add-on-image.png"></a>
289
</center>
290
</div>
291
<div id="custom-templates">
modules/module.javascript-admin.php CHANGED
@@ -10,31 +10,27 @@ function lp_admin_enqueue($hook)
10
//enqueue styles and scripts
11
wp_enqueue_style('lp-admin-css', LANDINGPAGES_URLPATH . 'css/admin-style.css');
12
13
- //jquery cookie
14
- wp_dequeue_script('jquery-cookie');
15
- wp_enqueue_script('jquery-cookie', LANDINGPAGES_URLPATH . 'js/jquery.lp.cookie.js');
16
17
// Frontend Editor
18
if ((isset($_GET['page']) == 'lp-frontend-editor')) {
19
// scripts soon
20
}
21
if ((isset($_GET['page']) == 'install-inbound-plugins')) {
22
wp_enqueue_script('inbound-install-plugins', LANDINGPAGES_URLPATH . 'js/admin/admin.install-plugins.js');
23
wp_enqueue_style('inbound-install-plugins-css', LANDINGPAGES_URLPATH . 'css/admin-install-plugins.css');
24
}
25
26
// Store Options Page
27
- if (isset($_GET['page']) && (($_GET['page'] == 'lp_store') || ($_GET['page'] == 'lp_addons')))
28
- {
29
wp_dequeue_script('easyXDM');
30
wp_enqueue_script('easyXDM', LANDINGPAGES_URLPATH . 'js/libraries/easyXDM.debug.js');
31
//wp_enqueue_script('lp-js-store', LANDINGPAGES_URLPATH . 'js/admin/admin.store.js');
32
}
33
34
-
35
-
36
// Admin enqueue - Landing Page CPT only
37
- if ( ( isset($post) && 'landing-page' == $post->post_type ) || ( isset($_GET['post_type']) && $_GET['post_type']=='landing-page' ) )
38
{
39
40
wp_enqueue_script('jpicker', LANDINGPAGES_URLPATH . 'js/libraries/jpicker/jpicker-1.1.6.min.js');
@@ -49,8 +45,7 @@ function lp_admin_enqueue($hook)
49
wp_localize_script( 'lp-admin-clear-stats-ajax-request', 'ajaxadmin', array( 'ajaxurl' => admin_url('admin-ajax.php'), 'lp_clear_nonce' => wp_create_nonce('lp-clear-nonce') ) );
50
51
// Add New and Edit Screens
52
- if ( $hook == 'post-new.php' || $hook == 'post.php' )
53
- {
54
add_filter( 'wp_default_editor', 'lp_ab_testing_force_default_editor' ); // force html view
55
//admin.metaboxes.js - Template Selector - Media Uploader
56
wp_enqueue_script('lp-js-metaboxes', LANDINGPAGES_URLPATH . 'js/admin/admin.metaboxes.js');
@@ -63,8 +58,6 @@ function lp_admin_enqueue($hook)
63
$params = array('selected_template'=>$template, 'templates'=>$template_data);
64
wp_localize_script('lp-js-metaboxes', 'data', $params);
65
66
-
67
-
68
// Conditional TINYMCE for landing pages
69
wp_dequeue_script('jquery-tinymce');
70
wp_enqueue_script('jquery-tinymce', LANDINGPAGES_URLPATH . 'js/libraries/tiny_mce/jquery.tinymce.js');
@@ -76,16 +69,13 @@ function lp_admin_enqueue($hook)
76
wp_enqueue_script('lp-settings-js', LANDINGPAGES_URLPATH . 'js/admin/admin.global-settings.js');
77
}
78
// Edit Screen
79
- if ( $hook == 'post.php' )
80
- {
81
wp_enqueue_script('lp-post-edit-ui', LANDINGPAGES_URLPATH . 'js/admin/admin.post-edit.js');
82
wp_localize_script( 'lp-post-edit-ui', 'lp_post_edit_ui', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'post_id' => $post->ID , 'wp_landing_page_meta_nonce' => wp_create_nonce('wp-landing-page-meta-nonce'), 'lp_template_nonce' => wp_create_nonce('lp-nonce') ) );
83
wp_enqueue_style('admin-post-edit-css', LANDINGPAGES_URLPATH . 'css/admin-post-edit.css');
84
-
85
wp_enqueue_script('jqueryui');
86
// jquery datepicker
87
wp_enqueue_script('jquery-datepicker', LANDINGPAGES_URLPATH . 'js/libraries/jquery-datepicker/jquery.timepicker.min.js');
88
-
89
wp_enqueue_script('jquery-datepicker-base', LANDINGPAGES_URLPATH . 'js/libraries/jquery-datepicker/lib/base.js');
90
wp_enqueue_script('jquery-datepicker-datepair', LANDINGPAGES_URLPATH . 'js/libraries/jquery-datepicker/lib/datepair.js');
91
wp_localize_script( 'jquery-datepicker', 'jquery_datepicker', array( 'thispath' => LANDINGPAGES_URLPATH.'js/libraries/jquery-datepicker/' ));
@@ -101,8 +91,7 @@ function lp_admin_enqueue($hook)
101
}
102
103
// Add New Screen
104
- if ( $hook == 'post-new.php' )
105
- {
106
// Create New Landing Jquery UI
107
wp_enqueue_script('lp-js-create-new-lander', LANDINGPAGES_URLPATH . 'js/admin/admin.post-new.js', array('jquery'), '1.0', true );
108
wp_localize_script( 'lp-js-create-new-lander', 'lp_post_new_ui', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'post_id' => $post->ID , 'wp_landing_page_meta_nonce' => wp_create_nonce('lp_nonce') , 'LANDINGPAGES_URLPATH' => LANDINGPAGES_URLPATH ) );
@@ -110,8 +99,7 @@ function lp_admin_enqueue($hook)
110
}
111
112
// List Screen
113
- if ( $screen->id == 'edit-landing-page' )
114
- {
115
wp_enqueue_script(array('jquery', 'editor', 'thickbox', 'media-upload'));
116
wp_enqueue_script('landing-page-list', LANDINGPAGES_URLPATH . 'js/admin/admin.landing-page-list.js');
117
wp_enqueue_style('landing-page-list-css', LANDINGPAGES_URLPATH.'css/admin-landing-page-list.css');
10
//enqueue styles and scripts
11
wp_enqueue_style('lp-admin-css', LANDINGPAGES_URLPATH . 'css/admin-style.css');
12
13
+ /* Globally used scripts moved to /shared/assets loader */
14
15
// Frontend Editor
16
if ((isset($_GET['page']) == 'lp-frontend-editor')) {
17
// scripts soon
18
}
19
+
20
if ((isset($_GET['page']) == 'install-inbound-plugins')) {
21
wp_enqueue_script('inbound-install-plugins', LANDINGPAGES_URLPATH . 'js/admin/admin.install-plugins.js');
22
wp_enqueue_style('inbound-install-plugins-css', LANDINGPAGES_URLPATH . 'css/admin-install-plugins.css');
23
}
24
25
// Store Options Page
26
+ if (isset($_GET['page']) && (($_GET['page'] == 'lp_store') || ($_GET['page'] == 'lp_addons'))) {
27
wp_dequeue_script('easyXDM');
28
wp_enqueue_script('easyXDM', LANDINGPAGES_URLPATH . 'js/libraries/easyXDM.debug.js');
29
//wp_enqueue_script('lp-js-store', LANDINGPAGES_URLPATH . 'js/admin/admin.store.js');
30
}
31
32
// Admin enqueue - Landing Page CPT only
33
+ if (( isset($post) && 'landing-page' == $post->post_type ) || ( isset($_GET['post_type']) && $_GET['post_type']=='landing-page' ))
34
{
35
36
wp_enqueue_script('jpicker', LANDINGPAGES_URLPATH . 'js/libraries/jpicker/jpicker-1.1.6.min.js');
45
wp_localize_script( 'lp-admin-clear-stats-ajax-request', 'ajaxadmin', array( 'ajaxurl' => admin_url('admin-ajax.php'), 'lp_clear_nonce' => wp_create_nonce('lp-clear-nonce') ) );
46
47
// Add New and Edit Screens
48
+ if ( $hook == 'post-new.php' || $hook == 'post.php' ) {
49
add_filter( 'wp_default_editor', 'lp_ab_testing_force_default_editor' ); // force html view
50
//admin.metaboxes.js - Template Selector - Media Uploader
51
wp_enqueue_script('lp-js-metaboxes', LANDINGPAGES_URLPATH . 'js/admin/admin.metaboxes.js');
58
$params = array('selected_template'=>$template, 'templates'=>$template_data);
59
wp_localize_script('lp-js-metaboxes', 'data', $params);
60
61
// Conditional TINYMCE for landing pages
62
wp_dequeue_script('jquery-tinymce');
63
wp_enqueue_script('jquery-tinymce', LANDINGPAGES_URLPATH . 'js/libraries/tiny_mce/jquery.tinymce.js');
69
wp_enqueue_script('lp-settings-js', LANDINGPAGES_URLPATH . 'js/admin/admin.global-settings.js');
70
}
71
// Edit Screen
72
+ if ( $hook == 'post.php' ){
73
wp_enqueue_script('lp-post-edit-ui', LANDINGPAGES_URLPATH . 'js/admin/admin.post-edit.js');
74
wp_localize_script( 'lp-post-edit-ui', 'lp_post_edit_ui', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'post_id' => $post->ID , 'wp_landing_page_meta_nonce' => wp_create_nonce('wp-landing-page-meta-nonce'), 'lp_template_nonce' => wp_create_nonce('lp-nonce') ) );
75
wp_enqueue_style('admin-post-edit-css', LANDINGPAGES_URLPATH . 'css/admin-post-edit.css');
76
wp_enqueue_script('jqueryui');
77
// jquery datepicker
78
wp_enqueue_script('jquery-datepicker', LANDINGPAGES_URLPATH . 'js/libraries/jquery-datepicker/jquery.timepicker.min.js');
79
wp_enqueue_script('jquery-datepicker-base', LANDINGPAGES_URLPATH . 'js/libraries/jquery-datepicker/lib/base.js');
80
wp_enqueue_script('jquery-datepicker-datepair', LANDINGPAGES_URLPATH . 'js/libraries/jquery-datepicker/lib/datepair.js');
81
wp_localize_script( 'jquery-datepicker', 'jquery_datepicker', array( 'thispath' => LANDINGPAGES_URLPATH.'js/libraries/jquery-datepicker/' ));
91
}
92
93
// Add New Screen
94
+ if ( $hook == 'post-new.php' ) {
95
// Create New Landing Jquery UI
96
wp_enqueue_script('lp-js-create-new-lander', LANDINGPAGES_URLPATH . 'js/admin/admin.post-new.js', array('jquery'), '1.0', true );
97
wp_localize_script( 'lp-js-create-new-lander', 'lp_post_new_ui', array( 'ajaxurl' => admin_url( 'admin-ajax.php' ), 'post_id' => $post->ID , 'wp_landing_page_meta_nonce' => wp_create_nonce('lp_nonce') , 'LANDINGPAGES_URLPATH' => LANDINGPAGES_URLPATH ) );
99
}
100
101
// List Screen
102
+ if ( $screen->id == 'edit-landing-page' ) {
103
wp_enqueue_script(array('jquery', 'editor', 'thickbox', 'media-upload'));
104
wp_enqueue_script('landing-page-list', LANDINGPAGES_URLPATH . 'js/admin/admin.landing-page-list.js');
105
wp_enqueue_style('landing-page-list-css', LANDINGPAGES_URLPATH.'css/admin-landing-page-list.css');
modules/module.javascript-frontend.php CHANGED
@@ -2,88 +2,31 @@
2
3
add_action('wp_enqueue_scripts','lp_fontend_enqueue_scripts');
4
5
- function lp_fontend_enqueue_scripts($hook)
6
- {
7
global $post;
8
9
if (!isset($post))
10
return;
11
12
$post_type = $post->post_type;
13
- $post_id = $post->ID;
14
- (isset($_SERVER['REMOTE_ADDR'])) ? $ip_address = $_SERVER['REMOTE_ADDR'] : $ip_address = '0.0.0.0.0';
15
- $current_page = "http://".$_SERVER["HTTP_HOST"].$_SERVER["REQUEST_URI"];
16
-
17
wp_enqueue_script('jquery');
18
19
- // jquery cookie
20
- wp_dequeue_script('jquery-cookie');
21
- wp_enqueue_script('jquery-cookie', LANDINGPAGES_URLPATH . 'js/jquery.lp.cookie.js', array( 'jquery' ));
22
-
23
- // load local storage script
24
- wp_register_script('jquery-total-storage',LANDINGPAGES_URLPATH . 'js/jquery.total-storage.min.js', array( 'jquery' ));
25
- wp_enqueue_script('jquery-total-storage');
26
-
27
- // Load funnel tracking. Force Leads to load its version if active
28
- if ($post_type!=='wp-call-to-action')
29
- {
30
- /* Global Lead Data */
31
- $lead_cpt_id = (isset($_COOKIE['wp_lead_id'])) ? $_COOKIE['wp_lead_id'] : false;
32
- $lead_email = (isset($_COOKIE['wp_lead_email'])) ? $_COOKIE['wp_lead_email'] : false;
33
- $lead_unique_key = (isset($_COOKIE['wp_lead_uid'])) ? $_COOKIE['wp_lead_uid'] : false;
34
- $lead_data_array = array();
35
- if ($lead_cpt_id) {
36
- $lead_data_array['lead_id'] = $lead_cpt_id;
37
- $type = 'wplid';}
38
- if ($lead_email) {
39
- $lead_data_array['lead_email'] = $lead_email;
40
- $type = 'wplemail';}
41
- if ($lead_unique_key) {
42
- $lead_data_array['lead_uid'] = $lead_unique_key;
43
- $type = 'wpluid';
44
- }
45
- wp_register_script('funnel-tracking',LANDINGPAGES_URLPATH . 'shared/tracking/page-tracking.js', array( 'jquery', 'jquery-cookie'));
46
- wp_enqueue_script('funnel-tracking');
47
- $time = current_time( 'timestamp', 0 ); // Current wordpress time from settings
48
- $wordpress_date_time = date("Y-m-d G:i:s T", $time);
49
- wp_localize_script( 'funnel-tracking' , 'wplft', array( 'post_id' => $post_id, 'ip_address' => $ip_address, 'wp_lead_data' => $lead_data_array, 'admin_url' => admin_url( 'admin-ajax.php' ), 'track_time' => $wordpress_date_time));
50
- /* End Global Lead Data */
51
- }
52
-
53
- if (isset($post)&&$post->post_type=='landing-page')
54
- {
55
-
56
-
57
- // Shared Core Inbound Scripts
58
- if (@function_exists('wpleads_check_active'))
59
- {
60
- wp_enqueue_script( 'store-lead-ajax', WPL_URL . '/shared/tracking/js/store.lead.ajax.js', array( 'jquery','jquery-cookie', 'funnel-tracking'));
61
- }
62
- else
63
- {
64
- wp_enqueue_script( 'store-lead-ajax', LANDINGPAGES_URLPATH .'shared/tracking/js/store.lead.ajax.js', array( 'jquery','jquery-cookie'));
65
- }
66
- wp_localize_script( 'store-lead-ajax' , 'inbound_ajax', array( 'admin_url' => admin_url( 'admin-ajax.php' ), 'post_id' => $post_id, 'post_type' => $post_type));
67
-
68
- $variation = (isset($_GET['lp-variation-id'])) ? $_GET['lp-variation-id'] : '0';
69
- wp_enqueue_script( 'landing-page-view-track' , LANDINGPAGES_URLPATH . 'js/page_view_track.js', array( 'jquery','jquery-cookie'));
70
- wp_localize_script( 'landing-page-view-track' , 'landing_path_info', array( 'variation' => $variation, 'admin_url' => admin_url( 'admin-ajax.php' )));
71
-
72
- $form_prepopulation = get_option( 'lp-main-landing-page-prepopulate-forms' , 1);
73
-
74
- // load form pre-population script
75
- if ($form_prepopulation)
76
- {
77
- wp_register_script('form-population',LANDINGPAGES_URLPATH . 'js/jquery.form-population.js', array( 'jquery', 'jquery-cookie' ));
78
- wp_enqueue_script('form-population');
79
- }
80
81
82
83
84
if (isset($_GET['template-customize']) &&$_GET['template-customize']=='on') {
85
- // wp_register_script('lp-customizer-load-js', LANDINGPAGES_URLPATH . 'js/customizer.load.js', array('jquery'));
86
- // wp_enqueue_script('lp-customizer-load-js');
87
echo "<style type='text/css'>#variation-list{background:#eaeaea !important; top: 26px !important; height: 35px !important;padding-top: 10px !important;}#wpadminbar {height: 29px !important;}</style>"; // enqueue styles not firing
88
}
89
if (isset($_GET['live-preview-area'])) {
@@ -91,7 +34,7 @@ function lp_fontend_enqueue_scripts($hook)
91
wp_register_script('lp-customizer-load-js', LANDINGPAGES_URLPATH . 'js/customizer.load.js', array('jquery'));
92
wp_enqueue_script('lp-customizer-load-js');
93
// wp_enqueue_style('lp-customizer-load-css', LANDINGPAGES_URLPATH . 'css/customizer-load.css'); doesn't work
94
- /* Almost working
95
define("QUICK_CACHE_ALLOWED", false);
96
define("DONOTCACHEPAGE", true);
97
define('DONOTCACHCEOBJECT', true);
@@ -154,20 +97,25 @@ function lp_fontend_enqueue_scripts($hook)
154
155
}
156
157
-
158
/* CLEAN URL OF VARIATION GET TAGS */
159
add_action('wp_head', 'lp_header_load');
160
function lp_header_load(){
161
global $post;
162
- if (isset($post)&&$post->post_type=='landing-page')
163
- {
164
wp_enqueue_style('inbound-wordpress-base', LANDINGPAGES_URLPATH . 'css/frontend/global-landing-page-style.css');
165
wp_enqueue_style('inbound-shortcodes', INBOUND_FORMS.'css/frontend-render.css');
166
- if (isset($_GET['lp-variation-id']) && !isset($_GET['template-customize']) && !isset($_GET['iframe_window']) && !isset($_GET['live-preview-area'])) { ?>
167
<script type="text/javascript">
168
- if (typeof window.history.pushState == 'function') {
169
- var current=window.location.href;var cleanparams=current.split("?");var clean_url=cleanparams[0];history.replaceState({},"landing page",clean_url);
170
- //console.log("push state supported.");
171
}</script>
172
<?php }
173
}
2
3
add_action('wp_enqueue_scripts','lp_fontend_enqueue_scripts');
4
5
+ function lp_fontend_enqueue_scripts($hook) {
6
global $post;
7
8
if (!isset($post))
9
return;
10
11
$post_type = $post->post_type;
12
wp_enqueue_script('jquery');
13
14
+ /* Globally used scripts moved to /shared/assets loader */
15
16
+ if (isset($post)&&$post->post_type=='landing-page') {
17
18
+ $variation = (isset($_GET['lp-variation-id'])) ? $_GET['lp-variation-id'] : '0';
19
+ wp_enqueue_script( 'landing-page-view-track' , LANDINGPAGES_URLPATH . 'js/page_view_track.js', array( 'jquery','jquery-cookie'));
20
+ wp_localize_script( 'landing-page-view-track' , 'landing_path_info', array( 'variation' => $variation, 'admin_url' => admin_url( 'admin-ajax.php' )));
21
22
+ $form_prepopulation = get_option( 'lp-main-landing-page-prepopulate-forms' , 1);
23
+ // load form pre-population script
24
+ if ($form_prepopulation) {
25
+ wp_register_script('form-population',LANDINGPAGES_URLPATH . 'js/jquery.form-population.js', array( 'jquery', 'jquery-cookie' ));
26
+ wp_enqueue_script('form-population');
27
+ }
28
29
if (isset($_GET['template-customize']) &&$_GET['template-customize']=='on') {
30
echo "<style type='text/css'>#variation-list{background:#eaeaea !important; top: 26px !important; height: 35px !important;padding-top: 10px !important;}#wpadminbar {height: 29px !important;}</style>"; // enqueue styles not firing
31
}
32
if (isset($_GET['live-preview-area'])) {
34
wp_register_script('lp-customizer-load-js', LANDINGPAGES_URLPATH . 'js/customizer.load.js', array('jquery'));
35
wp_enqueue_script('lp-customizer-load-js');
36
// wp_enqueue_style('lp-customizer-load-css', LANDINGPAGES_URLPATH . 'css/customizer-load.css'); doesn't work
37
+ /* Almost working look into this again TODO
38
define("QUICK_CACHE_ALLOWED", false);
39
define("DONOTCACHEPAGE", true);
40
define('DONOTCACHCEOBJECT', true);
97
98
}
99
100
/* CLEAN URL OF VARIATION GET TAGS */
101
add_action('wp_head', 'lp_header_load');
102
function lp_header_load(){
103
global $post;
104
+ if (isset($post) && $post->post_type=='landing-page') {
105
wp_enqueue_style('inbound-wordpress-base', LANDINGPAGES_URLPATH . 'css/frontend/global-landing-page-style.css');
106
wp_enqueue_style('inbound-shortcodes', INBOUND_FORMS.'css/frontend-render.css');
107
+ if (isset($_GET['lp-variation-id']) && !isset($_GET['template-customize']) && !isset($_GET['iframe_window']) && !isset($_GET['live-preview-area'])) {
108
+ do_action('landing_page_header_script');
109
+ ?>
110
<script type="text/javascript">
111
+ //var inbound_param_overide = 'off';
112
+ // Automation pass params to GA. Look for documentation
113
+ if (typeof (inbound_param_overide) === "undefined" || inbound_param_overide === null || inbound_param_overide === "") {
114
+ var inbound_param_overide = 'on';
115
+ }
116
+ var inbound_show_params = inbound_param_overide || true;
117
+ if (typeof window.history.pushState == 'function' && inbound_show_params != 'off') {
118
+ var current=window.location.href;var cleanparams=current.split("?");var clean_url=cleanparams[0];history.replaceState({},"landing page",clean_url);
119
}</script>
120
<?php }
121
}
modules/module.metaboxes.php CHANGED
@@ -348,7 +348,7 @@ function lp_display_meta_box_select_template_container() {
348
}
349
$demo_link = (isset($data['info']['demo'])) ? $data['info']['demo'] : '';
350
?>
351
- <div id='template-item' class="<?php echo $cat_slug; ?>">
352
<div id="template-box">
353
<div class="lp_tooltip_templates" title="<?php echo $data['info']['description']; ?>"></div>
354
<a class='lp_select_template' href='#' label='<?php echo $data['info']['label']; ?>' id='<?php echo $this_extension; ?>'>
348
}
349
$demo_link = (isset($data['info']['demo'])) ? $data['info']['demo'] : '';
350
?>
351
+ <div id='template-item' class="<?php echo $cat_slug; ?> template-item-boxes">
352
<div id="template-box">
353
<div class="lp_tooltip_templates" title="<?php echo $data['info']['description']; ?>"></div>
354
<a class='lp_select_template' href='#' label='<?php echo $data['info']['label']; ?>' id='<?php echo $this_extension; ?>'>
modules/module.post-type.php CHANGED
@@ -1,12 +1,10 @@
1
<?php
2
3
add_action('admin_init', 'lp_rebuild_permalinks');
4
- function lp_rebuild_permalinks()
5
- {
6
$activation_check = get_option('lp_activate_rewrite_check',0);
7
8
- if ($activation_check)
9
- {
10
global $wp_rewrite;
11
$wp_rewrite->flush_rules();
12
update_option( 'lp_activate_rewrite_check', '0');
@@ -88,8 +86,7 @@ function lp_change_excerpt_to_summary() {
88
89
/* This piece is for the customizer? I'm not sure - H */
90
add_filter('admin_url','lp_add_fullscreen_param');
91
- function lp_add_fullscreen_param( $link )
92
- {
93
if (isset($_GET['page']))
94
return $link;
95
@@ -110,8 +107,7 @@ function lp_add_fullscreen_param( $link )
110
}
111
112
/*********PREPARE COLUMNS FOR IMPRESSIONS AND CONVERSIONS***************/
113
- if (is_admin())
114
- {
115
116
//include_once(LANDINGPAGES_PATH.'filters/filters.post-type.php');
117
@@ -491,39 +487,7 @@ if (is_admin())
491
492
}
493
494
- if (!post_type_exists('wp-lead'))
495
- {
496
- add_action('init', 'lp_wpleads_register');
497
- function lp_wpleads_register() {
498
- //echo $slug;exit;
499
- $labels = array(
500
- 'name' => _x('Leads', 'post type general name'),
501
- 'singular_name' => _x('Lead', 'post type singular name' , LANDINGPAGES_TEXT_DOMAIN),
502
- 'add_new' => _x('Add New', 'Lead' , LANDINGPAGES_TEXT_DOMAIN),
503
- 'add_new_item' => __('Add New Lead' , LANDINGPAGES_TEXT_DOMAIN),
504
- 'edit_item' => __('Edit Lead' , LANDINGPAGES_TEXT_DOMAIN),
505
- 'new_item' => __('New Leads' , LANDINGPAGES_TEXT_DOMAIN),
506
- 'view_item' => __('View Leads' , LANDINGPAGES_TEXT_DOMAIN),
507
- 'search_items' => __('Search Leads' , LANDINGPAGES_TEXT_DOMAIN),
508
- 'not_found' => __('Nothing found' , LANDINGPAGES_TEXT_DOMAIN),
509
- 'not_found_in_trash' => __('Nothing found in Trash' , LANDINGPAGES_TEXT_DOMAIN),
510
- 'parent_item_colon' => ''
511
- );
512
-
513
- $args = array(
514
- 'labels' => $labels,
515
- 'public' => false,
516
- 'publicly_queryable' => false,
517
- 'show_ui' => false,
518
- 'query_var' => true,
519
- 'capability_type' => 'post',
520
- 'hierarchical' => false,
521
- 'menu_position' => null,
522
- 'supports' => array('custom-fields','thumbnail')
523
- );
524
-
525
- register_post_type( 'wp-lead' , $args );
526
- //flush_rewrite_rules( false );
527
-
528
- }
529
}
1
<?php
2
3
add_action('admin_init', 'lp_rebuild_permalinks');
4
+ function lp_rebuild_permalinks() {
5
$activation_check = get_option('lp_activate_rewrite_check',0);
6
7
+ if ($activation_check) {
8
global $wp_rewrite;
9
$wp_rewrite->flush_rules();
10
update_option( 'lp_activate_rewrite_check', '0');
86
87
/* This piece is for the customizer? I'm not sure - H */
88
add_filter('admin_url','lp_add_fullscreen_param');
89
+ function lp_add_fullscreen_param( $link ) {
90
if (isset($_GET['page']))
91
return $link;
92
107
}
108
109
/*********PREPARE COLUMNS FOR IMPRESSIONS AND CONVERSIONS***************/
110
+ if (is_admin()) {
111
112
//include_once(LANDINGPAGES_PATH.'filters/filters.post-type.php');
113
487
488
}
489
490
+ if (!post_type_exists('wp-lead')) {
491
+ //add_action('plugins_loaded', 'inbound_leads_register');
492
+ // moved to /shared/functions/lead.cpt.php
493
}
modules/module.redirect-ab-testing.php CHANGED
@@ -62,10 +62,16 @@ else
62
{
63
$variation_status = get_post_meta( $pid , 'lp_ab_variation_status-'.$vid , true );
64
}
65
- //echo "Status:".$variation_status."ID".$vid;
66
- //echo "<br>";
67
if (!is_numeric($variation_status)||$variation_status==1)
68
$live_variations[] = $vid;
69
}
70
71
$keys_as_values = array_flip($live_variations);
62
{
63
$variation_status = get_post_meta( $pid , 'lp_ab_variation_status-'.$vid , true );
64
}
65
+
66
if (!is_numeric($variation_status)||$variation_status==1)
67
+ {
68
$live_variations[] = $vid;
69
+ }
70
+ }
71
+
72
+ if (!$live_variations)
73
+ {
74
+ $live_variations[] = 0;
75
}
76
77
$keys_as_values = array_flip($live_variations);
modules/module.templates.php CHANGED
@@ -76,7 +76,7 @@ else if (isset($_GET['page'])&&$_GET['page']=='lp_manage_templates')
76
( array_key_exists('info',$data) ) ? $this_data['description'] = $data['info']['description'] : $this_data['description'] = $data['description'];
77
78
$this_data['thumbnail'] = $thumbnail;
79
- if (isset($data['version'])&&!empty($data['info']['version']))
80
{
81
$this_data['version'] = $data['info']['version'];
82
}
76
( array_key_exists('info',$data) ) ? $this_data['description'] = $data['info']['description'] : $this_data['description'] = $data['description'];
77
78
$this_data['thumbnail'] = $thumbnail;
79
+ if (isset($data['info']['version'])&&!empty($data['info']['version']))
80
{
81
$this_data['version'] = $data['info']['version'];
82
}
modules/module.track.php CHANGED
@@ -1 +1 @@
1
- <?php
2
$count_key = 'lp_page_views_count';
3
$count = get_post_meta($postID, $count_key, true);
4
if($count==''){
5
delete_post_meta($postID, $count_key);
6
add_post_meta($postID, $count_key, '0');
7
return;
8
}
9
return $count;
10
$count_key = 'lp_page_views_count';
11
$count = get_post_meta($postID, $count_key, true);
12
if($count==''){
13
$count = 0;
14
delete_post_meta($postID, $count_key);
15
add_post_meta($postID, $count_key, '0');
16
}else{
17
$count++;
18
update_post_meta($postID, $count_key, $count);
19
}
20
$count_key = 'lp_page_conversions_count';
21
$count = get_post_meta($postID, $count_key, true);
22
if($count==''){
23
delete_post_meta($postID, $count_key);
24
add_post_meta($postID, $count_key, '0');
25
return "0";
26
}
27
return $count;
28
$count_key = 'lp_page_conversions_count';
29
$count = get_post_meta($postID, $count_key, true);
30
if($count==''){
31
$count = 0;
32
delete_post_meta($postID, $count_key);
33
add_post_meta($postID, $count_key, '0');
34
}else{
35
$count++;
36
update_post_meta($postID, $count_key, $count);
37
}
38
$count_key = 'lp_page_views_count';
39
$count = get_post_meta($postID, $count_key, true);
40
if($count==''){
41
delete_post_meta($postID, $count_key);
42
add_post_meta($postID, $count_key, '0');
43
return;
44
}
45
return $count;
46
$count_key = 'lp_page_views_count';
47
$count = get_post_meta($postID, $count_key, true);
48
if($count==''){
49
$count = 0;
50
delete_post_meta($postID, $count_key);
51
add_post_meta($postID, $count_key, '0');
52
}else{
53
$count++;
54
update_post_meta($postID, $count_key, $count);
55
}
56
$count_key = 'lp_page_conversions_count';
57
$count = get_post_meta($postID, $count_key, true);
58
if($count==''){
59
delete_post_meta($postID, $count_key);
60
add_post_meta($postID, $count_key, '0');
61
return "0";
62
}
63
return $count;
64
$count_key = 'lp_page_conversions_count';
65
$count = get_post_meta($postID, $count_key, true);
66
if($count==''){
67
$count = 0;
68
delete_post_meta($postID, $count_key);
69
add_post_meta($postID, $count_key, '0');
70
}else{
71
$count++;
72
update_post_meta($postID, $count_key, $count);
73
}
1
$count_key = 'lp_page_views_count';
2
$count = get_post_meta($postID, $count_key, true);
3
if($count==''){
4
delete_post_meta($postID, $count_key);
5
add_post_meta($postID, $count_key, '0');
6
return;
7
}
8
return $count;
9
$count_key = 'lp_page_views_count';
10
$count = get_post_meta($postID, $count_key, true);
11
if($count==''){
12
$count = 0;
13
delete_post_meta($postID, $count_key);
14
add_post_meta($postID, $count_key, '0');
15
}else{
16
$count++;
17
update_post_meta($postID, $count_key, $count);
18
}
19
$count_key = 'lp_page_conversions_count';
20
$count = get_post_meta($postID, $count_key, true);
21
if($count==''){
22
delete_post_meta($postID, $count_key);
23
add_post_meta($postID, $count_key, '0');
24
return "0";
25
}
26
return $count;
27
$count_key = 'lp_page_conversions_count';
28
$count = get_post_meta($postID, $count_key, true);
29
if($count==''){
30
$count = 0;
31
delete_post_meta($postID, $count_key);
32
add_post_meta($postID, $count_key, '0');
33
}else{
34
$count++;
35
update_post_meta($postID, $count_key, $count);
36
}
37
+ <?php
38
$count_key = 'lp_page_views_count';
39
$count = get_post_meta($postID, $count_key, true);
40
if($count==''){
41
delete_post_meta($postID, $count_key);
42
add_post_meta($postID, $count_key, '0');
43
return;
44
}
45
return $count;
46
$count_key = 'lp_page_views_count';
47
$count = get_post_meta($postID, $count_key, true);
48
if($count==''){
49
$count = 0;
50
delete_post_meta($postID, $count_key);
51
add_post_meta($postID, $count_key, '0');
52
}else{
53
$count++;
54
update_post_meta($postID, $count_key, $count);
55
}
56
$count_key = 'lp_page_conversions_count';
57
$count = get_post_meta($postID, $count_key, true);
58
if($count==''){
59
delete_post_meta($postID, $count_key);
60
add_post_meta($postID, $count_key, '0');
61
return "0";
62
}
63
return $count;
64
$count_key = 'lp_page_conversions_count';
65
$count = get_post_meta($postID, $count_key, true);
66
if($count==''){
67
$count = 0;
68
delete_post_meta($postID, $count_key);
69
add_post_meta($postID, $count_key, '0');
70
}else{
71
$count++;
72
update_post_meta($postID, $count_key, $count);
73
}
modules/module.track.php.orig ADDED
@@ -0,0 +1 @@
0
$count_key = 'lp_page_views_count';
1
$count = get_post_meta($postID, $count_key, true);
2
if($count==''){
3
delete_post_meta($postID, $count_key);
4
add_post_meta($postID, $count_key, '0');
5
return;
6
}
7
return $count;
8
$count_key = 'lp_page_views_count';
9
$count = get_post_meta($postID, $count_key, true);
10
if($count==''){
11
$count = 0;
12
delete_post_meta($postID, $count_key);
13
add_post_meta($postID, $count_key, '0');
14
}else{
15
$count++;
16
update_post_meta($postID, $count_key, $count);
17
}
18
$count_key = 'lp_page_conversions_count';
19
$count = get_post_meta($postID, $count_key, true);
20
if($count==''){
21
delete_post_meta($postID, $count_key);
22
add_post_meta($postID, $count_key, '0');
23
return "0";
24
}
25
return $count;
26
$count_key = 'lp_page_conversions_count';
27
$count = get_post_meta($postID, $count_key, true);
28
if($count==''){
29
$count = 0;
30
delete_post_meta($postID, $count_key);
31
add_post_meta($postID, $count_key, '0');
32
}else{
33
$count++;
34
update_post_meta($postID, $count_key, $count);
35
}
1
+ <?php
2
$count_key = 'lp_page_views_count';
3
$count = get_post_meta($postID, $count_key, true);
4
if($count==''){
5
delete_post_meta($postID, $count_key);
6
add_post_meta($postID, $count_key, '0');
7
return;
8
}
9
return $count;
10
$count_key = 'lp_page_views_count';
11
$count = get_post_meta($postID, $count_key, true);
12
if($count==''){
13
$count = 0;
14
delete_post_meta($postID, $count_key);
15
add_post_meta($postID, $count_key, '0');
16
}else{
17
$count++;
18
update_post_meta($postID, $count_key, $count);
19
}
20
$count_key = 'lp_page_conversions_count';
21
$count = get_post_meta($postID, $count_key, true);
22
if($count==''){
23
delete_post_meta($postID, $count_key);
24
add_post_meta($postID, $count_key, '0');
25
return "0";
26
}
27
return $count;
28
$count_key = 'lp_page_conversions_count';
29
$count = get_post_meta($postID, $count_key, true);
30
if($count==''){
31
$count = 0;
32
delete_post_meta($postID, $count_key);
33
add_post_meta($postID, $count_key, '0');
34
}else{
35
$count++;
36
update_post_meta($postID, $count_key, $count);
37
}
modules/module.utils.php CHANGED
@@ -127,20 +127,20 @@ function landingpage_fix_known_wp_title_isses() {
127
remove_filter( 'wp_title', 'genesis_doctitle_wrap' , 20 );
128
remove_filter( 'wp_title', 'genesis_default_title' , 10 );
129
}
130
-
131
-
132
- // Fix SEO Title Tags to not use the_title
133
- //add_action('wp','landingpage_seo_title_filters');
134
- function landingpage_seo_title_filters() {
135
-
136
- global $wp_filter;
137
- global $wp;
138
- print_r($wp);exit;
139
- if (strstr())
140
- {
141
- add_filter('wp_title', 'lp_fix_seo_title', 100);
142
- }
143
}
144
145
function lp_fix_seo_title()
146
{
@@ -183,30 +183,42 @@ function lp_wp_nav_menu_args( $args = '' )
183
///////// Remove all base css from the current active wordpress theme in landing pages
184
//currently removes all css from wp_head and re-enqueues the admin bar css.
185
add_action('wp_print_styles', 'lp_remove_all_styles', 100);
186
- function lp_remove_all_styles()
187
- {
188
- if (!is_admin())
189
- {
190
- if ( 'landing-page' == get_post_type() )
191
- {
192
global $post;
193
$template = get_post_meta($post->ID, 'lp-selected-template', true);
194
195
- if (strstr($template,'-slash-'))
196
- {
197
$template = str_replace('-slash-','/',$template);
198
}
199
200
$my_theme = wp_get_theme($template);
201
202
- if ($my_theme->exists()||$template=='default')
203
- {
204
return;
205
- }
206
- else
207
- {
208
global $wp_styles;
209
- $wp_styles->queue = array('');
210
//wp_register_style( 'admin-bar' );
211
wp_enqueue_style( 'admin-bar' );
212
}
127
remove_filter( 'wp_title', 'genesis_doctitle_wrap' , 20 );
128
remove_filter( 'wp_title', 'genesis_default_title' , 10 );
129
}
130
+ // Fix qtranslate issues
131
+ if (!function_exists('inbound_qtrans_disable')) {
132
+ function inbound_qtrans_disable() {
133
+ global $typenow, $pagenow;
134
+
135
+ if (in_array($typenow, array('landing-page'||'wp-call-to-action')) && // post_types where qTranslate should be disabled
136
+ in_array($pagenow, array('post-new.php', 'post.php'))) {
137
+ remove_action('admin_head', 'qtrans_adminHeader');
138
+ remove_filter('admin_footer', 'qtrans_modifyExcerpt');
139
+ remove_filter('the_editor', 'qtrans_modifyRichEditor');
140
+ }
141
+ }
142
}
143
+ add_action('current_screen', 'inbound_qtrans_disable');
144
145
function lp_fix_seo_title()
146
{
183
///////// Remove all base css from the current active wordpress theme in landing pages
184
//currently removes all css from wp_head and re-enqueues the admin bar css.
185
add_action('wp_print_styles', 'lp_remove_all_styles', 100);
186
+ function lp_remove_all_styles() {
187
+ if (!is_admin()) {
188
+ if ( 'landing-page' == get_post_type() ) {
189
global $post;
190
$template = get_post_meta($post->ID, 'lp-selected-template', true);
191
192
+ if (strstr($template,'-slash-')) {
193
$template = str_replace('-slash-','/',$template);
194
}
195
196
$my_theme = wp_get_theme($template);
197
198
+ if ($my_theme->exists()||$template=='default') {
199
return;
200
+ } else {
201
global $wp_styles;
202
+ //print_r($wp_styles);
203
+ $registered_scripts = $wp_styles->registered;
204
+ $inbound_white_list = array();
205
+ foreach ($registered_scripts as $handle) {
206
+ if(preg_match("/\/plugins\/leads\//", $handle->src)) {
207
+ //echo $handle->handle;
208
+ $inbound_white_list[] = $handle->handle;
209
+ }
210
+ if(preg_match("/\/plugins\/cta\//", $handle->src)) {
211
+ //echo $handle->handle;
212
+ $inbound_white_list[]= $handle->handle;
213
+ }
214
+ if(preg_match("/\/plugins\/landing-pages\//", $handle->src)) {
215
+ //echo $handle->handle;
216
+ $inbound_white_list[]= $handle->handle;
217
+ }
218
+ }
219
+ //print_r($inbound_white_list);
220
+ $wp_styles->queue = $inbound_white_list;
221
+ //$wp_styles->queue = array(''); // removes all styles
222
//wp_register_style( 'admin-bar' );
223
wp_enqueue_style( 'admin-bar' );
224
}
modules/module.welcome.php CHANGED
@@ -14,13 +14,13 @@
14
if ( ! defined( 'ABSPATH' ) ) exit;
15
16
/**
17
- * LANDINGPAGES_Welcome Class
18
*
19
* A general class for About and Credits page.
20
*
21
* @since 1.4
22
*/
23
- class LANDINGPAGES_Welcome {
24
25
/**
26
* @var string The capability users should have to view the page
@@ -614,4 +614,4 @@ class LANDINGPAGES_Welcome {
614
wp_safe_redirect( admin_url( 'index.php?page=lp-quick-start' ) ); exit;
615
}
616
}
617
- new LANDINGPAGES_Welcome();
14
if ( ! defined( 'ABSPATH' ) ) exit;
15
16
/**
17
+ * LandingPages_Welcome Class
18
*
19
* A general class for About and Credits page.
20
*
21
* @since 1.4
22
*/
23
+ class LandingPages_Welcome {
24
25
/**
26
* @var string The capability users should have to view the page
614
wp_safe_redirect( admin_url( 'index.php?page=lp-quick-start' ) ); exit;
615
}
616
}
617
+ new LandingPages_Welcome();
modules/module.widgets.php CHANGED
@@ -4,17 +4,17 @@ add_action( 'widgets_init', 'lp_load_widgets' );
4
5
function lp_load_widgets() {
6
7
- register_widget( 'lp_conversion_area_widget' );
8
9
}
10
11
- class lp_conversion_area_widget extends WP_Widget
12
{
13
14
- function lp_conversion_area_widget() {
15
16
/* Widget settings. */
17
- $widget_ops = array( 'classname' => 'class_lp_conversion_area_widget', 'description' => __('Use this widget on your landing page sidebar. This sidebar replaces the normal sidebar while using your default theme as a template, or other inactive themes as landing page templates.', LANDINGPAGES_TEXT_DOMAIN) );
18
19
/* Widget control settings. */
20
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'id_lp_conversion_area_widget' );
4
5
function lp_load_widgets() {
6
7
+ register_widget( 'LandingPages_Widget_ConversionArea' );
8
9
}
10
11
+ class LandingPages_Widget_ConversionArea extends WP_Widget
12
{
13
14
+ function LandingPages_Widget_ConversionArea() {
15
16
/* Widget settings. */
17
+ $widget_ops = array( 'classname' => 'class_LandingPages_Widget_ConversionArea', 'description' => __('Use this widget on your landing page sidebar. This sidebar replaces the normal sidebar while using your default theme as a template, or other inactive themes as landing page templates.', LANDINGPAGES_TEXT_DOMAIN) );
18
19
/* Widget control settings. */
20
$control_ops = array( 'width' => 300, 'height' => 350, 'id_base' => 'id_lp_conversion_area_widget' );
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.7
9
Tested up to: 3.8
10
- Stable Tag: 1.4.7
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
@@ -58,7 +58,7 @@ The plugin is also fully extendable and has a number of <a href='http://docs.inb
58
59
== Frequently Asked Questions ==
60
*Can I create my own landing page designs?,
61
- *Yes! You can learn how to <a href="http://docs.inboundnow.com/landing-pages/dev/creating-templates">create your own landing page template here</a>.
62
63
== Screenshots ==
64
@@ -68,6 +68,20 @@ The plugin is also fully extendable and has a number of <a href='http://docs.inb
68
4. Choose from a ton of pre-made templates, use your existing design, or design your own theme!
69
70
== Changelog ==
71
= 1.4.6 =
72
* New Feature: Bulk Lead management with leads plugin wordpress.org/plugins/leads/
73
* Added tags to lead profiles for improved management/categorization
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.7
9
Tested up to: 3.8
10
+ Stable Tag: 1.4.8
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
58
59
== Frequently Asked Questions ==
60
*Can I create my own landing page designs?,
61
+ *Yes! You can learn how to <a href="http://docs.inboundnow.com/guide/creating-landing-page-templates/">create your own landing page template here</a>.
62
63
== Screenshots ==
64
68
4. Choose from a ton of pre-made templates, use your existing design, or design your own theme!
69
70
== Changelog ==
71
+
72
+ = 1.4.8 =
73
+ * Added Google Analytics Custom Event Tracking for form submissions
74
+ * Added Ability: automatically sort leads into lists on form completions
75
+ * Added Ability: Send lead notification emails to multiple people. Use comma separated values
76
+ * Improved Social Media Buttons called with lp_social_media() function
77
+ * Fixed qTranslate plugin bug
78
+ * Fixed Genesis Title tag conflict
79
+ * Added improved asset loader
80
+ * Updated main docs.inboundnow.com site. Check it out!
81
+
82
+ = 1.4.7 =
83
+ * GPL fix with js library
84
+
85
= 1.4.6 =
86
* New Feature: Bulk Lead management with leads plugin wordpress.org/plugins/leads/
87
* Added tags to lead profiles for improved management/categorization
shared/.SyncIgnore CHANGED
@@ -1,13 +1,23 @@
1
- # .SyncIgnore is a UTF-8 encoded .txt file that helps you specify single files, paths and rules
2
- # for ignoring during the synchronization job. It supports "?" and "*" wildcard symbols.
3
- #
4
- #
5
- # OS generated files #
6
- .DS_Store
7
- .DS_Store?
8
- ._*
9
- .Spotlight-V100
10
- .Trashes
11
- ehthumbs.db
12
- desktop.ini
13
Thumbs.db
1
+ # .SyncIgnore is a UTF-8 encoded .txt file that helps you specify single files, paths and rules
2
+ # for ignoring during the synchronization job. It supports ‘?’ and ‘*‘ wildcard symbols.
3
+ #
4
+ # Note that .SyncIgnore is applied only to the folder where it is contained and
5
+ # will not work with the files that have already been synced.
6
+ #
7
+ # If you add indexed files to .SyncIgnore, they will be deleted on other syncing devices.
8
+ # In order to avoid this:
9
+ # 1. Quit BitTorrent Sync or remove the folder from sync on all the devices.
10
+ # 2. Modify .SyncIgnore file on all of them so that it contains same info.
11
+ # 3. Run BitTorrent Sync or re-add the modified folders.
12
+ #
13
+ #
14
+ # OS generated files #
15
+ .DS_Store
16
+ .DS_Store?
17
+ ._*
18
+ .Spotlight-V100
19
+ .Trashes
20
+ Icon?
21
+ ehthumbs.db
22
+ desktop.ini
23
Thumbs.db
shared/assets/admin/css/global-inbound-admin.css ADDED
@@ -0,0 +1,136 @@
1
+ #wpadminbar.nojs .ab-top-menu > li.menupop.icon-edd:hover > .ab-item,
2
+ #wpadminbar .ab-top-menu > li.menupop.icon-edd.hover > .ab-item,
3
+ #wpadminbar.nojs .ab-top-menu > li.menupop.icon-edd > .ab-item,
4
+ #wpadminbar .ab-top-menu > li.menupop.icon-edd > .ab-item {
5
+
6
+ background-image: url('../../global/images/shortcodes-blue.png');
7
+
8
+ background-repeat: no-repeat;
9
+ background-position: 0.15em 50%;
10
+ padding-left: 22px;
11
+ }
12
+ #wp-admin-bar-ddw-edd-languages-de > .ab-item:before,
13
+ #wp-admin-bar-ddw-edd-translations-forum > .ab-item:before {
14
+ color: #ff9900;
15
+ content: '• ';
16
+ }
17
+ #wpadminbar .eddtb-search-input {
18
+ width: 140px;
19
+ }
20
+ #wp-admin-bar-ddw-edd-inboundsupportsections .ab-item,
21
+ #wp-admin-bar-ddw-edd-inbounddocsquick .ab-item,
22
+ #wp-admin-bar-ddw-edd-inbounddocssections .ab-item,
23
+ #wpadminbar .eddtb-search-input,
24
+ #wpadminbar .eddtb-search-go {
25
+ color: #21759b !important;
26
+ text-shadow: none;
27
+ }
28
+ #wpadminbar .eddtb-search-input,
29
+ #wpadminbar .eddtb-search-go {
30
+ background-color: #fff;
31
+ height: 18px;
32
+ line-height: 18px;
33
+ padding: 1px 4px;
34
+ }
35
+ #wpadminbar .eddtb-search-go {
36
+ -webkit-border-radius: 11px;
37
+ -moz-border-radius: 11px;
38
+ border-radius: 11px;
39
+ font-size: 0.67em;
40
+ margin: 0 0 0 2px;
41
+ }
42
+ @font-face {
43
+ font-family: 'FontAwesome';
44
+ src: url('../../global/fonts/fontawesome/fontawesome-webfont.eot');
45
+ src: url('../../global/fonts/fontawesome/fontawesome-webfont.eot') format('embedded-opentype'),
46
+ url('../../global/fonts/fontawesome/fontawesome-webfont.woff?v=3.0.2') format('woff'),
47
+ url('../../global/fonts/fontawesome/fontawesome-webfont.ttf?v=3.0.2') format('truetype');
48
+ font-weight: normal;
49
+ font-style: normal;
50
+ }
51
+ #adminmenu .menu-icon-wp-lead div.wp-menu-image:before {
52
+ font-family: "FontAwesome" !important;
53
+ content: "\f0c0";
54
+
55
+ }
56
+ .branch-3-7 #adminmenu .menu-icon-wp-lead div.wp-menu-image:before {
57
+ display: none;
58
+ }
59
+ #adminmenu .menu-icon-wp-lead div.wp-menu-image img{
60
+ display: none;
61
+ }
62
+ .branch-3-7 #adminmenu .menu-icon-wp-lead div.wp-menu-image img {
63
+ display: block;
64
+ }
65
+ #wp-admin-bar-inbound-cta a:first-child, #wp-admin-bar-inbound-inboundtemplates .ab-item.ab-empty-item, #wp-admin-bar-inbound-inboundsettings .ab-item.ab-empty-item, #wp-admin-bar-inbound-inboundreports a:first-child {
66
+ padding-left: 30px !important;
67
+ }
68
+ #wp-admin-bar-inbound-inboundtemplates .ab-item.ab-empty-item:hover, #wp-admin-bar-inbound-inboundsettings .ab-item.ab-empty-item:hover {
69
+ color: #2ea2cc;
70
+ }
71
+ #wp-admin-bar-inbound-leads a:first-child, #wp-admin-bar-inbound-inboundseo a:first-child, #wp-admin-bar-inbound-landingpages a:first-child, #wp-admin-bar-inbound-inboundforms a:first-child {
72
+ padding-left: 31px !important;
73
+ }
74
+ #search-inbound-menu {
75
+ max-height: 22px !important;
76
+ padding: 0px !important;
77
+ min-height: 23px !important;
78
+ padding-left: 3px !important;
79
+ margin-bottom: 1px !important;
80
+ }
81
+ #wp-admin-bar-inbound-inbounddocs-searchform, #wp-admin-bar-inbound-leads-search{
82
+ margin-bottom: 10px !important;
83
+ }
84
+ #wp-admin-bar-inbound-cta .ab-submenu a, #wp-admin-bar-inbound-leads .ab-submenu a, #wp-admin-bar-inbound-landingpages .ab-submenu a , #wp-admin-bar-inbound-inboundforms .ab-submenu a, #wp-admin-bar-inbound-inboundtemplates .ab-submenu a, #wp-admin-bar-inbound-inboundreports .ab-submenu a, #wp-admin-bar-inbound-inboundseo .ab-submenu a{
85
+ padding-left: 10px !important;
86
+ }
87
+ #wp-admin-bar-inbound-cta:before, #wp-admin-bar-inbound-leads:before, #wp-admin-bar-inbound-landingpages:before, #wp-admin-bar-inbound-inboundforms:before, #wp-admin-bar-inbound-inboundtemplates:before, #wp-admin-bar-inbound-inboundsettings:before, #wp-admin-bar-inbound-inboundreports:before, #wp-admin-bar-inbound-inboundseo:before {
88
+ font-family: "FontAwesome" !important;
89
+ content: "\f05b" !important;
90
+ font: 100 19px/1 "FontAwesome" !important;
91
+ padding-top: 4px;
92
+ width: 30px;
93
+ display: inline-block;
94
+ height: 30px;
95
+ position: absolute;
96
+ left: 6px;
97
+ }
98
+ #wp-admin-bar-inbound-leads:before {
99
+ content: "\f0c0" !important;
100
+ font: 100 17px/1 "FontAwesome" !important;
101
+ }
102
+ #wp-admin-bar-inbound-landingpages:before {
103
+ content: "\f15c" !important;
104
+ left: 7px;
105
+ font-size: 21px !important;
106
+ }
107
+ #wp-admin-bar-inbound-inboundforms:before {
108
+ font: 400 18px/1 dashicons!important;
109
+ content: "\f163" !important;
110
+ }
111
+ #wp-admin-bar-inbound-inboundtemplates:before {
112
+ content: "\f0c5" !important;
113
+ font-size: 18px !important;
114
+ }
115
+ #wp-admin-bar-inbound-inboundsettings:before {
116
+ content: "\f013" !important;
117
+ left: 7px !important;
118
+ }
119
+ #wp-admin-bar-inbound-inboundreports:before {
120
+ content: "\f012" !important;
121
+ font-size: 17px !important;
122
+ }
123
+ #wp-admin-bar-inbound-inboundseo:before {
124
+ content: "\f002" !important;
125
+ font-size: 17px !important;
126
+ }
127
+ #wp-admin-bar-inbound-cta a {
128
+ vertical-align: top;
129
+ }
130
+ #adminmenu .menu-icon-wp-call-to-action div.wp-menu-image:before {
131
+ font-family: "FontAwesome" !important;
132
+ content: "\f05b";
133
+ font: 400 24px/1 "FontAwesome" !important;
134
+ padding-top: 6px;
135
+
136
+ }
shared/assets/admin/images/inbound-now-logo.png ADDED
Binary file
shared/assets/admin/js/select2.js ADDED
@@ -0,0 +1,3137 @@