Version Description
- 2022/01/26 =
- Updated for WordPress 5.9
Download this release
Release Info
Developer | PT Guy |
Plugin | Content Views – Post Grid & List for WordPress |
Version | 2.4.0.5 |
Comparing to | |
See all releases |
Code changes from version 2.4.0.4 to 2.4.0.5
- README.txt +4 -1
- content-views.php +2 -2
- includes/formatting.php +1 -1
- includes/values.php +6 -1
README.txt
CHANGED
@@ -4,7 +4,7 @@ Donate link: https://www.contentviewspro.com/?utm_source=wordpress&utm_medium=pl
|
|
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.
|
8 |
License: GPLv2 or later
|
9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -159,6 +159,9 @@ If you are using "Your latest posts" as home page, you should paste this code `<
|
|
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 |
|
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.5
|
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.5 - 2022/01/26 =
|
163 |
+
* Updated for WordPress 5.9
|
164 |
+
|
165 |
= 2.4.0.4 - 2022/01/26 =
|
166 |
* Fix error and deprecation with PHP 8.0 and 8.1
|
167 |
|
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.5
|
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.5' );
|
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
@@ -19,7 +19,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
19 |
* @return string
|
20 |
*/
|
21 |
function cv_sanitize_vid( $view_id ) {
|
22 |
-
return preg_replace( '/[\W]/', '', $view_id );
|
23 |
}
|
24 |
|
25 |
/**
|
19 |
* @return string
|
20 |
*/
|
21 |
function cv_sanitize_vid( $view_id ) {
|
22 |
+
return preg_replace( '/[\W]/', '', (string) $view_id );
|
23 |
}
|
24 |
|
25 |
/**
|
includes/values.php
CHANGED
@@ -263,12 +263,17 @@ if ( !class_exists( 'PT_CV_Values' ) ) {
|
|
263 |
$show = 'display_name';
|
264 |
|
265 |
$args = array(
|
266 |
-
'who' => 'authors',
|
267 |
'fields' => array( 'ID', $show, 'user_login' ),
|
268 |
'orderby' => 'display_name',
|
269 |
'order' => 'ASC',
|
270 |
);
|
271 |
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
$users = get_users( apply_filters( PT_CV_PREFIX_ . 'user_list', $args ) );
|
273 |
foreach ( (array) $users as $user ) {
|
274 |
$user->ID = (int) $user->ID;
|
263 |
$show = 'display_name';
|
264 |
|
265 |
$args = array(
|
|
|
266 |
'fields' => array( 'ID', $show, 'user_login' ),
|
267 |
'orderby' => 'display_name',
|
268 |
'order' => 'ASC',
|
269 |
);
|
270 |
|
271 |
+
if ( version_compare( $GLOBALS['wp_version'], '5.9', '>=' ) ) {
|
272 |
+
$args[ 'capability' ] = array( 'edit_posts' );
|
273 |
+
} else {
|
274 |
+
$args[ 'who' ] = 'authors';
|
275 |
+
}
|
276 |
+
|
277 |
$users = get_users( apply_filters( PT_CV_PREFIX_ . 'user_list', $args ) );
|
278 |
foreach ( (array) $users as $user ) {
|
279 |
$user->ID = (int) $user->ID;
|