Skip to content

Commit 77064fa

Browse files
committed
Release new version 2.8.6
= 2.8.6 - 2025/04/28 = * This maintenance release has a bug fix that was introduced in security patch release 2.8.5 earlier today. * Fix - Correct value from post_ids array * Props - to @dmaragris for reporting the bug.
1 parent b4387e6 commit 77064fa

File tree

3 files changed

+14
-10
lines changed

3 files changed

+14
-10
lines changed

page-views-count.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
/*
33
Plugin Name: Page Views Count
44
Description: Show front end users all time views and views today on posts, pages, index pages and custom post types with the Page Views Count Plugin. Use the Page Views Count function to add page views to any content type or object created by your theme or plugins.
5-
Version: 2.8.5
5+
Version: 2.8.6
66
Requires at least: 6.0
77
Tested up to: 6.8
88
Author: a3rev Software
@@ -23,7 +23,7 @@
2323

2424
define( 'A3_PVC_KEY', 'a3_page_view_count' );
2525
define( 'A3_PVC_PREFIX', 'wp_pvc_' );
26-
define( 'A3_PVC_VERSION', '2.8.5' );
26+
define( 'A3_PVC_VERSION', '2.8.6' );
2727
define( 'A3_PVC_G_FONTS', false );
2828

2929
global $pvc_enable_ajax_load;

readme.txt

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Contributors: a3rev, a3rev Software, nguyencongtuan
33
Tags: wordpress page view, page view count , post views, post view count, gutenberg
44
Requires at least: 6.0
55
Tested up to: 6.8
6-
Stable tag: 2.8.5
6+
Stable tag: 2.8.6
77
License: GPLv3
88
License URI: http://www.gnu.org/licenses/gpl-3.0.html
99

@@ -102,6 +102,11 @@ The manual installation method involves down loading our plugin and uploading it
102102

103103
== Changelog ==
104104

105+
= 2.8.6 - 2025/04/28 =
106+
* This maintenance release has a bug fix that was introduced in security patch release 2.8.5 earlier today.
107+
* Fix - Correct value from post_ids array
108+
* Props - to @dmaragris for reporting the bug.
109+
105110
= 2.8.5 - 2025/04/28 =
106111
* This maintenance update applies 3 security patches and compatibility with WordPress 6.8 - please upgrade now.
107112
* Security Hardening - Reject the request if the key provided does not match the list of allowed keys
@@ -599,6 +604,9 @@ The manual installation method involves down loading our plugin and uploading it
599604

600605
== Upgrade Notice ==
601606

607+
= 2.8.6 =
608+
This maintenance release has a bug fix that was introduced in security patch release 2.8.5 earlier today.
609+
602610
= 2.8.5 =
603611
This maintenance update applies 3 security patches and compatibility with WordPress 6.8 - please upgrade now.
604612

src/pvc_class.php

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,16 +40,12 @@ public static function pvc_fetch_posts_stats( $post_ids ) {
4040
$nowisnow = wp_date('Y-m-d');
4141

4242
if ( !is_array( $post_ids ) ) $post_ids = array( $post_ids );
43-
$post_ids = array_map( function( $value ) {
44-
global $wpdb;
45-
return $wpdb->prepare( '%s', $value );
46-
}, $post_ids );
4743

48-
// Create placeholders for each ID
44+
// Create placeholders for each ID.
4945
$placeholders = implode(',', array_fill(0, count($post_ids), '%s'));
5046

51-
// Add $nowisnow to the end of post_ids array for the final prepare statement
52-
$prepare_values = $post_ids;
47+
// Add $nowisnow to the end of post_ids array for the final prepare statement.
48+
$prepare_values = $post_ids;
5349
$prepare_values[] = $nowisnow;
5450

5551
$sql = $wpdb->prepare(

0 commit comments

Comments
 (0)