Version Description
- June 27 2016 =
- Fix: Conflict with Autoptimize plugin (when enabled
forced JS in HEAD
) - Fix: Incorrect number of words in excerpt when uses
\xC2\xA0
or
as space - Improvement: Able to resize Preview box
- Tweak: Add filter hook to create custom output completely
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 1.8.6 |
Comparing to | |
See all releases |
Code changes from version 1.8.5 to 1.8.6
- README.txt +29 -35
- admin/assets/css/admin.css +1 -0
- admin/includes/options.php +3 -0
- admin/views/view.php +2 -2
- content-views.php +3 -2
- includes/3rd-plugins.php +17 -0
- includes/functions.php +17 -13
- includes/html-viewtype.php +2 -2
- includes/html.php +11 -9
- languages/content-views-query-and-display-post-page.po +3 -3
- public/assets/js/public.js +2 -1
README.txt
CHANGED
@@ -1,63 +1,51 @@
|
|
1 |
-
=== Display
|
2 |
Contributors: pt-guy
|
3 |
Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JGUF974QBRKQE
|
4 |
-
Tags:
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 4.5.
|
7 |
-
Stable tag: 1.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
-
Display any
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
-
|
16 |
|
17 |
-
* display
|
18 |
-
* display
|
19 |
-
*
|
20 |
-
* sort
|
21 |
-
* display post
|
22 |
-
* display featured image
|
23 |
-
|
24 |
-
|
|
|
25 |
|
26 |
-
It provides you
|
27 |
|
28 |
* Step 1 : Filter any posts (by ID, category, tag, author, keyword, status)
|
29 |
-
* Step 2 : Select
|
30 |
-
* Step 3 : Paste shortcode
|
31 |
|
32 |
|
33 |
[youtube https://www.youtube.com/watch?v=drxqtCiaw4I]
|
34 |
|
35 |
|
36 |
-
= Plugin features: =
|
37 |
-
|
38 |
-
* display posts, pages in responsive, mobile friendly layouts (Grid, Scrollable list, Collapsible list) without coding
|
39 |
-
* filter any posts (by post ID, category, tag, post author, keyword, post status)
|
40 |
-
* sort posts by ID, title, date in ascending, descending order
|
41 |
-
* limit number of posts to display
|
42 |
-
* enable/disable pagination
|
43 |
-
* select what info of post (thumbnail, title, content, meta fields) to display
|
44 |
-
* select thumbnail size of post (thumbnail, medium, large, full)
|
45 |
-
* display full post content, or display post excerpt with specific number of words
|
46 |
-
* select what meta-fields (post date, post author, category, tag, comment count) to display
|
47 |
-
* custom actions, filters hook anywhere to customize output
|
48 |
-
|
49 |
= Premium features: =
|
50 |
|
51 |
* Most amazing layouts: Pinterest, Masonry, Facebook Timeline...
|
52 |
-
* Unlimited
|
53 |
-
* Replace
|
54 |
* Support custom post type plugins: WooCommerce, Easy Digital Downloads, Events Manager...
|
55 |
* Support custom field plugins: Advanced Custom Fields, Pods framework, Toolset Types...
|
56 |
* Support membership plugins: Paid Memberships Pro, Members, Ultimate Member
|
57 |
* Support translation plugins: WPML, Polylang, qTranslate
|
58 |
-
* Filterable
|
59 |
-
* Nice animation on mouse over
|
60 |
-
* Ajax
|
61 |
* And much more...
|
62 |
|
63 |
[Get Content Views Pro](http://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Get Content Views Pro").
|
@@ -128,6 +116,12 @@ If you are using "Your latest posts" as home page, you should paste this code `<
|
|
128 |
|
129 |
== Changelog ==
|
130 |
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
= 1.8.5 - May 27 2016 =
|
132 |
* New: Add setting to configure responsive output for Mobile, Tablet devices easily
|
133 |
* Update: Hide all notices of other plugins in Add/Edit View page
|
1 |
+
=== Display Posts Grid, List 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, grid, post grid, grid post, recent post, query, column, author, category, tag, responsive, excerpt, title, taxonomy, thumbnail, pagination, date, scrollable, collapsible
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 4.5.3
|
7 |
+
Stable tag: 1.8.6
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
11 |
+
Display recent or any posts by category, tag, author, ID in responsive grid, list layout easier than ever.
|
12 |
|
13 |
== Description ==
|
14 |
|
15 |
+
Content Views helps you to display latest posts on any page, and more:
|
16 |
|
17 |
+
* display posts by category, tag, author, ID, keyword, status
|
18 |
+
* display pages by author, ID, keyword, status
|
19 |
+
* display children of a parent page
|
20 |
+
* sort posts by title, date, ID
|
21 |
+
* display any post data: featured image, title, full content or excerpt, meta data (date, author, category, tag, comment count)
|
22 |
+
* display featured image in any size (thumbnail, medium, large, full...)
|
23 |
+
* limit number of posts to display
|
24 |
+
* enable/disable pagination (ajax, non-ajax)
|
25 |
+
* custom actions, filters hook for developers
|
26 |
|
27 |
+
It provides you a friendly form to filter & display posts quickly, in 3 simple steps:
|
28 |
|
29 |
* Step 1 : Filter any posts (by ID, category, tag, author, keyword, status)
|
30 |
+
* Step 2 : Select layout (grid, scrollable list, collapsible list) to display your posts. You can choose to display any post data (title, featured image, full content or excerpt, meta data)
|
31 |
+
* Step 3 : Paste generated shortcode to anywhere you want (page content, text widget, theme template file...)
|
32 |
|
33 |
|
34 |
[youtube https://www.youtube.com/watch?v=drxqtCiaw4I]
|
35 |
|
36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
37 |
= Premium features: =
|
38 |
|
39 |
* Most amazing layouts: Pinterest, Masonry, Facebook Timeline...
|
40 |
+
* Unlimited output with drag & drop, custom font, unlimited color...
|
41 |
+
* Replace layout of Category page, Blog page, Search result page, Archive page... by amazing layout
|
42 |
* Support custom post type plugins: WooCommerce, Easy Digital Downloads, Events Manager...
|
43 |
* Support custom field plugins: Advanced Custom Fields, Pods framework, Toolset Types...
|
44 |
* Support membership plugins: Paid Memberships Pro, Members, Ultimate Member
|
45 |
* Support translation plugins: WPML, Polylang, qTranslate
|
46 |
+
* Filterable output by categories, tags... with cool animation
|
47 |
+
* Nice animation on mouse over featured image
|
48 |
+
* Ajax pagination: load more, infinite scroll
|
49 |
* And much more...
|
50 |
|
51 |
[Get Content Views Pro](http://www.contentviewspro.com/?utm_source=wordpress&utm_medium=plugin&utm_campaign=content-views "Get Content Views Pro").
|
116 |
|
117 |
== Changelog ==
|
118 |
|
119 |
+
= 1.8.6 - June 27 2016 =
|
120 |
+
* Fix: Conflict with Autoptimize plugin (when enabled `forced JS in HEAD`)
|
121 |
+
* Fix: Incorrect number of words in excerpt when uses `\xC2\xA0` or ` ` as space
|
122 |
+
* Improvement: Able to resize Preview box
|
123 |
+
* Tweak: Add filter hook to create custom output completely
|
124 |
+
|
125 |
= 1.8.5 - May 27 2016 =
|
126 |
* New: Add setting to configure responsive output for Mobile, Tablet devices easily
|
127 |
* Update: Hide all notices of other plugins in Add/Edit View page
|
admin/assets/css/admin.css
CHANGED
@@ -213,6 +213,7 @@ html {
|
|
213 |
|
214 |
/* Preview */
|
215 |
#pt-cv-preview-box {
|
|
|
216 |
margin-bottom: 5px;
|
217 |
height: 300px;
|
218 |
padding: 20px;
|
213 |
|
214 |
/* Preview */
|
215 |
#pt-cv-preview-box {
|
216 |
+
resize: vertical;
|
217 |
margin-bottom: 5px;
|
218 |
height: 300px;
|
219 |
padding: 20px;
|
admin/includes/options.php
CHANGED
@@ -58,6 +58,9 @@ if ( !class_exists( 'PT_Options_Framework' ) ) {
|
|
58 |
* @param array $dependence_ Global dependence array
|
59 |
*/
|
60 |
public static function _dependence_assign( $dependence, $random_id, &$dependence_ ) {
|
|
|
|
|
|
|
61 |
$dependence_[ $dependence[ 0 ] ][] = array( $random_id, $dependence[ 1 ], isset( $dependence[ 2 ] ) ? $dependence[ 2 ] : '=' );
|
62 |
}
|
63 |
|
58 |
* @param array $dependence_ Global dependence array
|
59 |
*/
|
60 |
public static function _dependence_assign( $dependence, $random_id, &$dependence_ ) {
|
61 |
+
if ( !isset( $dependence[ 1 ] ) ) {
|
62 |
+
return;
|
63 |
+
}
|
64 |
$dependence_[ $dependence[ 0 ] ][] = array( $random_id, $dependence[ 1 ], isset( $dependence[ 2 ] ) ? $dependence[ 2 ] : '=' );
|
65 |
}
|
66 |
|
admin/views/view.php
CHANGED
@@ -39,8 +39,8 @@ PT_CV_Functions::view_submit();
|
|
39 |
if ( $id ) {
|
40 |
?>
|
41 |
<div>
|
42 |
-
<div class="view-code">For page, widget...
|
43 |
-
<div class="view-code">For theme file
|
44 |
<?php echo apply_filters( PT_CV_PREFIX_ . 'view_actions', '<a class="btn btn-info pull-right" target="_blank" href="http://www.contentviewspro.com/?utm_source=client&utm_medium=view">Get Pro version</a>', $id ) ?>
|
45 |
</div>
|
46 |
<div class="clear"></div>
|
39 |
if ( $id ) {
|
40 |
?>
|
41 |
<div>
|
42 |
+
<div class="view-code">For page content, text widget... <input class="form-control" style="width: 190px;background-color: #ADFFAD;margin-right: 50px;" type="text" value="[pt_view id="<?php echo $id ?>"]" onclick="this.select()" readonly=""></div>
|
43 |
+
<div class="view-code">For theme file <input class="form-control" style="width: 370px;" type="text" value='<?php echo do_shortcode("[pt_view id=<?php echo $id ?>]"); ?>' onclick="this.select()" readonly=""></div>
|
44 |
<?php echo apply_filters( PT_CV_PREFIX_ . 'view_actions', '<a class="btn btn-info pull-right" target="_blank" href="http://www.contentviewspro.com/?utm_source=client&utm_medium=view">Get Pro version</a>', $id ) ?>
|
45 |
</div>
|
46 |
<div class="clear"></div>
|
content-views.php
CHANGED
@@ -11,7 +11,7 @@
|
|
11 |
* Plugin Name: Content Views
|
12 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
13 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
14 |
-
* Version: 1.8.
|
15 |
* Author: PT Guy
|
16 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
17 |
* Text Domain: content-views-query-and-display-post-page
|
@@ -26,12 +26,13 @@ if ( !defined( 'WPINC' ) ) {
|
|
26 |
}
|
27 |
|
28 |
// Define Constant
|
29 |
-
define( 'PT_CV_VERSION', '1.8.
|
30 |
define( 'PT_CV_FILE', __FILE__ );
|
31 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
32 |
include_once( PT_CV_PATH . 'includes/defines.php' );
|
33 |
|
34 |
// Include library files
|
|
|
35 |
include_once( PT_CV_PATH . 'includes/assets.php' );
|
36 |
include_once( PT_CV_PATH . 'includes/functions.php' );
|
37 |
include_once( PT_CV_PATH . 'includes/hooks.php' );
|
11 |
* Plugin Name: Content Views
|
12 |
* Plugin URI: http://wordpress.org/plugins/content-views-query-and-display-post-page/
|
13 |
* Description: Query and display <strong>posts, pages</strong> in awesome layouts (<strong>grid, scrollable list, collapsible list</strong>) easier than ever, without coding!
|
14 |
+
* Version: 1.8.6
|
15 |
* Author: PT Guy
|
16 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
17 |
* Text Domain: content-views-query-and-display-post-page
|
26 |
}
|
27 |
|
28 |
// Define Constant
|
29 |
+
define( 'PT_CV_VERSION', '1.8.6' );
|
30 |
define( 'PT_CV_FILE', __FILE__ );
|
31 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
32 |
include_once( PT_CV_PATH . 'includes/defines.php' );
|
33 |
|
34 |
// Include library files
|
35 |
+
include_once( PT_CV_PATH . 'includes/3rd-plugins.php' );
|
36 |
include_once( PT_CV_PATH . 'includes/assets.php' );
|
37 |
include_once( PT_CV_PATH . 'includes/functions.php' );
|
38 |
include_once( PT_CV_PATH . 'includes/hooks.php' );
|
includes/3rd-plugins.php
ADDED
@@ -0,0 +1,17 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
<?php
|
2 |
+
|
3 |
+
/**
|
4 |
+
* Resolved conflict with other plugins
|
5 |
+
*
|
6 |
+
* @package PT_Content_Views
|
7 |
+
* @author PT Guy <http://www.contentviewspro.com/>
|
8 |
+
* @license GPL-2.0+
|
9 |
+
* @link http://www.contentviewspro.com/
|
10 |
+
* @copyright 2016 PT Guy
|
11 |
+
*/
|
12 |
+
# Autoptimize: Disable "Force JavaScript in <head>"
|
13 |
+
add_filter( 'autoptimize_filter_js_defer', 'cv_filter_js_defer', 10, 1 );
|
14 |
+
function cv_filter_js_defer( $defer ) {
|
15 |
+
$defer = "defer ";
|
16 |
+
return $defer;
|
17 |
+
}
|
includes/functions.php
CHANGED
@@ -253,9 +253,14 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
253 |
* @param type $text
|
254 |
*/
|
255 |
static function cv_strip_shortcodes( $text ) {
|
256 |
-
|
257 |
-
$
|
258 |
-
|
|
|
|
|
|
|
|
|
|
|
259 |
|
260 |
return preg_replace( '/'
|
261 |
. '\[' // Opening bracket
|
@@ -274,8 +279,8 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
274 |
* @return string
|
275 |
*/
|
276 |
static function trim_words( $result, $num_words ) {
|
277 |
-
|
278 |
-
$array = preg_split( "/
|
279 |
array_splice( $array, $num_words );
|
280 |
$result = implode( ' ', $array );
|
281 |
|
@@ -615,7 +620,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
615 |
*/
|
616 |
static function view_process_settings( $view_id, $settings, $pargs = array() ) {
|
617 |
if ( empty( $settings[ PT_CV_PREFIX . 'view-type' ] ) ) {
|
618 |
-
return sprintf( __( 'Empty settings (View %s
|
619 |
}
|
620 |
|
621 |
// Check duplicated
|
@@ -633,11 +638,8 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
633 |
}
|
634 |
|
635 |
// Get View settings
|
636 |
-
$view_settings
|
637 |
-
|
638 |
-
$view_settings[ $key ] = esc_sql( $value );
|
639 |
-
}
|
640 |
-
$pt_cv_glb[ $pt_cv_id ][ 'view_settings' ] = $view_settings;
|
641 |
|
642 |
$content_type = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'content-type', $view_settings );
|
643 |
$view_type = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'view-type', $view_settings );
|
@@ -650,6 +652,8 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
650 |
// Keep current ID
|
651 |
$pt_cv_cur_id = $view_id;
|
652 |
|
|
|
|
|
653 |
if ( defined( 'PT_CV_DOING_PAGINATION' ) ) {
|
654 |
$session_data = self::get_session( PT_CV_PREFIX . 'view-data-' . $view_id, array( 'args' => '', 'dargs' => '' ) );
|
655 |
$args = $session_data[ 'args' ];
|
@@ -658,7 +662,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
658 |
|
659 |
if ( empty( $args ) || empty( $dargs ) ) {
|
660 |
$dargs = PT_CV_Functions::view_display_settings( $view_type, $dargs );
|
661 |
-
$args = PT_CV_Functions::view_filter_settings( $content_type, $view_settings );
|
662 |
|
663 |
// Store view data before get pagination settings
|
664 |
self::set_session( PT_CV_PREFIX . 'view-data-' . $view_id, array(
|
@@ -680,7 +684,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
680 |
do_action( PT_CV_PREFIX_ . 'add_global_variables' );
|
681 |
|
682 |
// Validate settings, if some required parameters are missing, show error and exit
|
683 |
-
$error = apply_filters( PT_CV_PREFIX_ . 'validate_settings', array(), $args );
|
684 |
if ( $error ) {
|
685 |
return ( implode( '</p><p>', $error ) );
|
686 |
}
|
253 |
* @param type $text
|
254 |
*/
|
255 |
static function cv_strip_shortcodes( $text ) {
|
256 |
+
$trans_key = 'cv_tagregexp';
|
257 |
+
$tagregexp = get_transient( $trans_key );
|
258 |
+
if ( false === $tagregexp ) {
|
259 |
+
global $shortcode_tags;
|
260 |
+
$tagnames = array_keys( $shortcode_tags );
|
261 |
+
$tagregexp = join( '|', array_map( 'preg_quote', $tagnames ) );
|
262 |
+
set_transient( $trans_key, $tagregexp, 7 * DAY_IN_SECONDS );
|
263 |
+
}
|
264 |
|
265 |
return preg_replace( '/'
|
266 |
. '\[' // Opening bracket
|
279 |
* @return string
|
280 |
*/
|
281 |
static function trim_words( $result, $num_words ) {
|
282 |
+
$spaces = function_exists( 'wp_spaces_regexp' ) ? wp_spaces_regexp() : '[\r\n\t ]|\xC2\xA0| ';
|
283 |
+
$array = preg_split( "/$spaces/", $result, $num_words + 1, PREG_SPLIT_NO_EMPTY );
|
284 |
array_splice( $array, $num_words );
|
285 |
$result = implode( ' ', $array );
|
286 |
|
620 |
*/
|
621 |
static function view_process_settings( $view_id, $settings, $pargs = array() ) {
|
622 |
if ( empty( $settings[ PT_CV_PREFIX . 'view-type' ] ) ) {
|
623 |
+
return sprintf( __( 'Empty settings (View %s does not exist)', 'content-views-query-and-display-post-page' ), "<strong>$view_id</strong>" );
|
624 |
}
|
625 |
|
626 |
// Check duplicated
|
638 |
}
|
639 |
|
640 |
// Get View settings
|
641 |
+
$view_settings = array_map( 'esc_sql', $settings );
|
642 |
+
$pt_cv_glb[ $pt_cv_id ][ 'view_settings' ] = $view_settings;
|
|
|
|
|
|
|
643 |
|
644 |
$content_type = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'content-type', $view_settings );
|
645 |
$view_type = PT_CV_Functions::setting_value( PT_CV_PREFIX . 'view-type', $view_settings );
|
652 |
// Keep current ID
|
653 |
$pt_cv_cur_id = $view_id;
|
654 |
|
655 |
+
$rebuild = isset( $view_settings[ PT_CV_PREFIX . 'rebuild' ] ) ? $view_settings[ PT_CV_PREFIX . 'rebuild' ] : false;
|
656 |
+
|
657 |
if ( defined( 'PT_CV_DOING_PAGINATION' ) ) {
|
658 |
$session_data = self::get_session( PT_CV_PREFIX . 'view-data-' . $view_id, array( 'args' => '', 'dargs' => '' ) );
|
659 |
$args = $session_data[ 'args' ];
|
662 |
|
663 |
if ( empty( $args ) || empty( $dargs ) ) {
|
664 |
$dargs = PT_CV_Functions::view_display_settings( $view_type, $dargs );
|
665 |
+
$args = $rebuild ? $rebuild : PT_CV_Functions::view_filter_settings( $content_type, $view_settings );
|
666 |
|
667 |
// Store view data before get pagination settings
|
668 |
self::set_session( PT_CV_PREFIX . 'view-data-' . $view_id, array(
|
684 |
do_action( PT_CV_PREFIX_ . 'add_global_variables' );
|
685 |
|
686 |
// Validate settings, if some required parameters are missing, show error and exit
|
687 |
+
$error = !$rebuild ? apply_filters( PT_CV_PREFIX_ . 'validate_settings', array(), $args ) : false;
|
688 |
if ( $error ) {
|
689 |
return ( implode( '</p><p>', $error ) );
|
690 |
}
|
includes/html-viewtype.php
CHANGED
@@ -69,7 +69,7 @@ if ( !class_exists( 'PT_CV_Html_ViewType' ) ) {
|
|
69 |
$columns_item = array_chunk( $content_items, $columns, true );
|
70 |
|
71 |
// Get responsive class
|
72 |
-
$res_class = apply_filters( PT_CV_PREFIX_ . 'item_col_class', array(), 6 );
|
73 |
|
74 |
// Get HTML of each row
|
75 |
foreach ( $columns_item as $items_per_row ) {
|
@@ -81,7 +81,7 @@ if ( !class_exists( 'PT_CV_Html_ViewType' ) ) {
|
|
81 |
$_span_width = ( $count == $columns && $idx + 1 == $count ) ? $span_width_last : $span_width;
|
82 |
|
83 |
// Wrap content of item
|
84 |
-
$item_classes = array_merge( array( $span_class . $_span_width
|
85 |
$item_class = implode( ' ', array_filter( $item_classes ) );
|
86 |
$row_html[] = PT_CV_Html::content_item_wrap( $content_item, $item_class, $post_id );
|
87 |
|
69 |
$columns_item = array_chunk( $content_items, $columns, true );
|
70 |
|
71 |
// Get responsive class
|
72 |
+
$res_class = apply_filters( PT_CV_PREFIX_ . 'item_col_class', array( $class ), 6 );
|
73 |
|
74 |
// Get HTML of each row
|
75 |
foreach ( $columns_item as $items_per_row ) {
|
81 |
$_span_width = ( $count == $columns && $idx + 1 == $count ) ? $span_width_last : $span_width;
|
82 |
|
83 |
// Wrap content of item
|
84 |
+
$item_classes = array_merge( array( $span_class . $_span_width ), $res_class );
|
85 |
$item_class = implode( ' ', array_filter( $item_classes ) );
|
86 |
$row_html[] = PT_CV_Html::content_item_wrap( $content_item, $item_class, $post_id );
|
87 |
|
includes/html.php
CHANGED
@@ -201,15 +201,17 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
201 |
}
|
202 |
|
203 |
$fields_html = apply_filters( PT_CV_PREFIX_ . 'fields_html', $fields_html, $post );
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
|
|
|
|
213 |
}
|
214 |
}
|
215 |
|
201 |
}
|
202 |
|
203 |
$fields_html = apply_filters( PT_CV_PREFIX_ . 'fields_html', $fields_html, $post );
|
204 |
+
$content = apply_filters( PT_CV_PREFIX_ . 'view_type_custom_output', $content, $fields_html, $post );
|
205 |
+
if ( !$content ) {
|
206 |
+
// Get HTML content of view type, with specific style
|
207 |
+
$file_path = apply_filters( PT_CV_PREFIX_ . 'view_type_file', $view_type_dir . '/' . 'html' . '/' . $style . '.' . 'php' );
|
208 |
+
|
209 |
+
if ( file_exists( $file_path ) ) {
|
210 |
+
ob_start();
|
211 |
+
// Include, not include_once
|
212 |
+
include $file_path;
|
213 |
+
$content = ob_get_clean();
|
214 |
+
}
|
215 |
}
|
216 |
}
|
217 |
|
languages/content-views-query-and-display-post-page.po
CHANGED
@@ -1,8 +1,8 @@
|
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Content Views\n"
|
4 |
-
"POT-Creation-Date: 2016-
|
5 |
-
"PO-Revision-Date: 2016-
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: PT Guy <support@contentviewspro.com>\n"
|
8 |
"MIME-Version: 1.0\n"
|
@@ -280,7 +280,7 @@ msgstr ""
|
|
280 |
|
281 |
#: code/includes/functions.php:618
|
282 |
#, php-format
|
283 |
-
msgid "Empty settings (View %s
|
284 |
msgstr ""
|
285 |
|
286 |
#: code/includes/hooks.php:59
|
1 |
msgid ""
|
2 |
msgstr ""
|
3 |
"Project-Id-Version: Content Views\n"
|
4 |
+
"POT-Creation-Date: 2016-06-09 09:47+0700\n"
|
5 |
+
"PO-Revision-Date: 2016-06-09 09:47+0700\n"
|
6 |
"Last-Translator: \n"
|
7 |
"Language-Team: PT Guy <support@contentviewspro.com>\n"
|
8 |
"MIME-Version: 1.0\n"
|
280 |
|
281 |
#: code/includes/functions.php:618
|
282 |
#, php-format
|
283 |
+
msgid "Empty settings (View %s does not exist)"
|
284 |
msgstr ""
|
285 |
|
286 |
#: code/includes/hooks.php:59
|
public/assets/js/public.js
CHANGED
@@ -141,7 +141,8 @@
|
|
141 |
sid: session_id,
|
142 |
page: selected_page,
|
143 |
lang: PT_CV_PUBLIC.lang,
|
144 |
-
ajax_nonce: PT_CV_PUBLIC._nonce
|
|
|
145 |
};
|
146 |
|
147 |
// Sent POST request
|
141 |
sid: session_id,
|
142 |
page: selected_page,
|
143 |
lang: PT_CV_PUBLIC.lang,
|
144 |
+
ajax_nonce: PT_CV_PUBLIC._nonce,
|
145 |
+
custom_data: window.cvdata
|
146 |
};
|
147 |
|
148 |
// Sent POST request
|