Changeset 3300680
- Timestamp:
- 05/26/2025 12:23:14 PM (10 months ago)
- Location:
- simple-page-access-restriction/trunk
- Files:
-
- 5 edited
-
changelog.txt (modified) (1 diff)
-
includes/admin/admin.php (modified) (2 diffs)
-
includes/admin/settings/settings.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
-
simple-page-access-restriction.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
simple-page-access-restriction/trunk/changelog.txt
r3274969 r3300680 1 = Version 1.0.32 - May 24, 2025 = 2 * Security: Add nonce validation to settings and metabox handling 3 1 4 = Version 1.0.31 - April 16, 2025 = 2 5 * Test: WordPress version 6.8 -
simple-page-access-restriction/trunk/includes/admin/admin.php
r3105724 r3300680 81 81 } 82 82 83 wp_nonce_field( 'ps_simple_par_metabox_nonce', 'ps_simple_par_mb_nonce' ); 83 84 84 85 echo '<input type="checkbox" checked name="_page_access_restricted" value="0" style="display:none;" />'; … … 93 94 if ( defined( 'DOING_AUTOSAVE' ) && DOING_AUTOSAVE ) { 94 95 return; 96 } 97 98 if ( ! isset( $_POST['ps_simple_par_mb_nonce'] ) || ! wp_verify_nonce( $_POST['ps_simple_par_mb_nonce'], 'ps_simple_par_metabox_nonce' ) ) { 99 return $post_id; 95 100 } 96 101 -
simple-page-access-restriction/trunk/includes/admin/settings/settings.php
r3105724 r3300680 14 14 global $wpdb; 15 15 16 if ( isset( $_POST['ps_simple_par_save_settings'] ) ) { 16 // Ensure user has access to this page. 17 if ( ! current_user_can( 'manage_options' ) ) { 18 wp_die( esc_html__( 'You do not have sufficient permissions to access this page.', 'simple-page-access-restriction' ) ); 19 } 20 21 if ( isset( $_POST['ps_simple_par_save_settings'] ) && check_admin_referer( 'ps_simple_par_save_settings_action', 'ps_simple_par_nonce' ) ) { 17 22 // Define the input settings 18 23 $input_settings = array(); … … 85 90 <?php do_action( 'ps_simple_par_after_settings_title' ); ?> 86 91 <form method="post" action=""> 92 <?php wp_nonce_field( 'ps_simple_par_save_settings_action', 'ps_simple_par_nonce' ); ?> 87 93 <div id="ps_plugin_template_settings_tabs"> 88 94 <div id="simple-par-settings-tabs-header"> -
simple-page-access-restriction/trunk/readme.txt
r3274969 r3300680 6 6 Tags: page restrict, access restriction, page restriction, page redirect, page access restriction 7 7 Requires at least: 3.9 8 Tested up to: 6. 58 Tested up to: 6.8 9 9 Requires PHP: 5.6 10 Stable Tag: 1.0.3 110 Stable Tag: 1.0.32 11 11 License: GPL v2 or later 12 12 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 116 116 117 117 == Changelog == 118 = Version 1.0.32 - May 24, 2025 = 119 * Security: Add nonce validation to settings and metabox handling 120 118 121 = Version 1.0.31 - April 16, 2025 = 119 122 * Test: WordPress version 6.8 -
simple-page-access-restriction/trunk/simple-page-access-restriction.php
r3274969 r3300680 4 4 * Plugin URI: https://www.pluginsandsnippets.com/downloads/simple-page-access-restriction/ 5 5 * Description: This plugin offers a simple way to restrict visits to select pages only to logged-in users and allows for page redirection to a defined (login) page of your choice. 6 * Version: 1.0.3 16 * Version: 1.0.32 7 7 * Author: Plugins & Snippets 8 8 * Author URI: https://www.pluginsandsnippets.com/ … … 77 77 78 78 // Plugin related constants 79 define( 'SIMPLE_PAGE_ACCESS_RESTRICTION_VER', '1.0.3 1' );79 define( 'SIMPLE_PAGE_ACCESS_RESTRICTION_VER', '1.0.32' ); 80 80 define( 'SIMPLE_PAGE_ACCESS_RESTRICTION_NAME', 'Simple Page Access Restriction' ); 81 81 define( 'SIMPLE_PAGE_ACCESS_RESTRICTION_DIR', trailingslashit( plugin_dir_path( __FILE__ ) ) );
Note: See TracChangeset
for help on using the changeset viewer.