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

Version Description

  • Add custom filters
  • Fix some bugs
Download this release

Release Info

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

Code changes from version 1.0.1 to 1.0.2

README.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Content Views - Query and display posts, pages without coding ===
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, 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.1
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -12,18 +12,17 @@ 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=plugin&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
- = And here is your power with this plugin: =
22
 
23
  **in Step 1, you can:**
24
 
25
- * query & display a single post, page
26
- * query & display multiple posts, pages
27
  * query posts, pages written by, not written by any authors
28
  * query posts, pages associate with, don't associate with tags, categories
29
  * query posts, pages in any status (publish, draft, private...)
@@ -32,12 +31,12 @@ Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid
32
 
33
  **in Step 2, you can:**
34
 
35
- * Select a layout to show queried posts, pages: 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 frontend): 1 column, 2 columns
37
  * Select fields to show (thumbnail, title, content, meta fields)
38
  * Select size of thumbnail
39
- * Show full content, or an excerpt with specific length
40
- * Select meta fields to show (date, author, term [categories, tags], comment count)
41
  * Enable/Disable pagination
42
  * Open an item in new tab, current tab
43
 
@@ -47,8 +46,8 @@ Also, you can import/export 'View' to use in other WordPress sites (Please check
47
  = More amazing features: =
48
 
49
  * Be able to query custom post types (Woocommerce products, FAQ...)
50
- * Advanced output & settings of Grid, Collapsible List, Scrollable List layout
51
- * Additional layouts: Pinterest, Timeline
52
  * Drag & drop to change display order of fields (thumbnail, title, content, meta fields)
53
  * Customize Font settings
54
  * More Pagination options
@@ -103,7 +102,7 @@ Firstly, you should go to "All Views" page (please check above question). Then c
103
 
104
  = How to get UNIQUE_ID of View? =
105
 
106
- You can get View ID in URL of editing page of View (please check above question). The url has following format: http://your_domain/wp-admin/admin.php?page=content-views-add&id=UNIQUE_ID
107
 
108
  = How many Views I can create? =
109
 
@@ -123,6 +122,10 @@ You can create Unlimited Views, in Unlimited websites
123
 
124
  == Changelog ==
125
 
 
 
 
 
126
  = 1.0.1 =
127
  * Fix some bugs
128
  * 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.0.2
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") 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...)
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
38
+ * Show full content, or an excerpt with specific amount of words
39
+ * Select meta fields to show (date, author, terms [categories, tags], comment count)
40
  * Enable/Disable pagination
41
  * Open an item in new tab, current tab
42
 
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
102
 
103
  = How to get UNIQUE_ID of View? =
104
 
105
+ You can get View ID in URL of editing page of View (please check above question), it has this format: http://your_domain/wp-admin/admin.php?page=content-views-add&id=UNIQUE_ID
106
 
107
  = How many Views I can create? =
108
 
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
admin/views/view.php CHANGED
@@ -195,6 +195,8 @@ $options = array(
195
  ),
196
  ),
197
  ),
 
 
198
  ),
199
  ),
200
  ),
195
  ),
196
  ),
197
  ),
198
+
199
+ apply_filters( PT_CV_PREFIX_ . 'common_filter', array() ),
200
  ),
201
  ),
202
  ),
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.1
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.1' );
31
  define( 'PT_CV_FILE', __FILE__ );
32
  include_once( plugin_dir_path( __FILE__ ) . 'includes/defines.php' );
33
 
@@ -78,6 +78,8 @@ if ( is_admin() ) {
78
  include_once( plugin_dir_path( __FILE__ ) . 'admin/includes/options.php' );
79
  }
80
 
 
 
81
  /**
82
  * Common settings
83
  */
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
  /*
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
  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
  */
includes/functions.php CHANGED
@@ -170,7 +170,7 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
170
  *
171
  * @param string $field The full name of setting to get value
172
  * @param array $array_to_get Array to get values of wanted setting
173
- * @param type | null $assign The value to assign if setting is not found
174
  */
175
  static function setting_value( $field, $array_to_get, $assign = NULL ) {
176
  return isset( $array_to_get[$field] ) ? $array_to_get[$field] : $assign;
@@ -785,6 +785,7 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
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
 
789
  // Get pagination enable/disable
790
  $pagination = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'enable-pagination', $settings_ );
@@ -820,6 +821,9 @@ if ( ! class_exists( 'PT_CV_Functions' ) ) {
820
  $args['offset'] = $offset;
821
  }
822
  }
 
 
 
823
  }
824
 
825
  /**
170
  *
171
  * @param string $field The full name of setting to get value
172
  * @param array $array_to_get Array to get values of wanted setting
173
+ * @param mixed|null $assign The value to assign if setting is not found
174
  */
175
  static function setting_value( $field, $array_to_get, $assign = NULL ) {
176
  return isset( $array_to_get[$field] ) ? $array_to_get[$field] : $assign;
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_ );
821
  $args['offset'] = $offset;
822
  }
823
  }
824
+
825
+ $args = apply_filters( PT_CV_PREFIX_ . 'settings_args_offset', $args, $pagination, $pargs, $settings_, $limit );
826
+
827
  }
828
 
829
  /**