Skip to content

Commit 98602fc

Browse files
committed
Release new version 2.8.7
= 2.8.7 - 2025/05/02 = * This maintenance release has 2 user identified code bug fixes. * Fix - Remove wp_ajax_nopriv_ action for not logged in user. Props @PluginVulnerabilities for reporting the issue * Fix - Call get_all_settings at init to resolve textdomain load warning. Props @adrianodownload for reporting the bug
1 parent 77064fa commit 98602fc

File tree

6 files changed

+43
-36
lines changed

6 files changed

+43
-36
lines changed

admin/admin-init.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ public function init() {
4444
$menu_hook = 'admin_menu';
4545
add_action( $menu_hook, array( $this, 'register_admin_menu' ) );
4646

47-
add_action( 'plugins_loaded', array( $this, 'get_all_settings' ), 8 );
47+
add_action( 'init', array( $this, 'get_all_settings' ), 0 );
4848
}
4949

5050
/*-----------------------------------------------------------------------------------*/

admin/admin-pages/admin-pvc-page.php

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,12 @@ class Settings extends FrameWork\Admin_UI
3131
* @var string
3232
*/
3333
private $menu_slug = 'a3-pvc';
34-
34+
3535
/**
3636
* @var array
3737
*/
3838
private $page_data;
39-
39+
4040
/*-----------------------------------------------------------------------------------*/
4141
/* __construct() */
4242
/* Settings Constructor */
@@ -45,27 +45,27 @@ public function __construct() {
4545
$this->page_init();
4646
$this->tabs_include();
4747
}
48-
48+
4949
/*-----------------------------------------------------------------------------------*/
5050
/* page_init() */
5151
/* Page Init */
5252
/*-----------------------------------------------------------------------------------*/
5353
public function page_init() {
54-
54+
5555
add_filter( $this->plugin_name . '_add_admin_menu', array( $this, 'add_admin_menu' ) );
5656
}
57-
57+
5858
/*-----------------------------------------------------------------------------------*/
5959
/* page_data() */
6060
/* Get Page Data */
6161
/*-----------------------------------------------------------------------------------*/
6262
public function page_data() {
63-
63+
6464
$page_data = array(
6565
'type' => 'submenu',
6666
'parent_slug' => 'options-general.php',
67-
'page_title' => __( 'Page Views Count', 'page-views-count' ),
68-
'menu_title' => __( 'Page Views Count', 'page-views-count' ),
67+
'page_title' => __( 'Page Views Count' ),
68+
'menu_title' => __( 'Page Views Count' ),
6969
'capability' => 'manage_options',
7070
'menu_slug' => $this->menu_slug,
7171
'function' => 'wp_pvc_admin_page_show',
@@ -74,24 +74,24 @@ public function page_data() {
7474
'script_function' => '',
7575
'view_doc' => '',
7676
);
77-
77+
7878
if ( $this->page_data ) return $this->page_data;
7979
return $this->page_data = $page_data;
80-
80+
8181
}
82-
82+
8383
/*-----------------------------------------------------------------------------------*/
8484
/* add_admin_menu() */
8585
/* Add This page to menu on left sidebar */
8686
/*-----------------------------------------------------------------------------------*/
8787
public function add_admin_menu( $admin_menu ) {
88-
88+
8989
if ( ! is_array( $admin_menu ) ) $admin_menu = array();
9090
$admin_menu[] = $this->page_data();
91-
91+
9292
return $admin_menu;
9393
}
94-
94+
9595
/*-----------------------------------------------------------------------------------*/
9696
/* tabs_include() */
9797
/* Include all tabs into this page
@@ -100,22 +100,22 @@ public function tabs_include() {
100100
global $wp_pvc_general_tab;
101101
$wp_pvc_general_tab = new FrameWork\Tabs\Global_Settings();
102102
}
103-
103+
104104
/*-----------------------------------------------------------------------------------*/
105105
/* admin_settings_page() */
106106
/* Show Settings Page */
107107
/*-----------------------------------------------------------------------------------*/
108-
public function admin_settings_page() {
108+
public function admin_settings_page() {
109109
$GLOBALS[$this->plugin_prefix.'admin_init']->admin_settings_page( $this->page_data() );
110110
}
111-
111+
112112
/*-----------------------------------------------------------------------------------*/
113113
/* admin_settings_page() */
114114
/* Show Settings Page */
115115
/*-----------------------------------------------------------------------------------*/
116116
public function callback_admin_settings_page() {
117117
global $wp_pvc_general_settings;
118-
118+
119119
$this->plugin_extension_start();
120120
$wp_pvc_general_settings->settings_form();
121121
$this->plugin_extension_end();
@@ -127,7 +127,7 @@ public function callback_admin_settings_page() {
127127
// global code
128128
namespace {
129129

130-
/**
130+
/**
131131
* wp_pvc_admin_page_show()
132132
* Define the callback function to show page content
133133
*/

admin/plugin-init.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,6 @@ function pvc_empty_daily_table_do_daily() {
9090

9191
// AJAX hide yellow message dontshow
9292
add_action('wp_ajax_pvc_yellow_message_dontshow', array('\A3Rev\PageViewsCount\A3_PVC', 'yellow_message_dontshow') );
93-
add_action('wp_ajax_nopriv_pvc_yellow_message_dontshow', array('\A3Rev\PageViewsCount\A3_PVC', 'yellow_message_dontshow') );
9493

9594
// Check upgrade functions
9695
add_action('plugins_loaded', 'pvc_lite_upgrade_plugin');

admin/settings/general-settings.php

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,9 @@ public function __construct() {
8282
//$this->subtab_init();
8383

8484
$this->form_messages = array(
85-
'success_message' => __( 'Page View Count Settings successfully saved.', 'page-views-count' ),
86-
'error_message' => __( 'Error: Page View Count Settings can not save.', 'page-views-count' ),
87-
'reset_message' => __( 'Page View Count Settings successfully reseted.', 'page-views-count' ),
85+
'success_message' => __( 'Page View Count Settings successfully saved.' ),
86+
'error_message' => __( 'Error: Page View Count Settings can not save.' ),
87+
'reset_message' => __( 'Page View Count Settings successfully reseted.' ),
8888
);
8989

9090
add_action( $this->plugin_name . '_set_default_settings' , array( $this, 'set_default_settings' ) );
@@ -315,11 +315,11 @@ public function init_form_fields() {
315315
),
316316
),
317317
),
318-
array(
318+
array(
319319
'name' => __( 'Total Views Text', 'page-views-count' ),
320320
'id' => 'total_text',
321321
'type' => 'array_textfields',
322-
'ids' => array(
322+
'ids' => array(
323323
array( 'id' => 'total_text_before',
324324
'name' => '##',
325325
'css' => 'width:200px;',
@@ -328,24 +328,24 @@ public function init_form_fields() {
328328
array( 'id' => 'total_text_after',
329329
'name' => __( 'Empty Field = Nothing Shows', 'page-views-count' ),
330330
'css' => 'width:200px;',
331-
'default' => __( 'total views', 'page-views-count' )
331+
'default' => __( 'total views', 'page-views-count' )
332332
),
333333
)
334334
),
335-
array(
335+
array(
336336
'name' => __( 'Views Today Text', 'page-views-count' ),
337337
'id' => 'today_text',
338338
'type' => 'array_textfields',
339-
'ids' => array(
339+
'ids' => array(
340340
array( 'id' => 'today_text_before',
341341
'name' => '##',
342342
'css' => 'width:200px;',
343343
'default' => '',
344344
),
345345
array( 'id' => 'today_text_after',
346-
'name' => __( 'Empty Field = Nothing Shows', 'page-views-count' ),
346+
'name' => __( 'Empty Field = Nothing Shows', 'page-views-count' ),
347347
'css' => 'width:200px;',
348-
'default' => __( 'views today', 'page-views-count' )
348+
'default' => __( 'views today', 'page-views-count' )
349349
),
350350
)
351351
),
@@ -382,13 +382,13 @@ public function init_form_fields() {
382382
'id' => 'icon_size',
383383
'default' => 'medium',
384384
'type' => 'select',
385-
'options' => array(
385+
'options' => array(
386386
'small' => __( 'Small', 'page-views-count' ),
387387
'medium' => __( 'Medium', 'page-views-count' ),
388388
'large' => __( 'Large', 'page-views-count' ),
389389
),
390390
),
391-
array(
391+
array(
392392
'name' => __( 'Icon Color', 'page-views-count' ),
393393
'id' => 'icon_color',
394394
'default' => '#000000',

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.6
5+
Version: 2.8.7
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.6' );
26+
define( 'A3_PVC_VERSION', '2.8.7' );
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.6
6+
Stable tag: 2.8.7
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.7 - 2025/05/02 =
106+
* This maintenance release has 2 user identified code bug fixes.
107+
* Fix - Remove wp_ajax_nopriv_ action for not logged in user. Props @PluginVulnerabilities for reporting the issue
108+
* Fix - Call get_all_settings at init to resolve textdomain load warning. Props @adrianodownload for reporting the bug
109+
105110
= 2.8.6 - 2025/04/28 =
106111
* This maintenance release has a bug fix that was introduced in security patch release 2.8.5 earlier today.
107112
* Fix - Correct value from post_ids array
@@ -604,6 +609,9 @@ The manual installation method involves down loading our plugin and uploading it
604609

605610
== Upgrade Notice ==
606611

612+
= 2.8.7 =
613+
This maintenance release has 2 user identified code bug fixes.
614+
607615
= 2.8.6 =
608616
This maintenance release has a bug fix that was introduced in security patch release 2.8.5 earlier today.
609617

0 commit comments

Comments
 (0)