Version Description
- Bug fixed: Trimming excerpt of non-latin languages cause broken characters
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 1.6.8.2 |
Comparing to | |
See all releases |
Code changes from version 1.6.8.1 to 1.6.8.2
- README.txt +4 -1
- content-views.php +2 -2
- includes/functions.php +9 -10
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_i
|
|
4 |
Tags: post, posts, page, pages, query, queries, search, display, show, grid, column, layout, author, blog, categories, category, comment, content, custom, editor, filter, Formatting, image, list, meta, plugin, responsive, shortcode, excerpt, title, tag, term, Taxonomy, thumbnail, pagination, date, scrollable, slider, collapsible
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.3.1
|
7 |
-
Stable tag: 1.6.8.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -174,6 +174,9 @@ function my_move_bootstrap( $args ) {
|
|
174 |
|
175 |
== Changelog ==
|
176 |
|
|
|
|
|
|
|
177 |
= 1.6.8.1 =
|
178 |
* Bug fixed: Excerpt length
|
179 |
|
4 |
Tags: post, posts, page, pages, query, queries, search, display, show, grid, column, layout, author, blog, categories, category, comment, content, custom, editor, filter, Formatting, image, list, meta, plugin, responsive, shortcode, excerpt, title, tag, term, Taxonomy, thumbnail, pagination, date, scrollable, slider, collapsible
|
5 |
Requires at least: 3.3
|
6 |
Tested up to: 4.3.1
|
7 |
+
Stable tag: 1.6.8.2
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
174 |
|
175 |
== Changelog ==
|
176 |
|
177 |
+
= 1.6.8.2 =
|
178 |
+
* Bug fixed: Trimming excerpt of non-latin languages cause broken characters
|
179 |
+
|
180 |
= 1.6.8.1 =
|
181 |
* Bug fixed: Excerpt length
|
182 |
|
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.6.8.
|
15 |
* Author: PT Guy
|
16 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
17 |
* Text Domain: content-views
|
@@ -27,7 +27,7 @@ if ( !defined( 'WPINC' ) ) {
|
|
27 |
/*
|
28 |
* Define Constant
|
29 |
*/
|
30 |
-
define( 'PT_CV_VERSION', '1.6.8.
|
31 |
define( 'PT_CV_FILE', __FILE__ );
|
32 |
$pt_cv_path = plugin_dir_path( __FILE__ );
|
33 |
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.6.8.2
|
15 |
* Author: PT Guy
|
16 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
17 |
* Text Domain: content-views
|
27 |
/*
|
28 |
* Define Constant
|
29 |
*/
|
30 |
+
define( 'PT_CV_VERSION', '1.6.8.2' );
|
31 |
define( 'PT_CV_FILE', __FILE__ );
|
32 |
$pt_cv_path = plugin_dir_path( __FILE__ );
|
33 |
include_once( $pt_cv_path . 'includes/defines.php' );
|
includes/functions.php
CHANGED
@@ -249,16 +249,10 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
249 |
*/
|
250 |
static function trim_words( $result, $num_words ) {
|
251 |
// Split words
|
252 |
-
$array = preg_split( "/[\
|
253 |
array_splice( $array, $num_words );
|
254 |
$result = implode( ' ', $array );
|
255 |
|
256 |
-
// Changes double line-breaks in the text into HTML paragraphs (<p>, <br>)
|
257 |
-
$dargs = PT_CV_Functions::get_global_variable( 'dargs' );
|
258 |
-
if ( !empty( $dargs[ 'field-settings' ][ 'content' ][ 'allow_html' ] ) || apply_filters( PT_CV_PREFIX_ . 'wpautop', 0 ) ) {
|
259 |
-
$result = wpautop( $result );
|
260 |
-
}
|
261 |
-
|
262 |
return $result;
|
263 |
}
|
264 |
|
@@ -270,13 +264,13 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
270 |
* @return string
|
271 |
*/
|
272 |
static function pt_strip_tags( $string ) {
|
273 |
-
|
274 |
$string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
|
275 |
|
276 |
-
|
277 |
$string = preg_replace( '/\[:[a-z]{0,2}\]/', '', $string );
|
278 |
|
279 |
-
|
280 |
$dargs = PT_CV_Functions::get_global_variable( 'dargs' );
|
281 |
$allowed_tags = '';
|
282 |
if ( !empty( $dargs[ 'field-settings' ][ 'content' ][ 'allow_html' ] ) ) {
|
@@ -284,6 +278,11 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
284 |
$allowed_tags = implode( '', $allowable_tags );
|
285 |
}
|
286 |
|
|
|
|
|
|
|
|
|
|
|
287 |
$string = strip_tags( $string, $allowed_tags );
|
288 |
|
289 |
return trim( $string );
|
249 |
*/
|
250 |
static function trim_words( $result, $num_words ) {
|
251 |
// Split words
|
252 |
+
$array = preg_split( "/[\t ]+/", $result, $num_words + 1, PREG_SPLIT_NO_EMPTY );
|
253 |
array_splice( $array, $num_words );
|
254 |
$result = implode( ' ', $array );
|
255 |
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
return $result;
|
257 |
}
|
258 |
|
264 |
* @return string
|
265 |
*/
|
266 |
static function pt_strip_tags( $string ) {
|
267 |
+
// Remove script, style tags
|
268 |
$string = preg_replace( '@<(script|style)[^>]*?>.*?</\\1>@si', '', $string );
|
269 |
|
270 |
+
// Remove language tag of qTranslateX 3.4.4
|
271 |
$string = preg_replace( '/\[:[a-z]{0,2}\]/', '', $string );
|
272 |
|
273 |
+
// Predefined allowable HTML tags
|
274 |
$dargs = PT_CV_Functions::get_global_variable( 'dargs' );
|
275 |
$allowed_tags = '';
|
276 |
if ( !empty( $dargs[ 'field-settings' ][ 'content' ][ 'allow_html' ] ) ) {
|
278 |
$allowed_tags = implode( '', $allowable_tags );
|
279 |
}
|
280 |
|
281 |
+
// Changes double line-breaks in the text into HTML paragraphs (<p>, <br>)
|
282 |
+
if ( apply_filters( PT_CV_PREFIX_ . 'wpautop', 0 ) ) {
|
283 |
+
$string = wpautop( $string );
|
284 |
+
}
|
285 |
+
|
286 |
$string = strip_tags( $string, $allowed_tags );
|
287 |
|
288 |
return trim( $string );
|