Plugin Directory

Changeset 3369181


Ignore:
Timestamp:
09/28/2025 12:04:16 PM (6 months ago)
Author:
fugudesign
Message:

Update to version 1.6.2 from GitHub

Location:
maintenance-switch
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • maintenance-switch/tags/1.6.2/admin/views/maintenance-switch-admin-display.php

    r3369156 r3369181  
    8989            <h2><?php _e('Default settings', MS_SLUG); ?></h2>
    9090
    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">
    9292                <input type="hidden" name="action" value="restore_settings" />
    9393                <?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))); ?>
    9494            </form>
    9595
    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">
    9797                <input type="hidden" name="action" value="restore_html" />
    9898                <?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))); ?>
     
    100100
    101101            <?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">
    103103                    <input type="hidden" name="action" value="create_theme_file" />
    104104                    <?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))); ?>
    105105                </form>
    106106            <?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">
    108108                    <input type="hidden" name="action" value="delete_theme_file" />
    109109                    <?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))); ?>
     
    112112
    113113            <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>
    116118
    117119        </div>
  • maintenance-switch/tags/1.6.2/maintenance-switch.php

    r3369156 r3369181  
    1717 * Plugin URI:        https://wordpress.org/plugins/maintenance-switch
    1818 * Description:       Customize easily and switch in one-click to (native) maintenance mode from your backend or frontend.
    19  * Version:           1.6.1
     19 * Version:           1.6.2
    2020 * Author:            Fugu
    2121 * Author URI:        http://www.fugu.fr
  • maintenance-switch/tags/1.6.2/preview.php

    r3369156 r3369181  
    44if ( ! defined( 'WPINC' ) ) {
    55    die;
     6}
     7
     8// Security check: only allow admin users
     9if ( ! current_user_can( 'manage_options' ) ) {
     10    wp_die( __( 'Insufficient permissions to access this page.' ) );
     11}
     12
     13// Security check: verify nonce
     14if ( ! empty( $_POST['preview-code'] ) ) {
     15    if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'maintenance_switch_preview' ) ) {
     16        wp_die( __( 'Security check failed.' ) );
     17    }
    618}
    719
  • maintenance-switch/tags/1.6.2/readme.txt

    r3369156 r3369181  
    55Requires at least: 3.5
    66Tested up to: 6.3
    7 Stable tag: 1.6.1
     7Stable tag: 1.6.2
    88Requires PHP: 7.4
    99License: GPLv2 or later
  • maintenance-switch/trunk/admin/views/maintenance-switch-admin-display.php

    r3369156 r3369181  
    8989            <h2><?php _e('Default settings', MS_SLUG); ?></h2>
    9090
    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">
    9292                <input type="hidden" name="action" value="restore_settings" />
    9393                <?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))); ?>
    9494            </form>
    9595
    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">
    9797                <input type="hidden" name="action" value="restore_html" />
    9898                <?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))); ?>
     
    100100
    101101            <?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">
    103103                    <input type="hidden" name="action" value="create_theme_file" />
    104104                    <?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))); ?>
    105105                </form>
    106106            <?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">
    108108                    <input type="hidden" name="action" value="delete_theme_file" />
    109109                    <?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))); ?>
     
    112112
    113113            <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>
    116118
    117119        </div>
  • maintenance-switch/trunk/maintenance-switch.php

    r3369156 r3369181  
    1717 * Plugin URI:        https://wordpress.org/plugins/maintenance-switch
    1818 * Description:       Customize easily and switch in one-click to (native) maintenance mode from your backend or frontend.
    19  * Version:           1.6.1
     19 * Version:           1.6.2
    2020 * Author:            Fugu
    2121 * Author URI:        http://www.fugu.fr
  • maintenance-switch/trunk/preview.php

    r3369156 r3369181  
    44if ( ! defined( 'WPINC' ) ) {
    55    die;
     6}
     7
     8// Security check: only allow admin users
     9if ( ! current_user_can( 'manage_options' ) ) {
     10    wp_die( __( 'Insufficient permissions to access this page.' ) );
     11}
     12
     13// Security check: verify nonce
     14if ( ! empty( $_POST['preview-code'] ) ) {
     15    if ( ! isset( $_POST['_wpnonce'] ) || ! wp_verify_nonce( $_POST['_wpnonce'], 'maintenance_switch_preview' ) ) {
     16        wp_die( __( 'Security check failed.' ) );
     17    }
    618}
    719
  • maintenance-switch/trunk/readme.txt

    r3369156 r3369181  
    55Requires at least: 3.5
    66Tested up to: 6.3
    7 Stable tag: 1.6.1
     7Stable tag: 1.6.2
    88Requires PHP: 7.4
    99License: GPLv2 or later
Note: See TracChangeset for help on using the changeset viewer.