WordPress Landing Pages - Version 2.5.6

Version Description

  • Adding wpautop to default landing page
  • Updating shared files
Download this release

Release Info

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

Code changes from version 2.5.5 to 2.5.6

classes/class.landing-pages.php CHANGED
@@ -82,6 +82,7 @@ class Landing_Pages_Template_Switcher {
82
 
83
  $content = Landing_Pages_Variations::get_post_content( $post->ID );
84
  $content = do_shortcode( $content );
 
85
 
86
  return $content;
87
  }
82
 
83
  $content = Landing_Pages_Variations::get_post_content( $post->ID );
84
  $content = do_shortcode( $content );
85
+ $content = wpautop( $content );
86
 
87
  return $content;
88
  }
classes/class.post-type.landing-page.php CHANGED
@@ -66,6 +66,13 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
66
  public static function register_post_type() {
67
 
68
  $slug = Landing_Pages_Settings::get_setting( 'lp-main-landing-page-permalink-prefix', 'go' );
 
 
 
 
 
 
 
69
 
70
  $labels = array(
71
  'name' => __('Landing Pages', 'inbound-pro' ),
@@ -93,7 +100,7 @@ if ( !class_exists('Landing_Pages_Post_Type') ) {
93
  'map_meta_cap' => true,
94
  'hierarchical' => false,
95
  'menu_position' => 32,
96
- 'supports' => array('title','custom-fields','editor', 'revisions')
97
  );
98
 
99
  register_post_type( 'landing-page' , $args );
66
  public static function register_post_type() {
67
 
68
  $slug = Landing_Pages_Settings::get_setting( 'lp-main-landing-page-permalink-prefix', 'go' );
69
+ $featured_images = Landing_Pages_Settings::get_setting( 'lp-main-landing-page-enable-featured-image', false );
70
+
71
+ $capabilities = array('title','custom-fields','editor', 'revisions');
72
+
73
+ if ($featured_images) {
74
+ array_push($capabilities , 'thumbnail');
75
+ }
76
 
77
  $labels = array(
78
  'name' => __('Landing Pages', 'inbound-pro' ),
100
  'map_meta_cap' => true,
101
  'hierarchical' => false,
102
  'menu_position' => 32,
103
+ 'supports' => $capabilities
104
  );
105
 
106
  register_post_type( 'landing-page' , $args );
classes/class.settings.php CHANGED
@@ -65,6 +65,14 @@ class Landing_Pages_Settings {
65
  'type' => 'radio',
66
  'default' => '0',
67
  'options' => array('0'=>'No Keep it on','1'=>'Yes turn AB testing Off')
 
 
 
 
 
 
 
 
68
  )
69
  )
70
 
@@ -115,6 +123,14 @@ class Landing_Pages_Settings {
115
  'type' => 'radio',
116
  'default' => '0',
117
  'options' => array('0'=>'No Keep it on','1'=>'Yes turn AB testing Off')
 
 
 
 
 
 
 
 
118
  )
119
  );
120
 
65
  'type' => 'radio',
66
  'default' => '0',
67
  'options' => array('0'=>'No Keep it on','1'=>'Yes turn AB testing Off')
68
+ ),
69
+ array(
70
+ 'id' => 'landing-page-enable-featured-image',
71
+ 'label' => __('Enable Featured Images' , 'inbound-pro') ,
72
+ 'description' => __("Enable this setting if you plan to include the landing-page post type in any frontend post archives that leverages the featured image system." , 'inbound-pro'),
73
+ 'type' => 'radio',
74
+ 'default' => '0',
75
+ 'options' => array('0'=>__('Off','inbound-pro'), '1'=> __('On' , 'inbound-pro') )
76
  )
77
  )
78
 
123
  'type' => 'radio',
124
  'default' => '0',
125
  'options' => array('0'=>'No Keep it on','1'=>'Yes turn AB testing Off')
126
+ ),
127
+ array(
128
+ 'id' => 'landing-page-enable-featured-image',
129
+ 'label' => __('Enable Featured Images' , 'inbound-pro') ,
130
+ 'description' => __("Enable this setting if you plan to include the landing-page post type in any frontend post archives that leverages the featured image system." , 'inbound-pro'),
131
+ 'type' => 'radio',
132
+ 'default' => '0',
133
+ 'options' => array('0'=>__('Off','inbound-pro'), '1'=> __('On' , 'inbound-pro') )
134
  )
135
  );
136
 
landing-pages.php CHANGED
@@ -3,7 +3,7 @@
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.5.5
7
  Author: Inbound Now
8
  Author URI: http://www.inboundnow.com/
9
 
@@ -37,7 +37,7 @@ if (!class_exists('Inbound_Landing_Pages_Plugin')) {
37
  */
38
  private static function load_constants() {
39
 
40
- define('LANDINGPAGES_CURRENT_VERSION', '2.5.5' );
41
  define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
42
  define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
43
  define('LANDINGPAGES_PLUGIN_SLUG', 'landing-pages' );
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.5.6
7
  Author: Inbound Now
8
  Author URI: http://www.inboundnow.com/
9
 
37
  */
38
  private static function load_constants() {
39
 
40
+ define('LANDINGPAGES_CURRENT_VERSION', '2.5.6' );
41
  define('LANDINGPAGES_URLPATH', plugins_url( '/' , __FILE__ ) );
42
  define('LANDINGPAGES_PATH', WP_PLUGIN_DIR.'/'.plugin_basename( dirname(__FILE__) ).'/' );
43
  define('LANDINGPAGES_PLUGIN_SLUG', 'landing-pages' );
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.7.4
10
- Stable Tag: 2.5.5
11
 
12
 
13
  Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
@@ -85,7 +85,8 @@ We also offer a guide for using <a href="https://github.com/inboundnow/landing-p
85
 
86
  == Changelog ==
87
 
88
- = 2.5.5 =
 
89
  * Updating shared files
90
 
91
 
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.7.4
10
+ Stable Tag: 2.5.6
11
 
12
 
13
  Create landing pages for your WordPress site. Monitor and improve conversion rates, run A/B split tests, customize your own templates and more.
85
 
86
  == Changelog ==
87
 
88
+ = 2.5.6 =
89
+ * Adding wpautop to default landing page
90
  * Updating shared files
91
 
92
 
shared/classes/class.database-routines.php CHANGED
@@ -103,7 +103,6 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
103
  set_transient('inbound_shared_version' , INBOUNDNOW_SHARED_DBRV);
104
  }
105
 
106
-
107
  /**
108
  * @param $routine
109
  */
@@ -139,10 +138,9 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
139
  $table_name = $wpdb->prefix . "inbound_page_views";
140
 
141
  /* add ip field if does not exist */
 
142
 
143
- $col_check = $wpdb->get_row("SELECT * FROM " . $table_name);
144
-
145
- if(!isset($col_check->ip)) {
146
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `ip` VARCHAR(45) NOT NULL");
147
  } else {
148
  $wpdb->get_results( "ALTER TABLE {$table_name} MODIFY COLUMN `ip` VARCHAR(45)" );
@@ -161,7 +159,7 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
161
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
162
  $table_name = $wpdb->prefix . "inbound_events";
163
 
164
- $col_check = $wpdb->get_row("SELECT * FROM " . $table_name);
165
 
166
  if(!isset($col_check->funnel)) {
167
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `funnel` text NOT NULL");
@@ -188,7 +186,7 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
188
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
189
  $table_name = $wpdb->prefix . "inbound_events";
190
 
191
- $col_check = $wpdb->get_row("SELECT * FROM " . $table_name);
192
 
193
  if(!isset($col_check->rule_id)) {
194
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `rule_id` mediumint(20) NOT NULL");
@@ -211,7 +209,7 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
211
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
212
  $table_name = $wpdb->prefix . "inbound_events";
213
 
214
- $col_check = $wpdb->get_row("SELECT * FROM " . $table_name);
215
 
216
  if(!isset($col_check->comment_id)) {
217
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `comment_id` mediumint(20) NOT NULL");
@@ -249,7 +247,7 @@ if ( !class_exists('Inbound_Upgrade_Routines') ) {
249
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
250
  $table_name = $wpdb->prefix . "inbound_automation_queue";
251
 
252
- $col_check = $wpdb->get_row("SELECT * FROM " . $table_name);
253
 
254
  if(!isset($col_check->lead_id)) {
255
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `lead_id` mediumint(20) NOT NULL");
103
  set_transient('inbound_shared_version' , INBOUNDNOW_SHARED_DBRV);
104
  }
105
 
 
106
  /**
107
  * @param $routine
108
  */
138
  $table_name = $wpdb->prefix . "inbound_page_views";
139
 
140
  /* add ip field if does not exist */
141
+ $col_check = $wpdb->get_row("SELECT * FROM " . $table_name . " LIMIT 1");
142
 
143
+ if(isset($col_check->ip)) {
 
 
144
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `ip` VARCHAR(45) NOT NULL");
145
  } else {
146
  $wpdb->get_results( "ALTER TABLE {$table_name} MODIFY COLUMN `ip` VARCHAR(45)" );
159
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
160
  $table_name = $wpdb->prefix . "inbound_events";
161
 
162
+ $col_check = $wpdb->get_row("SELECT * FROM " . $table_name . " LIMIT 1");
163
 
164
  if(!isset($col_check->funnel)) {
165
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `funnel` text NOT NULL");
186
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
187
  $table_name = $wpdb->prefix . "inbound_events";
188
 
189
+ $col_check = $wpdb->get_row("SELECT * FROM " . $table_name . " LIMIT 1");
190
 
191
  if(!isset($col_check->rule_id)) {
192
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `rule_id` mediumint(20) NOT NULL");
209
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
210
  $table_name = $wpdb->prefix . "inbound_events";
211
 
212
+ $col_check = $wpdb->get_row("SELECT * FROM " . $table_name . " LIMIT 1");
213
 
214
  if(!isset($col_check->comment_id)) {
215
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `comment_id` mediumint(20) NOT NULL");
247
  require_once( ABSPATH . 'wp-admin/includes/upgrade.php' );
248
  $table_name = $wpdb->prefix . "inbound_automation_queue";
249
 
250
+ $col_check = $wpdb->get_row("SELECT * FROM " . $table_name . " LIMIT 1");
251
 
252
  if(!isset($col_check->lead_id)) {
253
  $wpdb->get_results("ALTER TABLE {$table_name} ADD `lead_id` mediumint(20) NOT NULL");
shared/classes/class.lead-storage.php CHANGED
@@ -22,6 +22,9 @@ if (!class_exists('LeadStorage')) {
22
 
23
  /* filters name data to build a more comprehensive data set */
24
  add_filter( 'inboundnow_store_lead_pre_filter_data', array(__CLASS__, 'improve_lead_name'), 10, 1);
 
 
 
25
  }
26
 
27
  /**
@@ -551,6 +554,19 @@ if (!class_exists('LeadStorage')) {
551
  );
552
  }
553
 
 
 
 
 
 
 
 
 
 
 
 
 
 
554
 
555
  /**
556
  * Updates raw form data object
22
 
23
  /* filters name data to build a more comprehensive data set */
24
  add_filter( 'inboundnow_store_lead_pre_filter_data', array(__CLASS__, 'improve_lead_name'), 10, 1);
25
+
26
+ /* update modified timestamp if update */
27
+ add_action('wpleads_existing_lead_update' , array( __CLASS__ , 'update_modified_date') );
28
  }
29
 
30
  /**
554
  );
555
  }
556
 
557
+ /**
558
+ * updates the date modified date
559
+ * @param $lead_id
560
+ */
561
+ public static function update_modified_date( $lead ) {
562
+
563
+ $timezone_format = _x('Y-m-d G:i:s', 'timezone date format');
564
+ $wordpress_date_time = date_i18n($timezone_format);
565
+
566
+ wp_update_post(array('ID' => $lead['id'] , 'post_modified' => $wordpress_date_time));
567
+
568
+ }
569
+
570
 
571
  /**
572
  * Updates raw form data object