Version Description
- March 08 2017 =
- Fix: Shortcode of "Visual Composer" plugin is visible in content of posts loaded by Ajax pagination
- Fix: Show wrong order of posts, caused by impact of "Post Types Order" plugin
- Update: Add Romania translation, thanks to "Dan Caragea"
- Update: Add Dutch translation, thanks to "At Voogt"
- Update: Add Chinese translation, thanks to "JIGE-HNM (iojpe dot com)"
- Update: Add Russian translation, thanks to @snakecom
- Tweak: Add some filters to customize authors list, thumbnail, excerpt
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 1.9.6 |
Comparing to | |
See all releases |
Code changes from version 1.9.5 to 1.9.6
- README.txt +13 -4
- content-views.php +2 -2
- includes/compatibility.php +32 -3
- includes/functions.php +7 -2
- includes/hooks.php +2 -2
- includes/html.php +2 -4
- includes/values.php +1 -1
- languages/content-views-query-and-display-post-page-nl_NL.mo +0 -0
- languages/content-views-query-and-display-post-page-ro_RO.mo +0 -0
- languages/content-views-query-and-display-post-page-ru_RU.mo +0 -0
- languages/content-views-query-and-display-post-page-zh_CN.mo +0 -0
README.txt
CHANGED
@@ -1,14 +1,14 @@
|
|
1 |
-
===
|
2 |
Contributors: PT Guy
|
3 |
Donate link: https://www.contentviewspro.com/pricing/?utm_source=wporg&utm_medium=link&utm_campaign=donate
|
4 |
Tags: post, posts, page, pages, grid, author, category, categories, tag, responsive, title, thumbnail, content
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 4.7.
|
7 |
-
Stable tag: 1.9.
|
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 |
|
@@ -116,6 +116,15 @@ If you are using "Your latest posts" as home page, you should paste this code `<
|
|
116 |
|
117 |
== Changelog ==
|
118 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
119 |
= 1.9.5 - February 08 2017 =
|
120 |
* Fix: In some cases, HTML output of excerpt is broken when allows HTML tags in excerpt
|
121 |
* Improvement: More clear and simple label, text for some settings
|
1 |
+
=== Post Grid, List for WordPress - Content Views ===
|
2 |
Contributors: PT Guy
|
3 |
Donate link: https://www.contentviewspro.com/pricing/?utm_source=wporg&utm_medium=link&utm_campaign=donate
|
4 |
Tags: post, posts, page, pages, grid, author, category, categories, tag, responsive, title, thumbnail, content
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 4.7.3
|
7 |
+
Stable tag: 1.9.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, without coding.
|
12 |
|
13 |
== Description ==
|
14 |
|
116 |
|
117 |
== Changelog ==
|
118 |
|
119 |
+
= 1.9.6 - March 08 2017 =
|
120 |
+
* Fix: Shortcode of "Visual Composer" plugin is visible in content of posts loaded by Ajax pagination
|
121 |
+
* Fix: Show wrong order of posts, caused by impact of "Post Types Order" plugin
|
122 |
+
* Update: Add Romania translation, thanks to "Dan Caragea"
|
123 |
+
* Update: Add Dutch translation, thanks to "At Voogt"
|
124 |
+
* Update: Add Chinese translation, thanks to "JIGE-HNM (iojpe dot com)"
|
125 |
+
* Update: Add Russian translation, thanks to @snakecom
|
126 |
+
* Tweak: Add some filters to customize authors list, thumbnail, excerpt
|
127 |
+
|
128 |
= 1.9.5 - February 08 2017 =
|
129 |
* Fix: In some cases, HTML output of excerpt is broken when allows HTML tags in excerpt
|
130 |
* Improvement: More clear and simple label, text for some settings
|
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.9.
|
15 |
* Author: PT Guy
|
16 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
17 |
* Text Domain: content-views-query-and-display-post-page
|
@@ -26,7 +26,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
26 |
}
|
27 |
|
28 |
// Define Constant
|
29 |
-
define( 'PT_CV_VERSION', '1.9.
|
30 |
define( 'PT_CV_FILE', __FILE__ );
|
31 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
32 |
include_once( PT_CV_PATH . 'includes/defines.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.9.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.9.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' );
|
includes/compatibility.php
CHANGED
@@ -50,9 +50,9 @@ if ( !function_exists( 'cv_facetwp_is_main_query' ) ) {
|
|
50 |
}
|
51 |
|
52 |
# "View maybe not exist" error, caused by custom filter hook (which modifies `post_type` in WordPress query) of another plugin
|
53 |
-
add_action( 'pre_get_posts', '
|
54 |
-
if ( !function_exists( '
|
55 |
-
function
|
56 |
if ( $query->get( 'cv_get_view' ) ) {
|
57 |
$query->set( 'post_type', PT_CV_POST_TYPE );
|
58 |
}
|
@@ -75,3 +75,32 @@ if ( !function_exists( 'cv_divitheme_before_generate_excerpt' ) ) {
|
|
75 |
|
76 |
}
|
77 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
50 |
}
|
51 |
|
52 |
# "View maybe not exist" error, caused by custom filter hook (which modifies `post_type` in WordPress query) of another plugin
|
53 |
+
add_action( 'pre_get_posts', 'cv_fix_no_view_found', 999 );
|
54 |
+
if ( !function_exists( 'cv_fix_no_view_found' ) ) {
|
55 |
+
function cv_fix_no_view_found( $query ) {
|
56 |
if ( $query->get( 'cv_get_view' ) ) {
|
57 |
$query->set( 'post_type', PT_CV_POST_TYPE );
|
58 |
}
|
75 |
|
76 |
}
|
77 |
|
78 |
+
/**
|
79 |
+
* Fix problem: shortcode is visible in content, when do Ajax pagination
|
80 |
+
* @since 1.9.6
|
81 |
+
*/
|
82 |
+
add_action( 'pt_cv_before_content', 'cv_fix_shortcode_visible_in_pagination', 9 );
|
83 |
+
if ( !function_exists( 'cv_fix_shortcode_visible_in_pagination' ) ) {
|
84 |
+
function cv_fix_shortcode_visible_in_pagination() {
|
85 |
+
if ( defined( 'PT_CV_DOING_PAGINATION' ) && method_exists( 'WPBMap', 'addAllMappedShortcodes' ) ) {
|
86 |
+
WPBMap::addAllMappedShortcodes();
|
87 |
+
}
|
88 |
+
}
|
89 |
+
|
90 |
+
}
|
91 |
+
|
92 |
+
add_action( 'pre_get_posts', 'cv_fix_pgp_sortby', 9 );
|
93 |
+
if ( !function_exists( 'cv_fix_pgp_sortby' ) ) {
|
94 |
+
function cv_fix_pgp_sortby( $query ) {
|
95 |
+
if ( $query->get( 'by_contentviews' ) ) {
|
96 |
+
/**
|
97 |
+
* Fix issue: Wrong posts order, caused by plugin "Post Types Order"
|
98 |
+
* @since 1.9.6
|
99 |
+
*/
|
100 |
+
$query->set( 'ignore_custom_sort', true );
|
101 |
+
}
|
102 |
+
|
103 |
+
return $query;
|
104 |
+
}
|
105 |
+
|
106 |
+
}
|
includes/functions.php
CHANGED
@@ -230,8 +230,13 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
230 |
static function cv_trim_words( $text, $num_words = 500 ) {
|
231 |
$text = apply_filters( PT_CV_PREFIX_ . 'before_generate_excerpt', $text );
|
232 |
|
233 |
-
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
235 |
return self::trim_words( $result, $num_words );
|
236 |
}
|
237 |
|
230 |
static function cv_trim_words( $text, $num_words = 500 ) {
|
231 |
$text = apply_filters( PT_CV_PREFIX_ . 'before_generate_excerpt', $text );
|
232 |
|
233 |
+
if ( apply_filters( PT_CV_PREFIX_ . 'excerpt_strip_shortcode', true ) ) {
|
234 |
+
$text = self::cv_strip_shortcodes( $text );
|
235 |
+
} else {
|
236 |
+
$text = do_shortcode( $text );
|
237 |
+
}
|
238 |
+
|
239 |
+
$result = self::cv_strip_tags( $text );
|
240 |
return self::trim_words( $result, $num_words );
|
241 |
}
|
242 |
|
includes/hooks.php
CHANGED
@@ -181,7 +181,7 @@ if ( !class_exists( 'PT_CV_Hooks' ) ) {
|
|
181 |
$return = $matches;
|
182 |
if ( !empty( $matches[ 0 ] ) ) {
|
183 |
$cv_replaced_tags[ ++$cv_replaced_idx ] = $matches[ 0 ];
|
184 |
-
$return = "
|
185 |
}
|
186 |
|
187 |
return $return;
|
@@ -189,7 +189,7 @@ if ( !class_exists( 'PT_CV_Hooks' ) ) {
|
|
189 |
|
190 |
public static function filter_after_trim_words( $content ) {
|
191 |
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'field-excerpt-allow_html' ) ) {
|
192 |
-
$content = preg_replace_callback( '
|
193 |
}
|
194 |
|
195 |
return $content;
|
181 |
$return = $matches;
|
182 |
if ( !empty( $matches[ 0 ] ) ) {
|
183 |
$cv_replaced_tags[ ++$cv_replaced_idx ] = $matches[ 0 ];
|
184 |
+
$return = "@$cv_replaced_idx@";
|
185 |
}
|
186 |
|
187 |
return $return;
|
189 |
|
190 |
public static function filter_after_trim_words( $content ) {
|
191 |
if ( PT_CV_Functions::setting_value( PT_CV_PREFIX . 'field-excerpt-allow_html' ) ) {
|
192 |
+
$content = preg_replace_callback( '/@(\d+)@/', array( __CLASS__, '_callback_after_trim_words' ), $content );
|
193 |
}
|
194 |
|
195 |
return $content;
|
includes/html.php
CHANGED
@@ -544,10 +544,8 @@ if ( !class_exists( 'PT_CV_Html' ) ) {
|
|
544 |
// Maybe add custom wrap for image
|
545 |
$html = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_image_html', $html );
|
546 |
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
return $html;
|
551 |
}
|
552 |
|
553 |
/**
|
544 |
// Maybe add custom wrap for image
|
545 |
$html = apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_image_html', $html );
|
546 |
|
547 |
+
return apply_filters( PT_CV_PREFIX_ . 'field_thumbnail_nolink', false ) ? $html :
|
548 |
+
self::_field_href( $post, $html, implode( ' ', array( PT_CV_PREFIX . 'href-thumbnail', PT_CV_PREFIX . 'thumb-' . $thumbnail_position ) ) );
|
|
|
|
|
549 |
}
|
550 |
|
551 |
/**
|
includes/values.php
CHANGED
@@ -258,7 +258,7 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
258 |
'order' => 'ASC',
|
259 |
);
|
260 |
|
261 |
-
$users = get_users( $args );
|
262 |
foreach ( (array) $users as $user ) {
|
263 |
$user->ID = (int) $user->ID;
|
264 |
$display = !empty( $user->$show ) ? $user->$show : '(' . $user->user_login . ')';
|
258 |
'order' => 'ASC',
|
259 |
);
|
260 |
|
261 |
+
$users = get_users( apply_filters( PT_CV_PREFIX_ . 'user_list', $args ) );
|
262 |
foreach ( (array) $users as $user ) {
|
263 |
$user->ID = (int) $user->ID;
|
264 |
$display = !empty( $user->$show ) ? $user->$show : '(' . $user->user_login . ')';
|
languages/content-views-query-and-display-post-page-nl_NL.mo
ADDED
Binary file
|
languages/content-views-query-and-display-post-page-ro_RO.mo
ADDED
Binary file
|
languages/content-views-query-and-display-post-page-ru_RU.mo
ADDED
Binary file
|
languages/content-views-query-and-display-post-page-zh_CN.mo
ADDED
Binary file
|