Content Views – Post Grid & List for WordPress - Version 1.2.3

Version Description

  • Fix warning: Cannot send session cache limiter - headers already sent
Download this release

Release Info

Developer PT Guy
Plugin Icon 128x128 Content Views – Post Grid & List for WordPress
Version 1.2.3
Comparing to
See all releases

Code changes from version 1.2.2 to 1.2.3

Files changed (3) hide show
  1. README.txt +7 -1
  2. content-views.php +4 -2
  3. includes/functions.php +10 -4
README.txt CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
4
  Tags: post, posts, page, pages, query, queries, search, display, show, shortcode, thumbnail, title, content, excerpt, meta, date, author, term, taxonomy, pagination, grid, scrollable, collapsible, list, slide, layout, ui
5
  Requires at least: 3.3
6
  Tested up to: 3.9.1
7
- Stable tag: 1.2.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -148,6 +148,9 @@ You can create Unlimited Views, in Unlimited websites
148
 
149
  == Changelog ==
150
 
 
 
 
151
  = 1.2.2 =
152
  * Performance optimization for pagination request
153
  * Add translation file (.po)
@@ -208,6 +211,9 @@ You can create Unlimited Views, in Unlimited websites
208
 
209
  == Upgrade Notice ==
210
 
 
 
 
211
  = 1.2.2 =
212
  Performance optimization for pagination request. Add translation file (.po)
213
 
4
  Tags: post, posts, page, pages, query, queries, search, display, show, shortcode, thumbnail, title, content, excerpt, meta, date, author, term, taxonomy, pagination, grid, scrollable, collapsible, list, slide, layout, ui
5
  Requires at least: 3.3
6
  Tested up to: 3.9.1
7
+ Stable tag: 1.2.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
148
 
149
  == Changelog ==
150
 
151
+ = 1.2.3 =
152
+ * Fix warning: Cannot send session cache limiter - headers already sent
153
+
154
  = 1.2.2 =
155
  * Performance optimization for pagination request
156
  * Add translation file (.po)
211
 
212
  == Upgrade Notice ==
213
 
214
+ = 1.2.3 =
215
+ Fix warning: Cannot send session cache limiter - headers already sent
216
+
217
  = 1.2.2 =
218
  Performance optimization for pagination request. Add translation file (.po)
219
 
content-views.php CHANGED
@@ -10,7 +10,7 @@
10
  * Plugin Name: Content Views
11
  * Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
12
  * Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
13
- * Version: 1.2.2
14
  * Author: Palace Of Themes
15
  * Author URI: http://profiles.wordpress.org/pt-guy
16
  * Text Domain: content-views
@@ -27,7 +27,7 @@ if ( ! defined( 'WPINC' ) ) {
27
  /*
28
  * Define Constant
29
  */
30
- define( 'PT_CV_VERSION', '1.2.2' );
31
  define( 'PT_CV_FILE', __FILE__ );
32
  include_once( plugin_dir_path( __FILE__ ) . 'includes/defines.php' );
33
 
@@ -81,6 +81,8 @@ if ( is_admin() ) {
81
  include_once( plugin_dir_path( __FILE__ ) . 'admin/includes/plugin.php' );
82
  }
83
 
 
 
84
  /**
85
  * Common settings
86
  */
10
  * Plugin Name: Content Views
11
  * Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
12
  * Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
13
+ * Version: 1.2.3
14
  * Author: Palace Of Themes
15
  * Author URI: http://profiles.wordpress.org/pt-guy
16
  * Text Domain: content-views
27
  /*
28
  * Define Constant
29
  */
30
+ define( 'PT_CV_VERSION', '1.2.3' );
31
  define( 'PT_CV_FILE', __FILE__ );
32
  include_once( plugin_dir_path( __FILE__ ) . 'includes/defines.php' );
33
 
81
  include_once( plugin_dir_path( __FILE__ ) . 'admin/includes/plugin.php' );
82
  }
83
 
84
+ add_action( 'init', array( 'PT_CV_Functions', 'session_start' ), 1 );
85
+
86
  /**
87
  * Common settings
88
  */
includes/functions.php CHANGED
@@ -152,6 +152,16 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
152
  return ucwords( $slug );
153
  }
154
 
 
 
 
 
 
 
 
 
 
 
155
  /**
156
  * Get thumbnail dimensions
157
  *
@@ -410,10 +420,6 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
410
  return __( 'Empty settings', PT_CV_DOMAIN );
411
  }
412
 
413
- if ( ! isset( $_SESSION ) ) {
414
- session_start();
415
- }
416
-
417
  $post_fix = empty( $id ) ? '' : '_frontend';
418
 
419
  $_SESSION[PT_CV_PREFIX . 'settings' . $post_fix] = $settings;
152
  return ucwords( $slug );
153
  }
154
 
155
+ /**
156
+ * Start SESSION
157
+ */
158
+ static function session_start() {
159
+ if( ! session_id() )
160
+ {
161
+ session_start();
162
+ }
163
+ }
164
+
165
  /**
166
  * Get thumbnail dimensions
167
  *
420
  return __( 'Empty settings', PT_CV_DOMAIN );
421
  }
422
 
 
 
 
 
423
  $post_fix = empty( $id ) ? '' : '_frontend';
424
 
425
  $_SESSION[PT_CV_PREFIX . 'settings' . $post_fix] = $settings;