Version Description
- 2022/01/26 =
- Fix error and deprecation with PHP 8.0 and 8.1
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 2.4.0.4 |
Comparing to | |
See all releases |
Code changes from version 2.4.0.3 to 2.4.0.4
- README.txt +6 -3
- content-views.php +2 -2
- includes/formatting.php +19 -1
- includes/functions.php +1 -1
README.txt
CHANGED
@@ -3,8 +3,8 @@ 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 list, post, page, category, responsive, list, thumbnail
|
5 |
Requires at least: 3.3
|
6 |
-
Tested up to: 5.
|
7 |
-
Stable tag: 2.4.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -159,8 +159,11 @@ If you are using "Your latest posts" as home page, you should paste this code `<
|
|
159 |
|
160 |
== Changelog ==
|
161 |
|
|
|
|
|
|
|
162 |
= 2.4.0.3 - 2022/01/17 =
|
163 |
-
*
|
164 |
|
165 |
= 2.4.0.2 - 2021/07/19 =
|
166 |
* Tested up to WordPress 5.8
|
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 list, post, page, category, responsive, list, thumbnail
|
5 |
Requires at least: 3.3
|
6 |
+
Tested up to: 5.9
|
7 |
+
Stable tag: 2.4.0.4
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
159 |
|
160 |
== Changelog ==
|
161 |
|
162 |
+
= 2.4.0.4 - 2022/01/26 =
|
163 |
+
* Fix error and deprecation with PHP 8.0 and 8.1
|
164 |
+
|
165 |
= 2.4.0.3 - 2022/01/17 =
|
166 |
+
* Fix a bug with PHP 8.0
|
167 |
|
168 |
= 2.4.0.2 - 2021/07/19 =
|
169 |
* Tested up to WordPress 5.8
|
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.4.0.
|
14 |
* Author: Content Views
|
15 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
* Text Domain: content-views-query-and-display-post-page
|
@@ -24,7 +24,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
24 |
}
|
25 |
|
26 |
// Define Constant
|
27 |
-
define( 'PT_CV_VERSION', '2.4.0.
|
28 |
define( 'PT_CV_FILE', __FILE__ );
|
29 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
30 |
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.4.0.4
|
14 |
* Author: Content Views
|
15 |
* Author URI: http://profiles.wordpress.org/pt-guy
|
16 |
* Text Domain: content-views-query-and-display-post-page
|
24 |
}
|
25 |
|
26 |
// Define Constant
|
27 |
+
define( 'PT_CV_VERSION', '2.4.0.4' );
|
28 |
define( 'PT_CV_FILE', __FILE__ );
|
29 |
define( 'PT_CV_PATH', plugin_dir_path( __FILE__ ) );
|
30 |
include_once( PT_CV_PATH . 'includes/defines.php' );
|
includes/formatting.php
CHANGED
@@ -63,10 +63,28 @@ if ( !function_exists( 'cv_esc_sql' ) ) {
|
|
63 |
|
64 |
global $wpdb;
|
65 |
if ( method_exists( $wpdb, 'remove_placeholder_escape' ) ) {
|
66 |
-
return
|
67 |
} else {
|
68 |
return $result;
|
69 |
}
|
70 |
}
|
71 |
|
72 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
63 |
|
64 |
global $wpdb;
|
65 |
if ( method_exists( $wpdb, 'remove_placeholder_escape' ) ) {
|
66 |
+
return cv_remove_placeholder_escape( $result );
|
67 |
} else {
|
68 |
return $result;
|
69 |
}
|
70 |
}
|
71 |
|
72 |
}
|
73 |
+
|
74 |
+
function cv_remove_placeholder_escape( $data ) {
|
75 |
+
global $wpdb;
|
76 |
+
if ( is_array( $data ) ) {
|
77 |
+
foreach ( $data as $k => $v ) {
|
78 |
+
if ( is_array( $v ) ) {
|
79 |
+
$data[ $k ] = cv_remove_placeholder_escape( $v );
|
80 |
+
} else {
|
81 |
+
$data[ $k ] = $wpdb->remove_placeholder_escape( $v );
|
82 |
+
}
|
83 |
+
}
|
84 |
+
} else {
|
85 |
+
$data = $wpdb->remove_placeholder_escape( $data );
|
86 |
+
}
|
87 |
+
|
88 |
+
return $data;
|
89 |
+
}
|
90 |
+
|
includes/functions.php
CHANGED
@@ -215,7 +215,7 @@ if ( !class_exists( 'PT_CV_Functions' ) ) {
|
|
215 |
* @return array
|
216 |
*/
|
217 |
static function string_to_array( $string, $delimiter = ',' ) {
|
218 |
-
return is_array( $string ) ? $string : (array) explode( $delimiter, (string) str_replace( ' ', '', $string ) );
|
219 |
}
|
220 |
|
221 |
/**
|
215 |
* @return array
|
216 |
*/
|
217 |
static function string_to_array( $string, $delimiter = ',' ) {
|
218 |
+
return is_array( $string ) ? $string : (array) explode( $delimiter, (string) str_replace( ' ', '', (string) $string ) );
|
219 |
}
|
220 |
|
221 |
/**
|