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

Version Description

  • 2019/01/29 =
  • Security improvement: Prevent direct access to plugin files
  • Compatibility: Ensure the full post content (created by "Beaver Builder" plugin) in View is as same as in single post page
  • Fix: PHP notice when listing authors
Download this release

Release Info

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

Code changes from version 2.1.2 to 2.1.3

README.txt CHANGED
@@ -1,10 +1,10 @@
1
- === Content Views - Post Grid & List for WordPress ===
2
  Contributors: pt-guy
3
  Donate link: https://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=donate
4
  Tags: post grid, grid plugin, grid, latest post, display post, post, page, category, responsive, list, thumbnail
5
  Requires at least: 3.3
6
- Tested up to: 4.9.8
7
- Stable tag: 2.1.2
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -14,21 +14,21 @@ Create beautiful grid and list of WordPress posts, pages in minutes. No coding r
14
 
15
  = WordPress Post Grid and List Plugin =
16
 
17
- We believe that a beautiful grid and list of posts with make your WordPress site stand out and keep visitors engaged. That's why we built [Content Views](https://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Content Views"), a WordPress post grid and list plugin that's EASY and POWERFUL.
18
 
19
- Content Views helps you to create beautiful recent posts grid, category posts grid, tag posts grid, author posts grid, and other types of grid for your WordPress site in minutes, without any line of code!
20
 
21
- Content Views is a 100% mobile responsive posts grid solution, so your grid of posts will always look great on all devices (mobiles, tablets, and desktops).
22
 
23
- Content Views' grids are also highly optimized for performance, to help improve SEO and conversions.
24
 
25
  There is no more pain of creating WordPress posts grid and list.
26
 
27
  = Easy to Use =
28
 
29
- Content Views requires no time to learn, no coding skill to create beautiful grid and list of posts for your WordPress site. There is a friendly form of settings to help you create your grid and list easily. All settings are well organized, with clear descriptions. There is a live preview panel to see your posts grid instantly. All things were designed to help you create your WordPress posts grid and list in minutes, without hiring a developer.
30
 
31
- There are 3 simple steps to design your WordPress grid by Content Views:
32
  * Step 1: Filter any posts you want to show (with many possible options: ID, category, tag, author, keyword, status).
33
  * Step 2: Select beautiful grid or list layout to display your posts. You can customize the grid and list in your own way with many useful settings.
34
  * Step 3: Paste generated shortcode to anywhere you want to display your grid of posts.
@@ -39,7 +39,7 @@ There are 3 simple steps to design your WordPress grid by Content Views:
39
 
40
  We have all the settings you need to filter and display any WordPress posts, pages in responsive grid and list layout easily, without coding.
41
 
42
- The full Content Views feature list:
43
 
44
  * 100% Responsive and Mobile Friendly
45
  * SEO friendly and optimized for speed
@@ -62,11 +62,11 @@ The full Content Views feature list:
62
  * Show posts in Scrollable list, a simple slider of posts
63
  * Easy to customize and extend with many custom WordPress actions, filters hook
64
 
65
- Give Content Views a try, and create your WordPress posts grid effortlessly!
66
 
67
  = More Features For Your WordPress Grid =
68
 
69
- There is Pro version of Content Views plugin that comes with many more valuable features to supercharge your WordPress posts grid and list.
70
  [Upgrade to Pro](https://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views).
71
 
72
  The Pro feature list:
@@ -131,7 +131,7 @@ In WordPress Admin menu, click Content Views > Add New
131
 
132
  = What is 'View'? =
133
 
134
- 'View' is a custom post type which Content Views plugin stores all settings to filter & display your posts
135
 
136
  = How many Views I can create? =
137
 
@@ -152,7 +152,7 @@ If you are using "Your latest posts" as home page, you should paste this code `<
152
 
153
  == Screenshots ==
154
 
155
- 1. Content Views plugin overview
156
  2. Display Setting form to customize output of queried posts at front-end
157
  3. Query and display in Grid layout (Show Title, Thumbnail)
158
  4. Query and display in Grid layout (Show Title, Thumbnail, Content) with Pagination
@@ -163,6 +163,11 @@ If you are using "Your latest posts" as home page, you should paste this code `<
163
 
164
  == Changelog ==
165
 
 
 
 
 
 
166
  = 2.1.2 - 2018/10/19 =
167
  * Fix: Non-Ajax pagination in custom taxonomy archives causes 404 error
168
 
1
+ === ContentViews - Post Grid & List for WordPress ===
2
  Contributors: pt-guy
3
  Donate link: https://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=donate
4
  Tags: post grid, grid plugin, grid, latest post, display post, post, page, category, responsive, list, thumbnail
5
  Requires at least: 3.3
6
+ Tested up to: 5.0.3
7
+ Stable tag: 2.1.3
8
  License: GPLv2 or later
9
  License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
14
 
15
  = WordPress Post Grid and List Plugin =
16
 
17
+ We believe that a beautiful grid and list of posts with make your WordPress site stand out and keep visitors engaged. That's why we built [ContentViews](https://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "ContentViews"), a WordPress post grid and list plugin that's EASY and POWERFUL.
18
 
19
+ ContentViews helps you to create beautiful recent posts grid, category posts grid, tag posts grid, author posts grid, and other types of grid for your WordPress site in minutes, without any line of code!
20
 
21
+ ContentViews is a 100% mobile responsive posts grid solution, so your grid of posts will always look great on all devices (mobiles, tablets, and desktops).
22
 
23
+ ContentViews also highly optimized for performance, to help improve SEO and conversions.
24
 
25
  There is no more pain of creating WordPress posts grid and list.
26
 
27
  = Easy to Use =
28
 
29
+ ContentViews requires no time to learn, no coding skill to create beautiful grid and list of posts for your WordPress site. There is a friendly form of settings to help you create your grid and list easily. All settings are well organized, with clear descriptions. There is a live preview panel to see your posts grid instantly. All things were designed to help you create your WordPress posts grid and list in minutes, without hiring a developer.
30
 
31
+ There are 3 simple steps to design your WordPress grid by ContentViews:
32
  * Step 1: Filter any posts you want to show (with many possible options: ID, category, tag, author, keyword, status).
33
  * Step 2: Select beautiful grid or list layout to display your posts. You can customize the grid and list in your own way with many useful settings.
34
  * Step 3: Paste generated shortcode to anywhere you want to display your grid of posts.
39
 
40
  We have all the settings you need to filter and display any WordPress posts, pages in responsive grid and list layout easily, without coding.
41
 
42
+ The full ContentViews feature list:
43
 
44
  * 100% Responsive and Mobile Friendly
45
  * SEO friendly and optimized for speed
62
  * Show posts in Scrollable list, a simple slider of posts
63
  * Easy to customize and extend with many custom WordPress actions, filters hook
64
 
65
+ Give ContentViews a try, and create your WordPress posts grid effortlessly!
66
 
67
  = More Features For Your WordPress Grid =
68
 
69
+ There is Pro version of ContentViews plugin that comes with many more valuable features to supercharge your WordPress posts grid and list.
70
  [Upgrade to Pro](https://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views).
71
 
72
  The Pro feature list:
131
 
132
  = What is 'View'? =
133
 
134
+ 'View' is a custom post type, which is used to store all settings to filter & display your posts
135
 
136
  = How many Views I can create? =
137
 
152
 
153
  == Screenshots ==
154
 
155
+ 1. ContentViews plugin overview
156
  2. Display Setting form to customize output of queried posts at front-end
157
  3. Query and display in Grid layout (Show Title, Thumbnail)
158
  4. Query and display in Grid layout (Show Title, Thumbnail, Content) with Pagination
163
 
164
  == Changelog ==
165
 
166
+ = 2.1.3 - 2019/01/29 =
167
+ * Security improvement: Prevent direct access to plugin files
168
+ * Compatibility: Ensure the full post content (created by "Beaver Builder" plugin) in View is as same as in single post page
169
+ * Fix: PHP notice when listing authors
170
+
171
  = 2.1.2 - 2018/10/19 =
172
  * Fix: Non-Ajax pagination in custom taxonomy archives causes 404 error
173
 
admin/content-views-admin.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * Content Views Admin
5
  *
@@ -9,6 +8,10 @@
9
  * @link http://www.contentviewspro.com/
10
  * @copyright 2014 PT Guy
11
  */
 
 
 
 
12
  class PT_Content_Views_Admin {
13
 
14
  /**
1
  <?php
 
2
  /**
3
  * Content Views Admin
4
  *
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  class PT_Content_Views_Admin {
16
 
17
  /**
admin/includes/options.php CHANGED
@@ -10,6 +10,10 @@
10
  * @link http://www.contentviewspro.com/
11
  * @copyright 2014 PT Guy
12
  */
 
 
 
 
13
  if ( !class_exists( 'PT_Options_Framework' ) ) {
14
 
15
  class PT_Options_Framework {
10
  * @link http://www.contentviewspro.com/
11
  * @copyright 2014 PT Guy
12
  */
13
+ if ( !defined( 'ABSPATH' ) ) {
14
+ exit;
15
+ }
16
+
17
  if ( !class_exists( 'PT_Options_Framework' ) ) {
18
 
19
  class PT_Options_Framework {
admin/includes/plugin.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  if ( !class_exists( 'PT_CV_Plugin' ) ) {
12
 
13
  /**
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  if ( !class_exists( 'PT_CV_Plugin' ) ) {
16
 
17
  /**
admin/includes/templates/settings-section-one.php CHANGED
@@ -1 +1,6 @@
 
 
 
 
 
1
  <p style="margin-top:10px">Thank you for using Content Views (version <code><?php echo esc_html( PT_CV_Functions::plugin_info( PT_CV_FILE, 'Version' ) ); ?></code>).</p>
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+ ?>
6
  <p style="margin-top:10px">Thank you for using Content Views (version <code><?php echo esc_html( PT_CV_Functions::plugin_info( PT_CV_FILE, 'Version' ) ); ?></code>).</p>
admin/includes/templates/settings-section-two.php CHANGED
@@ -1,3 +1,8 @@
 
 
 
 
 
1
  <style>
2
  #pt-cv-features {
3
  padding: 0;
1
+ <?php
2
+ if ( !defined( 'ABSPATH' ) ) {
3
+ exit;
4
+ }
5
+ ?>
6
  <style>
7
  #pt-cv-features {
8
  padding: 0;
admin/views/admin.php CHANGED
@@ -8,6 +8,9 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
11
  ?>
12
 
13
  <div class="wrap">
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
  ?>
15
 
16
  <div class="wrap">
admin/views/view.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  // Check if using Wordpress version 3.7 or higher
12
  $version_gt_37 = PT_CV_Functions::wp_version_compare( '3.7' );
13
 
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  // Check if using Wordpress version 3.7 or higher
16
  $version_gt_37 = PT_CV_Functions::wp_version_compare( '3.7' );
17
 
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: 2.1.2
14
  * Author: CVSOFT LLC
15
  * Author URI: http://profiles.wordpress.org/pt-guy
16
  * Text Domain: content-views-query-and-display-post-page
@@ -25,7 +25,7 @@ if ( !defined( 'ABSPATH' ) ) {
25
  }
26
 
27
  // Define Constant
28
- define( 'PT_CV_VERSION', '2.1.2' );
29
  define( 'PT_CV_FILE', __FILE__ );
30
  define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
31
  include_once( PT_CV_PATH . 'includes/defines.php' );
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: 2.1.3
14
  * Author: CVSOFT LLC
15
  * Author URI: http://profiles.wordpress.org/pt-guy
16
  * Text Domain: content-views-query-and-display-post-page
25
  }
26
 
27
  // Define Constant
28
+ define( 'PT_CV_VERSION', '2.1.3' );
29
  define( 'PT_CV_FILE', __FILE__ );
30
  define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
31
  include_once( PT_CV_PATH . 'includes/defines.php' );
includes/assets.php CHANGED
@@ -10,6 +10,10 @@
10
  * @link http://www.contentviewspro.com/
11
  * @copyright 2014 PT Guy
12
  */
 
 
 
 
13
  if ( !class_exists( 'PT_CV_Asset' ) ) {
14
 
15
  /**
10
  * @link http://www.contentviewspro.com/
11
  * @copyright 2014 PT Guy
12
  */
13
+ if ( !defined( 'ABSPATH' ) ) {
14
+ exit;
15
+ }
16
+
17
  if ( !class_exists( 'PT_CV_Asset' ) ) {
18
 
19
  /**
includes/compatibility.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2016 PT Guy
10
  */
 
 
 
 
11
  /**
12
  * Check if a plugin is active
13
  * @since 1.9.9.3
@@ -122,6 +126,20 @@ function cv_comp_plugin_cornerstone_builder() {
122
  }
123
  }
124
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
125
  /**
126
  * FacetWP
127
  * Missing posts in output when access page with parameters 'fwp_*' of FacetWP plugin
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2016 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  /**
16
  * Check if a plugin is active
17
  * @since 1.9.9.3
126
  }
127
  }
128
 
129
+ /** Beaver Builder plugin (tested with version 2.1.7.2): style of full content is not applied in View
130
+ * @since 2.1.3
131
+ */
132
+ add_filter( 'pt_cv_field_content_full', 'cv_comp_plugin_beaverbuilder', 9, 3 );
133
+ function cv_comp_plugin_beaverbuilder( $content, $fargs, $post ) {
134
+ if ( class_exists( 'FLBuilder' ) && method_exists( 'FLBuilder', 'render_content_by_id' ) ) {
135
+ ob_start();
136
+ FLBuilder::render_content_by_id( $post->ID );
137
+ $content = ob_get_clean();
138
+ }
139
+
140
+ return $content;
141
+ }
142
+
143
  /**
144
  * FacetWP
145
  * Missing posts in output when access page with parameters 'fwp_*' of FacetWP plugin
includes/defines.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  define( 'PT_CV_DOMAIN', 'content-views' );
12
  define( 'PT_CV_TEXTDOMAIN', 'content-views-query-and-display-post-page' );
13
  define( 'PT_CV_PREFIX', 'pt-cv-' );
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  define( 'PT_CV_DOMAIN', 'content-views' );
16
  define( 'PT_CV_TEXTDOMAIN', 'content-views-query-and-display-post-page' );
17
  define( 'PT_CV_PREFIX', 'pt-cv-' );
includes/formatting.php CHANGED
@@ -8,9 +8,9 @@
8
  * @since 1.9.1
9
  */
10
  // Exit if accessed directly
11
- if ( !defined( 'ABSPATH' ) )
12
  exit;
13
-
14
  /**
15
  * Sanitize View ID
16
  *
8
  * @since 1.9.1
9
  */
10
  // Exit if accessed directly
11
+ if ( !defined( 'ABSPATH' ) ) {
12
  exit;
13
+ }
14
  /**
15
  * Sanitize View ID
16
  *
includes/functions.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  if ( !function_exists( 'get_plugin_data' ) ) {
12
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
13
  }
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  if ( !function_exists( 'get_plugin_data' ) ) {
16
  require_once( ABSPATH . 'wp-admin/includes/plugin.php' );
17
  }
includes/hooks.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  if ( !class_exists( 'PT_CV_Hooks' ) ) {
12
 
13
  /**
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  if ( !class_exists( 'PT_CV_Hooks' ) ) {
16
 
17
  /**
includes/html-viewtype.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  if ( !class_exists( 'PT_CV_Html_ViewType' ) ) {
12
 
13
  /**
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  if ( !class_exists( 'PT_CV_Html_ViewType' ) ) {
16
 
17
  /**
includes/html.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  if ( !class_exists( 'PT_CV_Html' ) ) {
12
 
13
  /**
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  if ( !class_exists( 'PT_CV_Html' ) ) {
16
 
17
  /**
includes/settings.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  if ( !class_exists( 'PT_CV_Settings' ) ) {
12
 
13
  /**
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  if ( !class_exists( 'PT_CV_Settings' ) ) {
16
 
17
  /**
includes/update.php CHANGED
@@ -9,8 +9,9 @@
9
  * @copyright 2014 PT Guy
10
  */
11
  // Exit if accessed directly
12
- if ( !defined( 'ABSPATH' ) )
13
  exit;
 
14
 
15
  // Compare stored version and current version
16
  $stored_version = get_option( PT_CV_OPTION_VERSION );
9
  * @copyright 2014 PT Guy
10
  */
11
  // Exit if accessed directly
12
+ if ( !defined( 'ABSPATH' ) ) {
13
  exit;
14
+ }
15
 
16
  // Compare stored version and current version
17
  $stored_version = get_option( PT_CV_OPTION_VERSION );
includes/values.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  if ( !class_exists( 'PT_CV_Values' ) ) {
12
 
13
  /**
@@ -257,7 +261,7 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
257
  $show = 'display_name';
258
 
259
  $args = array(
260
- 'fields' => array( 'ID', $show ),
261
  'orderby' => 'display_name',
262
  'order' => 'ASC',
263
  );
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  if ( !class_exists( 'PT_CV_Values' ) ) {
16
 
17
  /**
261
  $show = 'display_name';
262
 
263
  $args = array(
264
+ 'fields' => array( 'ID', $show, 'user_login' ),
265
  'orderby' => 'display_name',
266
  'order' => 'ASC',
267
  );
public/assets/js/cv.js CHANGED
@@ -1,4 +1,4 @@
1
- /*! content-views 08-2017 */
2
  /*!
3
  * Bootstrap v3.3.5 (http://getbootstrap.com)
4
  * Copyright 2011-2015 Twitter, Inc.
@@ -14,4 +14,4 @@ function(a){var b=function(a,b){this.init(a,b)},c=null;b.prototype={init:functio
14
  * @author PT Guy <http://www.contentviewspro.com/>
15
  * @license GPL-2.0+
16
  */
17
- function(a){"use strict";a.PT_CV_Public=a.PT_CV_Public||{},PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix;a.PT_CV_Public=function(b){this.options=a.extend({},b),"undefined"==typeof this.options.skip&&this.pagination()},a.PT_CV_Public.prototype={pagination:function(){var c=this;a("."+b+"pagination."+b+"ajax").each(function(){var b=a(this),d=a(this).attr("data-totalpages"),e=a(this).attr("data-currentpage");a(this).bootstrapPaginator({bootstrapMajorVersion:3,currentPage:e?parseInt(e):1,totalPages:d?parseInt(d):1,numberOfPages:PT_CV_PUBLIC.page_to_show,shouldShowPage:function(a){if(!(d&&10>d))return!0;switch(a){case"first":case"last":return!1;default:return!0}},itemContainerClass:function(a,b,c){var d="cv-pageitem-"+("page"===a?"number":a);return d+" "+(b===c?"active":"")},onPageClicked:function(a,d,e,f){c._setup_pagination(b,f,function(){PT_CV_PUBLIC.paging=0})}})})},_setup_pagination:function(a,c,d){var e=this;if(PT_CV_PUBLIC.paging=PT_CV_PUBLIC.paging||0,!PT_CV_PUBLIC.paging&&!a.data("disabled")){PT_CV_PUBLIC.paging=1;var f=a.next("."+b+"spinner"),g=a;a.parent("."+b+"pagination-wrapper").length&&(g=a.parent("."+b+"pagination-wrapper"));var h=g.closest("."+b+"wrapper").children("."+b+"view");if(h.hasClass(b+"timeline")&&(h=h.children(".tl-items").first()),g.find("."+b+"more").length>0){var i=h.children("."+b+"page").first();i.length>0&&(h=i)}e._get_page(a,c,f,h,d)}},_get_page:function(c,d,e,f,g){var h=this,i=h._active_page(d,f,g);if(i)return g&&"function"==typeof g&&g(),void a("body").trigger(b+"pagination-finished-simple");a("body").trigger(b+"before-pagination");var j={action:"pagination_request",sid:c.attr("data-sid"),unid:c.attr("data-unid"),page:d,lang:PT_CV_PUBLIC.lang,ajax_nonce:PT_CV_PUBLIC._nonce,custom_data:window.cvdata};a.ajax({type:"POST",url:PT_CV_PUBLIC.ajaxurl,data:j,beforeSend:function(){e.addClass("active")}}).done(function(c){e.removeClass("active"),c.indexOf(b+"no-post")<0&&f.append(c),h._active_page(d,f,g),g&&"function"==typeof g&&g(),a("body").trigger(b+"pagination-finished",[f,a(c)])})},_active_page:function(c,d){var e=!1,f='[data-id="'+b+"page-"+parseInt(c)+'"]';return d.children(f).length&&(e=!0,d.children().hide(),d.children(f).show(),a("html, body").animate({scrollTop:d.children(f).offset().top-160},1e3)),e}},a(function(){new a.PT_CV_Public})}(jQuery);
1
+ /*! content-views 01-2019 */
2
  /*!
3
  * Bootstrap v3.3.5 (http://getbootstrap.com)
4
  * Copyright 2011-2015 Twitter, Inc.
14
  * @author PT Guy <http://www.contentviewspro.com/>
15
  * @license GPL-2.0+
16
  */
17
+ function(a){"use strict";a.PT_CV_Public=a.PT_CV_Public||{},PT_CV_PUBLIC=PT_CV_PUBLIC||{};var b=PT_CV_PUBLIC._prefix;a.PT_CV_Public=function(b){this.options=a.extend({},b),"undefined"==typeof this.options.skip&&this.pagination()},a.PT_CV_Public.prototype={pagination:function(){var c=this;a("."+b+"pagination."+b+"ajax").each(function(){var b=a(this),d=a(this).attr("data-totalpages"),e=a(this).attr("data-currentpage");a(this).bootstrapPaginator({bootstrapMajorVersion:3,currentPage:e?parseInt(e):1,totalPages:d?parseInt(d):1,numberOfPages:PT_CV_PUBLIC.page_to_show,shouldShowPage:function(a){if(!(d&&10>d))return!0;switch(a){case"first":case"last":return!1;default:return!0}},itemContainerClass:function(a,b,c){var d="cv-pageitem-"+("page"===a?"number":a);return d+" "+(b===c?"active":"")},onPageClicked:function(a,d,e,f){c._setup_pagination(b,f,function(){PT_CV_PUBLIC.paging=0})}})})},_setup_pagination:function(a,c,d){var e=this;if(PT_CV_PUBLIC.paging=PT_CV_PUBLIC.paging||0,!PT_CV_PUBLIC.paging&&!a.data("disabled")){PT_CV_PUBLIC.paging=1;var f=a.next("."+b+"spinner"),g=a;a.parent("."+b+"pagination-wrapper").length&&(g=a.parent("."+b+"pagination-wrapper"));var h=g.closest("."+b+"wrapper").children("."+b+"view");if(h.hasClass(b+"timeline")&&(h=h.children(".tl-items").first()),g.find("."+b+"more").length>0){var i=h.children("."+b+"page").first();i.length>0&&(h=i)}e._get_page(a,c,f,h,d)}},_get_page:function(c,d,e,f,g){var h=this,i=h._active_page(d,f,g);if(i)return g&&"function"==typeof g&&g(),void a("body").trigger(b+"pagination-finished-simple");a("body").trigger(b+"before-pagination");var j={action:"pagination_request",sid:c.attr("data-sid"),unid:c.attr("data-unid"),page:d,lang:PT_CV_PUBLIC.lang,ajax_nonce:PT_CV_PUBLIC._nonce,custom_data:window.cvdata};a.ajax({type:"POST",url:PT_CV_PUBLIC.ajaxurl,data:j,beforeSend:function(){e.addClass("active")}}).done(function(c){e.removeClass("active"),c.indexOf(b+"no-post")<0&&f.append(c),h._active_page(d,f,g),g&&"function"==typeof g&&g(),a("body").trigger(b+"pagination-finished",[f,a(c)])})},_active_page:function(c,d){var e=!1,f='[data-id="'+b+"page-"+parseInt(c)+'"]';return d.children(f).length&&(e=!0,d.children().hide(),d.children(f).show(),window.cvp_pagination_no_scroll||a("html, body").animate({scrollTop:d.children(f).offset().top-160},1e3)),e}},a(function(){new a.PT_CV_Public})}(jQuery);
public/content-views.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * Content Views for Public
5
  *
@@ -9,6 +8,10 @@
9
  * @link http://www.contentviewspro.com/
10
  * @copyright 2014 PT Guy
11
  */
 
 
 
 
12
  class PT_Content_Views {
13
 
14
  /**
1
  <?php
 
2
  /**
3
  * Content Views for Public
4
  *
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  class PT_Content_Views {
16
 
17
  /**
public/templates/collapsible/html/main.php CHANGED
@@ -8,6 +8,10 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  $random_id = PT_CV_Functions::string_random();
12
  $heading = isset( $fields_html[ 'title' ] ) ? $fields_html[ 'title' ] : '';
13
  unset( $fields_html[ 'title' ] );
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  $random_id = PT_CV_Functions::string_random();
16
  $heading = isset( $fields_html[ 'title' ] ) ? $fields_html[ 'title' ] : '';
17
  unset( $fields_html[ 'title' ] );
public/templates/grid/html/main.php CHANGED
@@ -8,4 +8,8 @@
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
 
 
 
 
11
  echo implode( "\n", $fields_html );
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  echo implode( "\n", $fields_html );
public/templates/scrollable/html/main.php CHANGED
@@ -1,5 +1,4 @@
1
  <?php
2
-
3
  /**
4
  * Layout Name: Scrollable List
5
  *
@@ -9,6 +8,10 @@
9
  * @link http://www.contentviewspro.com/
10
  * @copyright 2014 PT Guy
11
  */
 
 
 
 
12
  $html = array();
13
 
14
  $ex_cap_cls = PT_CV_PREFIX . 'cap-w-img';
1
  <?php
 
2
  /**
3
  * Layout Name: Scrollable List
4
  *
8
  * @link http://www.contentviewspro.com/
9
  * @copyright 2014 PT Guy
10
  */
11
+ if ( !defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
  $html = array();
16
 
17
  $ex_cap_cls = PT_CV_PREFIX . 'cap-w-img';