Changeset 3369181
- Timestamp:
- 09/28/2025 12:04:16 PM (6 months ago)
- Location:
- maintenance-switch
- Files:
-
- 8 edited
- 1 copied
-
tags/1.6.2 (copied) (copied from maintenance-switch/trunk)
-
tags/1.6.2/admin/views/maintenance-switch-admin-display.php (modified) (3 diffs)
-
tags/1.6.2/maintenance-switch.php (modified) (1 diff)
-
tags/1.6.2/preview.php (modified) (1 diff)
-
tags/1.6.2/readme.txt (modified) (1 diff)
-
trunk/admin/views/maintenance-switch-admin-display.php (modified) (3 diffs)
-
trunk/maintenance-switch.php (modified) (1 diff)
-
trunk/preview.php (modified) (1 diff)
-
trunk/readme.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
maintenance-switch/tags/1.6.2/admin/views/maintenance-switch-admin-display.php
r3369156 r3369181 89 89 <h2><?php _e('Default settings', MS_SLUG); ?></h2> 90 90 91 <form id="restore-settings-form" action="<?php echo $plugin_settings_url; ?>" method="POST" class="inline-form">91 <form id="restore-settings-form" action="<?php echo esc_url($plugin_settings_url); ?>" method="POST" class="inline-form"> 92 92 <input type="hidden" name="action" value="restore_settings" /> 93 93 <?php submit_button(__('Restore all settings', MS_SLUG), 'secondary', 'submit', false, array('data-msg' => __('Are you sure you want to retore all the default settings?', MS_SLUG))); ?> 94 94 </form> 95 95 96 <form id="restore-html-form" action="<?php echo $plugin_settings_url; ?>" method="POST" class="inline-form">96 <form id="restore-html-form" action="<?php echo esc_url($plugin_settings_url); ?>" method="POST" class="inline-form"> 97 97 <input type="hidden" name="action" value="restore_html" /> 98 98 <?php submit_button(__('Restore page HTML', MS_SLUG), 'secondary', 'submit', false, array('data-msg' => __('Are you sure you want to retore the default HTML code?', MS_SLUG))); ?> … … 100 100 101 101 <?php if (!$this->plugin->theme_file_exists()): ?> 102 <form id="create-theme-file" action="<?php echo $plugin_settings_url; ?>" method="POST" class="inline-form">102 <form id="create-theme-file" action="<?php echo esc_url($plugin_settings_url); ?>" method="POST" class="inline-form"> 103 103 <input type="hidden" name="action" value="create_theme_file" /> 104 104 <?php submit_button(__('Create file in the theme', MS_SLUG), 'secondary', 'submit', false, array('data-msg' => __('Are you sure you want to create the file in your theme?', MS_SLUG))); ?> 105 105 </form> 106 106 <?php else: ?> 107 <form id="delete-theme-file" action="<?php echo $plugin_settings_url; ?>" method="POST" class="inline-form">107 <form id="delete-theme-file" action="<?php echo esc_url($plugin_settings_url); ?>" method="POST" class="inline-form"> 108 108 <input type="hidden" name="action" value="delete_theme_file" /> 109 109 <?php submit_button(__('Delete file in the theme', MS_SLUG), 'secondary', 'submit', false, array('data-msg' => __('Are you sure you want to delete the file in your theme?', MS_SLUG))); ?> … … 112 112 113 113 <form id="preview-form" 114 data-default-action="<?php echo plugins_url('preview.php', dirname(dirname(__FILE__))); ?>" method="POST" 115 target="ms-preview"></form> 114 data-default-action="<?php echo esc_url(plugins_url('preview.php', dirname(dirname(__FILE__)))); ?>" method="POST" 115 target="ms-preview"> 116 <?php wp_nonce_field('maintenance_switch_preview'); ?> 117 </form> 116 118 117 119 </div> -
maintenance-switch/tags/1.6.2/maintenance-switch.php
r3369156 r3369181 17 17 * Plugin URI: https://wordpress.org/plugins/maintenance-switch 18 18 * Description: Customize easily and switch in one-click to (native) maintenance mode from your backend or frontend. 19 * Version: 1.6. 119 * Version: 1.6.2 20 20 * Author: Fugu 21 21 * Author URI: http://www.fugu.fr -
maintenance-switch/tags/1.6.2/preview.php
r3369156 r3369181 4 4 if ( ! defined( 'WPINC' ) ) { 5 5 die; 6 } 7 8 // Security check: only allow admin users 9 if ( ! current_user_can( 'manage_options' ) ) { 10 wp_die( __( 'Insufficient permissions to access this page.' ) ); 11 } 12 13 // Security check: verify nonce 14 if ( ! empty( $_POST['preview-code'] ) ) { 15 if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'maintenance_switch_preview' ) ) { 16 wp_die( __( 'Security check failed.' ) ); 17 } 6 18 } 7 19 -
maintenance-switch/tags/1.6.2/readme.txt
r3369156 r3369181 5 5 Requires at least: 3.5 6 6 Tested up to: 6.3 7 Stable tag: 1.6. 17 Stable tag: 1.6.2 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later -
maintenance-switch/trunk/admin/views/maintenance-switch-admin-display.php
r3369156 r3369181 89 89 <h2><?php _e('Default settings', MS_SLUG); ?></h2> 90 90 91 <form id="restore-settings-form" action="<?php echo $plugin_settings_url; ?>" method="POST" class="inline-form">91 <form id="restore-settings-form" action="<?php echo esc_url($plugin_settings_url); ?>" method="POST" class="inline-form"> 92 92 <input type="hidden" name="action" value="restore_settings" /> 93 93 <?php submit_button(__('Restore all settings', MS_SLUG), 'secondary', 'submit', false, array('data-msg' => __('Are you sure you want to retore all the default settings?', MS_SLUG))); ?> 94 94 </form> 95 95 96 <form id="restore-html-form" action="<?php echo $plugin_settings_url; ?>" method="POST" class="inline-form">96 <form id="restore-html-form" action="<?php echo esc_url($plugin_settings_url); ?>" method="POST" class="inline-form"> 97 97 <input type="hidden" name="action" value="restore_html" /> 98 98 <?php submit_button(__('Restore page HTML', MS_SLUG), 'secondary', 'submit', false, array('data-msg' => __('Are you sure you want to retore the default HTML code?', MS_SLUG))); ?> … … 100 100 101 101 <?php if (!$this->plugin->theme_file_exists()): ?> 102 <form id="create-theme-file" action="<?php echo $plugin_settings_url; ?>" method="POST" class="inline-form">102 <form id="create-theme-file" action="<?php echo esc_url($plugin_settings_url); ?>" method="POST" class="inline-form"> 103 103 <input type="hidden" name="action" value="create_theme_file" /> 104 104 <?php submit_button(__('Create file in the theme', MS_SLUG), 'secondary', 'submit', false, array('data-msg' => __('Are you sure you want to create the file in your theme?', MS_SLUG))); ?> 105 105 </form> 106 106 <?php else: ?> 107 <form id="delete-theme-file" action="<?php echo $plugin_settings_url; ?>" method="POST" class="inline-form">107 <form id="delete-theme-file" action="<?php echo esc_url($plugin_settings_url); ?>" method="POST" class="inline-form"> 108 108 <input type="hidden" name="action" value="delete_theme_file" /> 109 109 <?php submit_button(__('Delete file in the theme', MS_SLUG), 'secondary', 'submit', false, array('data-msg' => __('Are you sure you want to delete the file in your theme?', MS_SLUG))); ?> … … 112 112 113 113 <form id="preview-form" 114 data-default-action="<?php echo plugins_url('preview.php', dirname(dirname(__FILE__))); ?>" method="POST" 115 target="ms-preview"></form> 114 data-default-action="<?php echo esc_url(plugins_url('preview.php', dirname(dirname(__FILE__)))); ?>" method="POST" 115 target="ms-preview"> 116 <?php wp_nonce_field('maintenance_switch_preview'); ?> 117 </form> 116 118 117 119 </div> -
maintenance-switch/trunk/maintenance-switch.php
r3369156 r3369181 17 17 * Plugin URI: https://wordpress.org/plugins/maintenance-switch 18 18 * Description: Customize easily and switch in one-click to (native) maintenance mode from your backend or frontend. 19 * Version: 1.6. 119 * Version: 1.6.2 20 20 * Author: Fugu 21 21 * Author URI: http://www.fugu.fr -
maintenance-switch/trunk/preview.php
r3369156 r3369181 4 4 if ( ! defined( 'WPINC' ) ) { 5 5 die; 6 } 7 8 // Security check: only allow admin users 9 if ( ! current_user_can( 'manage_options' ) ) { 10 wp_die( __( 'Insufficient permissions to access this page.' ) ); 11 } 12 13 // Security check: verify nonce 14 if ( ! empty( $_POST['preview-code'] ) ) { 15 if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'maintenance_switch_preview' ) ) { 16 wp_die( __( 'Security check failed.' ) ); 17 } 6 18 } 7 19 -
maintenance-switch/trunk/readme.txt
r3369156 r3369181 5 5 Requires at least: 3.5 6 6 Tested up to: 6.3 7 Stable tag: 1.6. 17 Stable tag: 1.6.2 8 8 Requires PHP: 7.4 9 9 License: GPLv2 or later
Note: See TracChangeset
for help on using the changeset viewer.