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

Version Description

  • Fix pagination bug
Download this release

Release Info

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

Code changes from version 1.0.2 to 1.1.1

README.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Query and display posts without coding: Content Views ===
2
  Contributors: pt-guy
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JGUF974QBRKQE
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.0.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,26 +12,27 @@ Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid
12
 
13
  == Description ==
14
 
15
- [Content Views](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=post&utm_campaign=content-views "Visit Content Views website") is a WordPress plugin helps you to query and display posts, pages in different kind of **responsive** layouts (grid, scrollable list, collapsible list), in very 3 simple steps:
16
 
17
  * Step 1 : Select criteria to query posts, pages
18
- * Step 2 : Select layout which you want to display your queried entries
19
- * Step 3 : Paste shortcode **[pt_view id="UNIQUE_ID"]** to editor of a post, page or a Text widget where you want to show your desired content. If you are a developer, you can **`<?php echo do_shortcode('[pt_view id="UNIQUE_ID"]'); ?>`** in theme of your WordPress site. (Please check FAQ to know how to get UNIQUE_ID of View)
20
 
21
  = Content Views features: =
22
 
23
  **in Step 1, you can:**
24
 
25
  * query single/multiple post(s), page(s)
26
- * query posts, pages written by, not written by any authors
27
- * query posts, pages associate with, don't associate with tags, categories
 
28
  * query posts, pages in any status (publish, draft, private...)
29
- * sort posts, pages by Id, Title, Created date, Modified date in ascending, descending order
30
  * query posts, pages which contain a specific keyword
 
31
 
32
  **in Step 2, you can:**
33
 
34
- * Select a layout to show queried content: Grid, Collapsible List, Scrollable List. More awesome layouts are available in **[Content Views PRO](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Content Views Pro plugin")**
35
  * Choose a layout format of each item (item is the output of a post, page at front-end): 1 column, 2 columns
36
  * Select fields to show (thumbnail, title, content, meta fields)
37
  * Select size of thumbnail
@@ -46,14 +47,15 @@ Also, you can import/export 'View' to use in other WordPress sites (Please check
46
  = More amazing features: =
47
 
48
  * Be able to query custom post types (Woocommerce products, FAQ...)
49
- * Awesome output & settings of Grid, Collapsible List, Scrollable List layout
50
- * More awesome layouts: Pinterest, Timeline
51
  * Drag & drop to change display order of fields (thumbnail, title, content, meta fields)
52
  * Customize Font settings
 
53
  * More Pagination options
54
  * And much more...
55
 
56
- are available in **[Content Views PRO](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Content Views Pro plugin")**
57
 
58
 
59
  == Installation ==
@@ -122,12 +124,22 @@ You can create Unlimited Views, in Unlimited websites
122
 
123
  == Changelog ==
124
 
 
 
 
 
 
 
 
 
 
 
 
125
  = 1.0.2 =
126
- * Add custom filters
127
- * Fix some bugs
128
 
129
  = 1.0.1 =
130
- * Fix some bugs
131
  * Adjust styles
132
 
133
  = 1.0.0 =
@@ -137,4 +149,17 @@ You can create Unlimited Views, in Unlimited websites
137
 
138
  == Upgrade Notice ==
139
 
140
- Fix some bugs. Adjust styles.
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Query and display posts without coding - Content Views ===
2
  Contributors: pt-guy
3
  Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JGUF974QBRKQE
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.1.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
12
 
13
  == Description ==
14
 
15
+ [Content Views](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=post&utm_campaign=content-views "Visit Content Views website") provides a visual form to query and display posts, pages in **responsive** layouts (grid, scrollable list, collapsible list) quickly & easily (without any line of code), in very 3 simple steps:
16
 
17
  * Step 1 : Select criteria to query posts, pages
18
+ * Step 2 : Select layout to display your queried entries
19
+ * Step 3 : Paste shortcode **[pt_view id="UNIQUE_ID"]** to editor of a post, page or a Text widget where you want to show your queried entries. If you are a developer, you can **`<?php echo do_shortcode('[pt_view id="UNIQUE_ID"]'); ?>`** in theme of your WordPress site. (Please check FAQ to know how to get UNIQUE_ID of View)
20
 
21
  = Content Views features: =
22
 
23
  **in Step 1, you can:**
24
 
25
  * query single/multiple post(s), page(s)
26
+ * query child pages of a parent page
27
+ * query posts, pages written by, not written by authors
28
+ * query posts, pages associate with, not associate with categories, tags
29
  * query posts, pages in any status (publish, draft, private...)
 
30
  * query posts, pages which contain a specific keyword
31
+ * sort posts, pages by Id, Title, Created date, Modified date in ascending, descending order
32
 
33
  **in Step 2, you can:**
34
 
35
+ * Select a layout to show output: Grid, Collapsible List, Scrollable List. More awesome layouts are available in **[Content Views PRO](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Content Views Pro plugin")**
36
  * Choose a layout format of each item (item is the output of a post, page at front-end): 1 column, 2 columns
37
  * Select fields to show (thumbnail, title, content, meta fields)
38
  * Select size of thumbnail
47
  = More amazing features: =
48
 
49
  * Be able to query custom post types (Woocommerce products, FAQ...)
50
+ * More beautiful output & powerful settings of Grid, Collapsible List, Scrollable List
51
+ * Additional awesome layouts: Pinterest, Timeline
52
  * Drag & drop to change display order of fields (thumbnail, title, content, meta fields)
53
  * Customize Font settings
54
+ * Customize Read more button
55
  * More Pagination options
56
  * And much more...
57
 
58
+ are available in **[Content Views PRO](http://www.wordpressquery.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Content Views Pro")** plugin!
59
 
60
 
61
  == Installation ==
124
 
125
  == Changelog ==
126
 
127
+ = 1.1.1 =
128
+ * Fix pagination bug
129
+
130
+ = 1.1 =
131
+ * Add "Parent page" option to query child pages of a parent page
132
+ * Show shortcode [pt_view id="UNIQUE_ID"] to able to copy in editing page of a View
133
+ * Add link to Thumbnail
134
+ * Update Settings page
135
+ * Fix import/export bugs
136
+ * Classify "Add New View" vs "Edit View"
137
+
138
  = 1.0.2 =
139
+ * Add some WP filters
140
+ * Add main action for Pro plugin to trigger
141
 
142
  = 1.0.1 =
 
143
  * Adjust styles
144
 
145
  = 1.0.0 =
149
 
150
  == Upgrade Notice ==
151
 
152
+ = 1.1.1 =
153
+ Fix pagination bug
154
+
155
+ = 1.1 =
156
+ Add "Parent page" option to query child pages of a parent page. Show shortcode [pt_view id="UNIQUE_ID"] to able to copy in editing page of a View. Add link to Thumbnail. Update Settings page. Fix import/export bugs. Classify "Add New View" vs "Edit View"
157
+
158
+ = 1.0.2 =
159
+ Add some WP filters. Add main action for Pro plugin to trigger
160
+
161
+ = 1.0.1 =
162
+ Adjust styles
163
+
164
+ = 1.0.0 =
165
+ Initial release
admin/assets/images/features/collapsible.png ADDED
Binary file
admin/assets/images/features/content-type.png ADDED
Binary file
admin/assets/images/features/drag_drop.png ADDED
Binary file
admin/assets/images/features/font-settings.png ADDED
Binary file
admin/assets/images/features/openin.png ADDED
Binary file
admin/assets/images/features/orderby.png ADDED
Binary file
admin/assets/images/features/pagination.png ADDED
Binary file
admin/assets/images/features/pinterest.png ADDED
Binary file
admin/assets/images/features/readmore.png ADDED
Binary file
admin/assets/images/features/scrollable.png ADDED
Binary file
admin/assets/images/features/timeline.png ADDED
Binary file
admin/includes/options.php CHANGED
@@ -192,7 +192,7 @@ if ( ! class_exists( 'PT_Options_Framework' ) ) {
192
  // Add extra information of option type
193
  switch ( $type ) {
194
  case 'number':
195
- $min = ! empty( $param['min'] ) ? intval( $param['min'] ) : 1;
196
  $extend = 'min="' . $min . '"';
197
  break;
198
  case 'color':
192
  // Add extra information of option type
193
  switch ( $type ) {
194
  case 'number':
195
+ $min = ! empty( $param['min'] ) ? intval( $param['min'] ) : 0;
196
  $extend = 'min="' . $min . '"';
197
  break;
198
  case 'color':
admin/views/admin.php CHANGED
@@ -14,17 +14,128 @@
14
 
15
  <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
16
 
 
 
 
 
 
 
 
 
 
17
  <?php
18
 
19
  ob_start();
20
  ?>
21
  <p><br>Thank you for using Content Views!</p>
22
  <p>You are using <strong>Free</strong> version: <?php echo PT_CV_Functions::plugin_info( PT_CV_FILE, 'Version' ); ?></p>
23
- <p>More awesome features are available at <a href="http://wordpressquery.com" target="_blank">Wordpress Query</a>.</p>
24
- <p><br>Enjoy with Content Views!</p>
25
- <p>---<br>
26
- Plugin developed by PT guy.<br>
27
- Copyright © 2014</p>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
28
  <?php
29
  $text = ob_get_clean();
30
 
14
 
15
  <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
16
 
17
+ <style>
18
+ .wrap * { font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; }
19
+ .wrap .row { border-bottom: 2px solid #ececec; }
20
+ .wrap p, .wrap form { font-size: 14px; }
21
+ .wrap h3 { font-size: 16px; font-weight: bold; color: #FF6A5A; }
22
+ .wrap h6 { font-size: 15px; font-weight: bold; }
23
+ .thumbnail { max-width: 100%; border: none !important; }
24
+ </style>
25
+
26
  <?php
27
 
28
  ob_start();
29
  ?>
30
  <p><br>Thank you for using Content Views!</p>
31
  <p>You are using <strong>Free</strong> version: <?php echo PT_CV_Functions::plugin_info( PT_CV_FILE, 'Version' ); ?></p>
32
+ <p>Here is list of some of awesome features which are available at <a href="http://www.wordpressquery.com/?utm_source=settings_page&utm_medium=link&utm_campaign=content-views" target="_blank">Wordpress Query</a>.</p>
33
+
34
+ <p>
35
+ <a href="http://www.wordpressquery.com/pricing/?utm_source=settings_page&utm_medium=link&utm_campaign=content-views" target="_blank" class="btn btn-success">Upgrade now</a>
36
+ </p>
37
+
38
+ <div class="row">
39
+ <div class="col-md-6">
40
+ <h3>
41
+ Query custom post types: Woocommerce products, FAQ...
42
+ </h3>
43
+ <div>
44
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/content-type.png', PT_CV_FILE ); ?>" />
45
+ </div>
46
+ </div>
47
+ <div class="col-md-6">
48
+ <h3>
49
+ Post type specific order by options
50
+ </h3>
51
+ <div>
52
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/orderby.png', PT_CV_FILE ); ?>" />
53
+ </div>
54
+ </div>
55
+ </div>
56
+
57
+ <div class="row">
58
+ <div class="col-md-12">
59
+ <h3>
60
+ More beautiful & awesome layouts
61
+ </h3>
62
+ <div>
63
+ <div class="row">
64
+ <div class="col-md-6">
65
+ <h6>Scrollable list</h6>
66
+ <div>
67
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/scrollable.png', PT_CV_FILE ); ?>" />
68
+ </div>
69
+ </div>
70
+ <div class="col-md-6">
71
+ <h6>Collapsible list</h6>
72
+ <div>
73
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/collapsible.png', PT_CV_FILE ); ?>" />
74
+ </div>
75
+ </div>
76
+ </div>
77
+ <div class="row">
78
+ <div class="col-md-6">
79
+ <h6>Pinterest</h6>
80
+ <div>
81
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/pinterest.png', PT_CV_FILE ); ?>" />
82
+ </div>
83
+ </div>
84
+ <div class="col-md-6">
85
+ <h6>Timeline</h6>
86
+ <div>
87
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/timeline.png', PT_CV_FILE ); ?>" />
88
+ </div>
89
+ </div>
90
+ </div>
91
+ </div>
92
+ </div>
93
+ </div>
94
+
95
+ <div class="row">
96
+ <div class="col-md-6">
97
+ <h3>
98
+ Drag & drop to change display order of fields
99
+ </h3>
100
+ <div>
101
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/drag_drop.png', PT_CV_FILE ); ?>" />
102
+ </div>
103
+ </div>
104
+ <div class="col-md-6">
105
+ <h3>
106
+ Read more settings
107
+ </h3>
108
+ <div>
109
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/readmore.png', PT_CV_FILE ); ?>" />
110
+ </div>
111
+ </div>
112
+ </div>
113
+
114
+ <div class="row">
115
+ <div class="col-md-6">
116
+ <h3>
117
+ Custom font settings
118
+ </h3>
119
+ <div>
120
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/font-settings.png', PT_CV_FILE ); ?>" />
121
+ </div>
122
+ </div>
123
+ <div class="col-md-6">
124
+ <h3>
125
+ And more powerful options
126
+ </h3>
127
+ <div>
128
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/pagination.png', PT_CV_FILE ); ?>" />
129
+ <img class="thumbnail" src="<?php echo plugins_url( 'admin/assets/images/features/openin.png', PT_CV_FILE ); ?>" />
130
+ <br> <span style="font-size: 30px;">...</span>
131
+ </div>
132
+ </div>
133
+ </div>
134
+
135
+ <br>
136
+ <p>Enjoy with Content Views!</p>
137
+ <p>Plugin developed by PT guy (palaceofthemes@gmail.com)</p>
138
+ <p>Copyright &COPY; 2014</p>
139
  <?php
140
  $text = ob_get_clean();
141
 
admin/views/view.php CHANGED
@@ -40,7 +40,13 @@ PT_CV_Functions::view_submit();
40
 
41
  <div class="wrap form-horizontal pt-wrap">
42
 
43
- <h2><?php echo esc_html( get_admin_page_title() ); ?></h2>
 
 
 
 
 
 
44
 
45
  <div class="preview-wrapper">
46
  <?php
@@ -180,6 +186,22 @@ $options = array(
180
  ),
181
  ),
182
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
183
  // Limit
184
  array(
185
  'label' => array(
40
 
41
  <div class="wrap form-horizontal pt-wrap">
42
 
43
+ <h2><?php echo esc_html( $id ? __( 'Edit View', PT_CV_DOMAIN ) : get_admin_page_title() ); ?></h2>
44
+
45
+ <?php
46
+ if ( $id ) {
47
+ echo balanceTags( sprintf( '<div class="alert alert-success" style="color: #000">[pt_view id="%s"]</div>', $id ) );
48
+ }
49
+ ?>
50
 
51
  <div class="preview-wrapper">
52
  <?php
186
  ),
187
  ),
188
 
189
+ // Parent page
190
+ array(
191
+ 'label' => array(
192
+ 'text' => __( 'Parent page', PT_CV_DOMAIN ),
193
+ ),
194
+ 'params' => array(
195
+ array(
196
+ 'type' => 'number',
197
+ 'name' => 'post_parent',
198
+ 'std' => '',
199
+ 'desc' => __( 'Enter ID of parent page to query child pages', PT_CV_DOMAIN ),
200
+ ),
201
+ ),
202
+ 'dependence' => array( 'content-type', 'page' ),
203
+ ),
204
+
205
  // Limit
206
  array(
207
  'label' => array(
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.0.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.0.2' );
31
  define( 'PT_CV_FILE', __FILE__ );
32
  include_once( plugin_dir_path( __FILE__ ) . 'includes/defines.php' );
33
 
@@ -78,8 +78,6 @@ if ( is_admin() ) {
78
  include_once( plugin_dir_path( __FILE__ ) . 'admin/includes/options.php' );
79
  }
80
 
81
- do_action( 'pt_cv_addon_init' );
82
-
83
  /**
84
  * Common settings
85
  */
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.1.1
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.1.1' );
31
  define( 'PT_CV_FILE', __FILE__ );
32
  include_once( plugin_dir_path( __FILE__ ) . 'includes/defines.php' );
33
 
78
  include_once( plugin_dir_path( __FILE__ ) . 'admin/includes/options.php' );
79
  }
80
 
 
 
81
  /**
82
  * Common settings
83
  */
includes/functions.php CHANGED
@@ -385,7 +385,7 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
385
  // Get view settings
386
  if ( $post_id ) {
387
  $view_settings = get_post_meta( $post_id, PT_CV_META_SETTINGS, true );
388
- return unserialize( base64_decode( $view_settings ) );
389
  }
390
 
391
  return array();
@@ -436,6 +436,14 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
436
  $args['post__not_in'] = array_map( 'intval', array_filter( $post_not_in ) );
437
  }
438
 
 
 
 
 
 
 
 
 
439
  // Advance settings
440
  PT_CV_Functions::view_get_advanced_settings( $settings_, $args, $content_type );
441
 
@@ -783,9 +791,9 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
783
  static function view_get_pagination_settings( $settings_, &$dargs, &$args, $pargs ) {
784
 
785
  // Get Limit value
786
- $limit = (int) PT_CV_Functions::setting_value( PT_CV_PREFIX . 'limit', $settings_ );
787
- $args['limit'] = $args['posts_per_page'] = empty( $limit ) ? - 1 : $limit;
788
- $posts_per_page = $limit;
789
 
790
  // Get pagination enable/disable
791
  $pagination = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'enable-pagination', $settings_ );
@@ -801,7 +809,7 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
801
  // If Items per page is set, get its value
802
  $posts_per_page = isset( $dargs['pagination-settings']['items-per-page'] ) ? (int) $dargs['pagination-settings']['items-per-page'] : $limit;
803
 
804
- if ( $limit != - 1 && $posts_per_page > $limit ) {
805
  $posts_per_page = $limit;
806
  }
807
 
@@ -823,7 +831,6 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
823
  }
824
 
825
  $args = apply_filters( PT_CV_PREFIX_ . 'settings_args_offset', $args, $pagination, $pargs, $settings_, $limit );
826
-
827
  }
828
 
829
  /**
@@ -873,7 +880,7 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
873
  $cur_view_id = esc_sql( $_POST[PT_CV_PREFIX . 'view-id'] );
874
  $view_id = empty( $cur_view_id ) ? PT_CV_Functions::string_random() : $cur_view_id;
875
  update_post_meta( $post_id, PT_CV_META_ID, $view_id );
876
- update_post_meta( $post_id, PT_CV_META_SETTINGS, base64_encode( serialize( $_POST ) ) );
877
 
878
  /**
879
  * redirect to edit page
385
  // Get view settings
386
  if ( $post_id ) {
387
  $view_settings = get_post_meta( $post_id, PT_CV_META_SETTINGS, true );
388
+ return is_array( $view_settings ) ? $view_settings : array();
389
  }
390
 
391
  return array();
436
  $args['post__not_in'] = array_map( 'intval', array_filter( $post_not_in ) );
437
  }
438
 
439
+ // Parent page
440
+ if ( $content_type == 'page' ) {
441
+ $post_parent = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'post_parent', $settings_ );
442
+ if ( ! empty( $post_parent ) ) {
443
+ $args['post_parent'] = (int) $post_parent;
444
+ }
445
+ }
446
+
447
  // Advance settings
448
  PT_CV_Functions::view_get_advanced_settings( $settings_, $args, $content_type );
449
 
791
  static function view_get_pagination_settings( $settings_, &$dargs, &$args, $pargs ) {
792
 
793
  // Get Limit value
794
+ $limit = trim( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'limit', $settings_ ) );
795
+ $limit = ( empty( $limit ) || $limit === '-1' ) ? 10000000 : (int) $limit;
796
+ $args['limit'] = $args['posts_per_page'] = $limit;
797
 
798
  // Get pagination enable/disable
799
  $pagination = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'enable-pagination', $settings_ );
809
  // If Items per page is set, get its value
810
  $posts_per_page = isset( $dargs['pagination-settings']['items-per-page'] ) ? (int) $dargs['pagination-settings']['items-per-page'] : $limit;
811
 
812
+ if ( $posts_per_page > $limit ) {
813
  $posts_per_page = $limit;
814
  }
815
 
831
  }
832
 
833
  $args = apply_filters( PT_CV_PREFIX_ . 'settings_args_offset', $args, $pagination, $pargs, $settings_, $limit );
 
834
  }
835
 
836
  /**
880
  $cur_view_id = esc_sql( $_POST[PT_CV_PREFIX . 'view-id'] );
881
  $view_id = empty( $cur_view_id ) ? PT_CV_Functions::string_random() : $cur_view_id;
882
  update_post_meta( $post_id, PT_CV_META_ID, $view_id );
883
+ update_post_meta( $post_id, PT_CV_META_SETTINGS, (array) $_POST );
884
 
885
  /**
886
  * redirect to edit page
includes/html.php CHANGED
@@ -510,11 +510,9 @@ if ( ! class_exists( 'PT_CV_Html' ) ) {
510
  $html = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_not_found', $html, $post, $dimensions, $gargs );
511
  }
512
 
513
- // If title is not shown, add link to thumbnail
514
- if ( ! in_array( 'title', $dargs['fields'] ) ) {
515
- $oargs = isset( $dargs['other-settings'] ) ? $dargs['other-settings'] : array();
516
- $html = self::_field_href( $oargs, $post, $html );
517
- }
518
 
519
  return $html;
520
  }
510
  $html = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_not_found', $html, $post, $dimensions, $gargs );
511
  }
512
 
513
+ // Add link to thumbnail
514
+ $oargs = isset( $dargs['other-settings'] ) ? $dargs['other-settings'] : array();
515
+ $html = self::_field_href( $oargs, $post, $html );
 
 
516
 
517
  return $html;
518
  }