Changeset 3443432
- Timestamp:
- 01/20/2026 04:32:28 PM (2 months ago)
- Location:
- post-views-counter/tags/1.7.3
- Files:
-
- 6 deleted
- 51 copied
-
. (copied) (copied from post-views-counter/trunk)
-
assets/chartjs/chart.min.css (deleted)
-
assets/chartjs/chart.min.js (copied) (copied from post-views-counter/trunk/assets/chartjs/chart.min.js)
-
assets/micromodal (copied) (copied from post-views-counter/trunk/assets/micromodal)
-
assets/microtip/microtip.css (deleted)
-
assets/microtip/microtip.min.css (copied) (copied from post-views-counter/trunk/assets/microtip/microtip.min.css)
-
blocks (copied) (copied from post-views-counter/trunk/blocks)
-
css/admin-dashboard.css (copied) (copied from post-views-counter/trunk/css/admin-dashboard.css)
-
css/admin-post.css (copied) (copied from post-views-counter/trunk/css/admin-post.css)
-
css/admin-settings.css (copied) (copied from post-views-counter/trunk/css/admin-settings.css)
-
css/admin.css (copied) (copied from post-views-counter/trunk/css/admin.css)
-
css/block-editor.css (copied) (copied from post-views-counter/trunk/css/block-editor.css)
-
css/block-editor.min.css (deleted)
-
css/column-modal.css (copied) (copied from post-views-counter/trunk/css/column-modal.css)
-
css/frontend.css (copied) (copied from post-views-counter/trunk/css/frontend.css)
-
css/gutenberg.min.css (deleted)
-
css/page-reports.png (copied) (copied from post-views-counter/trunk/css/page-reports.png)
-
includes/class-admin.php (copied) (copied from post-views-counter/trunk/includes/class-admin.php)
-
includes/class-columns.php (copied) (copied from post-views-counter/trunk/includes/class-columns.php)
-
includes/class-counter.php (copied) (copied from post-views-counter/trunk/includes/class-counter.php)
-
includes/class-crawler-detect.php (copied) (copied from post-views-counter/trunk/includes/class-crawler-detect.php)
-
includes/class-cron.php (copied) (copied from post-views-counter/trunk/includes/class-cron.php)
-
includes/class-dashboard.php (copied) (copied from post-views-counter/trunk/includes/class-dashboard.php)
-
includes/class-frontend.php (copied) (copied from post-views-counter/trunk/includes/class-frontend.php)
-
includes/class-functions.php (copied) (copied from post-views-counter/trunk/includes/class-functions.php)
-
includes/class-import.php (copied) (copied from post-views-counter/trunk/includes/class-import.php)
-
includes/class-integration-gutenberg.php (copied) (copied from post-views-counter/trunk/includes/class-integration-gutenberg.php)
-
includes/class-integrations.php (copied) (copied from post-views-counter/trunk/includes/class-integrations.php)
-
includes/class-query.php (copied) (copied from post-views-counter/trunk/includes/class-query.php)
-
includes/class-settings-api.php (copied) (copied from post-views-counter/trunk/includes/class-settings-api.php)
-
includes/class-settings-display.php (copied) (copied from post-views-counter/trunk/includes/class-settings-display.php) (2 diffs)
-
includes/class-settings-general.php (copied) (copied from post-views-counter/trunk/includes/class-settings-general.php) (2 diffs)
-
includes/class-settings-integrations.php (copied) (copied from post-views-counter/trunk/includes/class-settings-integrations.php)
-
includes/class-settings-other.php (copied) (copied from post-views-counter/trunk/includes/class-settings-other.php)
-
includes/class-settings-reports.php (copied) (copied from post-views-counter/trunk/includes/class-settings-reports.php)
-
includes/class-settings.php (copied) (copied from post-views-counter/trunk/includes/class-settings.php) (2 diffs)
-
includes/class-toolbar.php (copied) (copied from post-views-counter/trunk/includes/class-toolbar.php)
-
includes/class-update.php (copied) (copied from post-views-counter/trunk/includes/class-update.php)
-
includes/class-widgets.php (copied) (copied from post-views-counter/trunk/includes/class-widgets.php)
-
includes/functions.php (copied) (copied from post-views-counter/trunk/includes/functions.php)
-
js/admin-dashboard.js (copied) (copied from post-views-counter/trunk/js/admin-dashboard.js)
-
js/admin-post.js (copied) (copied from post-views-counter/trunk/js/admin-post.js)
-
js/admin-quick-edit.js (copied) (copied from post-views-counter/trunk/js/admin-quick-edit.js)
-
js/admin-settings.js (copied) (copied from post-views-counter/trunk/js/admin-settings.js)
-
js/admin-theme.js (copied) (copied from post-views-counter/trunk/js/admin-theme.js)
-
js/admin-widgets.js (copied) (copied from post-views-counter/trunk/js/admin-widgets.js)
-
js/block-editor.js (copied) (copied from post-views-counter/trunk/js/block-editor.js)
-
js/block-editor.min.js (deleted)
-
js/column-modal.js (copied) (copied from post-views-counter/trunk/js/column-modal.js)
-
js/counter.js (copied) (copied from post-views-counter/trunk/js/counter.js)
-
js/dummy.js (copied) (copied from post-views-counter/trunk/js/dummy.js)
-
js/frontend.js (copied) (copied from post-views-counter/trunk/js/frontend.js)
-
js/gutenberg.min.js (deleted)
-
js/integration-gutenberg.js (copied) (copied from post-views-counter/trunk/js/integration-gutenberg.js)
-
languages/post-views-counter.pot (copied) (copied from post-views-counter/trunk/languages/post-views-counter.pot)
-
post-views-counter.php (copied) (copied from post-views-counter/trunk/post-views-counter.php) (2 diffs)
-
readme.txt (copied) (copied from post-views-counter/trunk/readme.txt) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
post-views-counter/tags/1.7.3/includes/class-settings-display.php
r3442638 r3443432 387 387 388 388 if ( is_array( $input ) ) { 389 foreach ( $input as $group => $set ) { 389 foreach ( $input as $group ) { 390 // sanitize value 391 $group = sanitize_key( $group ); 392 390 393 if ( $group === 'robots' || $group === 'ai_bots' ) 391 394 continue; … … 403 406 404 407 if ( is_array( $input ) ) { 405 foreach ( $input as $role => $set ) { 408 foreach ( $input as $role ) { 409 // sanitize value 410 $role = sanitize_key( $role ); 411 406 412 if ( isset( $field['options'][$role] ) ) 407 413 $roles[] = $role; -
post-views-counter/tags/1.7.3/includes/class-settings-general.php
r3442638 r3443432 484 484 485 485 if ( is_array( $input ) ) { 486 foreach ( $input as $group => $set ) { 486 foreach ( $input as $group ) { 487 // sanitize value 488 $group = sanitize_key( $group ); 489 487 490 // disallow disabled checkboxes 488 491 if ( ! empty( $field['disabled'] ) && in_array( $group, $field['disabled'], true ) ) … … 501 504 502 505 if ( is_array( $input ) ) { 503 foreach ( $input as $role => $set ) { 506 foreach ( $input as $role ) { 507 // sanitize value 508 $role = sanitize_key( $role ); 509 504 510 if ( isset( $field['options'][$role] ) ) 505 511 $roles[] = $role; -
post-views-counter/tags/1.7.3/includes/class-settings.php
r3442638 r3443432 784 784 $pvc = Post_Views_Counter(); 785 785 786 // map exclude array to separate fields before validation (fields post as exclude[groups]/exclude[roles]) 787 if ( isset( $input['exclude'] ) && is_array( $input['exclude'] ) ) { 788 if ( isset( $input['exclude']['groups'] ) ) 789 $input['exclude_groups'] = $input['exclude']['groups']; 790 791 if ( isset( $input['exclude']['roles'] ) ) 792 $input['exclude_roles'] = $input['exclude']['roles']; 793 } 794 795 // map restrict_display array to separate fields before validation (fields post as restrict_display[groups]/restrict_display[roles]) 796 if ( isset( $input['restrict_display'] ) && is_array( $input['restrict_display'] ) ) { 797 if ( isset( $input['restrict_display']['groups'] ) ) 798 $input['restrict_display_groups'] = $input['restrict_display']['groups']; 799 800 if ( isset( $input['restrict_display']['roles'] ) ) 801 $input['restrict_display_roles'] = $input['restrict_display']['roles']; 802 } 803 786 804 // use internal settings api to validate settings first 787 805 $input = $pvc->settings_api->validate_settings( $input ); … … 796 814 797 815 // merge restrict display fields for backward compatibility 798 if ( isset( $input['restrict_ groups'] ) || isset( $input['restrict_roles'] ) ) {816 if ( isset( $input['restrict_display_groups'] ) || isset( $input['restrict_display_roles'] ) ) { 799 817 $input['restrict_display'] = [ 800 'groups' => isset( $input['restrict_ groups'] ) ? $input['restrict_groups'] : [],801 'roles' => isset( $input['restrict_ roles'] ) ? $input['restrict_roles'] : []818 'groups' => isset( $input['restrict_display_groups'] ) ? $input['restrict_display_groups'] : [], 819 'roles' => isset( $input['restrict_display_roles'] ) ? $input['restrict_display_roles'] : [] 802 820 ]; 803 unset( $input['restrict_ groups'], $input['restrict_roles'] );821 unset( $input['restrict_display_groups'], $input['restrict_display_roles'] ); 804 822 } 805 823 -
post-views-counter/tags/1.7.3/post-views-counter.php
r3443281 r3443432 3 3 Plugin Name: Post Views Counter 4 4 Description: Post Views Counter allows you to collect and display how many times a post, page, or other content has been viewed in a simple, fast and reliable way. 5 Version: 1.7. 25 Version: 1.7.3 6 6 Author: dFactory 7 7 Author URI: https://dfactory.co/ … … 110 110 'integrations' => [] 111 111 ], 112 'version' => '1.7. 2'112 'version' => '1.7.3' 113 113 ]; 114 114 -
post-views-counter/tags/1.7.3/readme.txt
r3443281 r3443432 5 5 Requires PHP: 7.0 6 6 Tested up to: 6.9 7 Stable tag: 1.7. 27 Stable tag: 1.7.3 8 8 License: MIT License 9 9 License URI: http://opensource.org/licenses/MIT … … 93 93 == Changelog == 94 94 95 = 1.7.3 = 96 * Fix: Settings validation for exclude/restrict display checkbox fields. 97 * Fix: Map nested array format to flat field keys before validation. 98 * Fix: Restrict display merge logic using correct field names. 99 95 100 = 1.7.2 = 96 101 * Fix: jQuery wrapper applied to vanilla JS files in build output. … … 435 440 == Upgrade Notice == 436 441 437 = 1.7. 2=438 Fixed jQuery wrapper applied to vanilla JS files in build output.442 = 1.7.3 = 443 Fixed settings validation for exclude visitors and restrict display checkbox fields.
Note: See TracChangeset
for help on using the changeset viewer.