Plugin Directory

Changeset 2946254


Ignore:
Timestamp:
08/01/2023 07:36:23 PM (2 years ago)
Author:
jaz_on
Message:

Weather Station 3.8.13 released from GitHub

Location:
live-weather-station
Files:
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • live-weather-station/tags/3.8.13/admin/SystemPluginAdmin.php

    r2931891 r2946254  
    20512051     */
    20522052    private function switch_simplified() {
    2053         update_option('live_weather_station_advanced_mode', 0);
    2054         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now runs in simplified mode.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2055         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now runs in simplified mode.');
    2056         $this->switch_metric();
     2053        if( isset($_GET['lwssettingsswitchsimplifiednonce']) && wp_verify_nonce( $_GET['lwssettingsswitchsimplifiednonce'], 'lwssettingsswitchsimplifiednonce') ) {
     2054            update_option('live_weather_station_advanced_mode', 0);
     2055            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now runs in simplified mode.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2056            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now runs in simplified mode.');
     2057        } else {
     2058            wp_die('NOPE');
     2059        }
    20572060    }
    20582061
     
    20632066     */
    20642067    private function switch_extended() {
    2065         update_option('live_weather_station_advanced_mode', 1);
    2066         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now runs in extended mode.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2067         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now runs in extended mode.');
     2068        if( isset($_GET['lwssettingsswitchextendednonce']) && wp_verify_nonce( $_GET['lwssettingsswitchextendednonce'], 'lwssettingsswitchextendednonce') ) {
     2069            update_option('live_weather_station_advanced_mode', 1);
     2070            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now runs in extended mode.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2071            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now runs in extended mode.');
     2072        } else {
     2073            wp_die('NOPE');
     2074        }
    20682075    }
    20692076
     
    20742081     */
    20752082    private function switch_metric() {
    2076         self::switch_to_metric();
    2077         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now displays its data in the metric system.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2078         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now displays its data in the metric system.');
     2083        if( isset($_GET['lwssettingsswitchmetricnonce']) && wp_verify_nonce( $_GET['lwssettingsswitchmetricnonce'], 'lwssettingsswitchmetricnonce') ) {
     2084            self::switch_to_metric();
     2085            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now displays its data in the metric system.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2086            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now displays its data in the metric system.');
     2087        } else {
     2088            wp_die('NOPE');
     2089        }
    20792090    }
    20802091
     
    20852096     */
    20862097    private function switch_imperial() {
    2087         self::switch_to_imperial();
    2088         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now displays its data in the imperial system.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2089         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now displays its data in the imperial system.');
     2098        if( isset($_GET['lwssettingsswitchimperialnonce']) && wp_verify_nonce( $_GET['lwssettingsswitchimperialnonce'], 'lwssettingsswitchimperialnonce' ) ) {
     2099            self::switch_to_imperial();
     2100            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now displays its data in the imperial system.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2101            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now displays its data in the imperial system.');
     2102        } else {
     2103            wp_die('NOPE');
     2104        }
    20902105    }
    20912106
     
    20962111     */
    20972112    private function switch_full_translation() {
    2098         update_option('live_weather_station_partial_translation', 0);
    2099         $i18n = new Intl();
    2100         $i18n->delete_mo_files();
    2101         add_settings_error('lws_nonce_success', 200, sprintf(__('%s no longer uses partial translations.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2102         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station no longer uses partial translations.');
     2113        if( isset($_GET['lwssettingsswitchfulltranslationnonce']) && wp_verify_nonce( $_GET['lwssettingsswitchfulltranslationnonce'], 'lwssettingsswitchfulltranslationnonce' ) ) {
     2114            update_option('live_weather_station_partial_translation', 0);
     2115            $i18n = new Intl();
     2116            $i18n->delete_mo_files();
     2117            add_settings_error('lws_nonce_success', 200, sprintf(__('%s no longer uses partial translations.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2118            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station no longer uses partial translations.');
     2119        } else {
     2120            wp_die('NOPE');
     2121        }
    21032122    }
    21042123
     
    21092128     */
    21102129    private function switch_partial_translation() {
    2111         update_option('live_weather_station_partial_translation', 1);
    2112         $i18n = new Intl();
    2113         $i18n->cron_run();
    2114         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now uses a partial translation.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2115         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now uses a partial translation.');
     2130        if( isset($_GET['lwssettingsswitchpartialtranslationnonce']) && wp_verify_nonce( $_GET['lwssettingsswitchpartialtranslationnonce'], 'lwssettingsswitchpartialtranslationnonce' ) ) {
     2131            update_option('live_weather_station_partial_translation', 1);
     2132            $i18n = new Intl();
     2133            $i18n->cron_run();
     2134            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now uses a partial translation.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2135            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now uses a partial translation.');
     2136        } else {
     2137            wp_die('NOPE');
     2138        }
    21162139    }
    21172140
  • live-weather-station/tags/3.8.13/admin/partials/SettingsGeneral.php

    r2931891 r2946254  
    2121        <em><?php echo __('Note: if you choose the simplified mode, all settings (like display options, units, etc.) will be automatically set for you.', 'live-weather-station');?></em>
    2222    </p>
    23     <p><a class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-simplified')); ?>"><?php echo __('Switch to Simplified Mode', 'live-weather-station');?></a></p>
     23    <p><a class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-simplified'), 'lwssettingsswitchsimplifiednonce', 'lwssettingsswitchsimplifiednonce')); ?>"><?php echo __('Switch to Simplified Mode', 'live-weather-station');?></a></p>
    2424<?php } else { ?>
    2525    <p>&nbsp;</p>
    2626    <p><?php echo sprintf(__('%s runs currently in simplified mode. If you want to access all the available settings, you must switch to extended mode.', 'live-weather-station'), LWS_PLUGIN_NAME);?></p>
    27     <p><a class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-extended')); ?>"><?php echo __('Switch to Extended Mode', 'live-weather-station');?></a></p>
     27    <p><a class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-extended'), 'lwssettingsswitchextendednonce', 'lwssettingsswitchextendednonce')); ?>"><?php echo __('Switch to Extended Mode', 'live-weather-station');?></a></p>
    2828    <?php if ((0 == get_option('live_weather_station_unit_temperature'))) { ?>
    2929        <p>&nbsp;</p>
    3030        <p><?php echo sprintf(__('The data displayed by %s are in <em>metric units</em>. If that does not suit your needs, you can choose imperial units.', 'live-weather-station'), LWS_PLUGIN_NAME);?></p>
    31         <p><a class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-imperial')); ?>"><?php echo __('Display Data in Imperial Units', 'live-weather-station');?></a></p>
     31        <p><a class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-imperial'), 'lwssettingsswitchimperialnonce', 'lwssettingsswitchimperialnonce')); ?>"><?php echo __('Display Data in Imperial Units', 'live-weather-station');?></a></p>
    3232    <?php } else { ?>
    3333        <p>&nbsp;</p>
    3434        <p><?php echo sprintf(__('The data displayed by %s are in <em>imperial units</em>. If that does not suit your needs, you can choose metric units.', 'live-weather-station'), LWS_PLUGIN_NAME);?></p>
    35         <p><a class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-metric')); ?>"><?php echo __('Display Data in Metric Units', 'live-weather-station');?></a></p>
     35        <p><a class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-metric'), 'lwssettingsswitchmetricnonce', 'lwssettingsswitchmetricnonce')); ?>"><?php echo __('Display Data in Metric Units', 'live-weather-station');?></a></p>
    3636    <?php } ?>
    3737<?php } ?>
     
    4343            <?php echo sprintf(__('Currently, %s uses a partial translation of your language. If you do not like half finished things, click the button below:', 'live-weather-station'), LWS_PLUGIN_NAME);?>
    4444        </p>
    45         <p><a id="partial-translation" class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-full-translation')); ?>"><?php echo __('Use Only Full Translation', 'live-weather-station');?></a>
     45        <p><a id="partial-translation" class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-full-translation'), 'lwssettingsswitchfulltranslationnonce', 'lwssettingsswitchfulltranslationnonce')); ?>"><?php echo __('Use Only Full Translation', 'live-weather-station');?></a>
    4646            <span id="span-sync" style="display: none;"><i class="<?php echo LWS_FAS;?> fa-cog fa-spin fa-lg fa-fw"></i>&nbsp;<strong><?php echo __('Deactivating partial translation, please wait', 'live-weather-station');?>&hellip;</strong></span></p>
    4747    <?php } else { ?>
     
    4949            <?php echo sprintf(__('Currently, %s is not displayed in your language. But, there is a partial translation that can be used!', 'live-weather-station'), LWS_PLUGIN_NAME);?>
    5050        </p>
    51         <p><a id="partial-translation" class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-partial-translation')); ?>"><?php echo __('Use Partial Translation', 'live-weather-station');?></a>
     51        <p><a id="partial-translation" class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-partial-translation'), 'lwssettingsswitchpartialtranslationnonce', 'lwssettingsswitchpartialtranslationnonce')); ?>"><?php echo __('Use Partial Translation', 'live-weather-station');?></a>
    5252            <span id="span-sync" style="display: none;"><i class="<?php echo LWS_FAS;?> fa-cog fa-spin fa-lg fa-fw"></i>&nbsp;<strong><?php echo __('Activating partial translation, please wait', 'live-weather-station');?>&hellip;</strong></span></p>
    5353    <?php } ?>
  • live-weather-station/tags/3.8.13/changelog.txt

    r2931891 r2946254  
     1#3.8.13 / August 1st, 2023
     2* Improvement: nonces implemented to several lws-setting to avoid potential Cross Site Request Forgery (CSRF) attack.
     3
    14#3.8.12 / June 26th, 2023
    25* Improvement: full support for WordPress 6.2.
  • live-weather-station/tags/3.8.13/init.php

    r2931891 r2946254  
    3030//---------------------------------------------------------------------------------------------------
    3131
    32 define('LWS_VERSION', '3.8.12');
     32define('LWS_VERSION', '3.8.13');
    3333define('LWS_PREVIEW', false);
    3434
  • live-weather-station/tags/3.8.13/live-weather-station.php

    r2931891 r2946254  
    2121 * License:         GPLv2 or later
    2222 * License URI:     http://www.gnu.org/licenses/gpl-2.0.txt
    23  * Version:         3.8.12
     23 * Version:         3.8.13
    2424 */
    2525
  • live-weather-station/tags/3.8.13/readme.txt

    r2931891 r2946254  
    55Tested up to: 6.2.2
    66Requires PHP: 7.1
    7 Stable tag: 3.8.12
     7Stable tag: 3.8.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    118118Although it is not free of charge for its maintainer, I'd rather have your help to improve the plugin's code than receive money to pay for my coffee or beers. 🫶
    119119
    120 
    121 =  =
    122 
    123 
    124120== Changelog ==
    125121
  • live-weather-station/trunk/admin/SystemPluginAdmin.php

    r2931891 r2946254  
    20512051     */
    20522052    private function switch_simplified() {
    2053         update_option('live_weather_station_advanced_mode', 0);
    2054         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now runs in simplified mode.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2055         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now runs in simplified mode.');
    2056         $this->switch_metric();
     2053        if( isset($_GET['lwssettingsswitchsimplifiednonce']) && wp_verify_nonce( $_GET['lwssettingsswitchsimplifiednonce'], 'lwssettingsswitchsimplifiednonce') ) {
     2054            update_option('live_weather_station_advanced_mode', 0);
     2055            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now runs in simplified mode.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2056            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now runs in simplified mode.');
     2057        } else {
     2058            wp_die('NOPE');
     2059        }
    20572060    }
    20582061
     
    20632066     */
    20642067    private function switch_extended() {
    2065         update_option('live_weather_station_advanced_mode', 1);
    2066         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now runs in extended mode.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2067         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now runs in extended mode.');
     2068        if( isset($_GET['lwssettingsswitchextendednonce']) && wp_verify_nonce( $_GET['lwssettingsswitchextendednonce'], 'lwssettingsswitchextendednonce') ) {
     2069            update_option('live_weather_station_advanced_mode', 1);
     2070            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now runs in extended mode.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2071            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now runs in extended mode.');
     2072        } else {
     2073            wp_die('NOPE');
     2074        }
    20682075    }
    20692076
     
    20742081     */
    20752082    private function switch_metric() {
    2076         self::switch_to_metric();
    2077         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now displays its data in the metric system.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2078         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now displays its data in the metric system.');
     2083        if( isset($_GET['lwssettingsswitchmetricnonce']) && wp_verify_nonce( $_GET['lwssettingsswitchmetricnonce'], 'lwssettingsswitchmetricnonce') ) {
     2084            self::switch_to_metric();
     2085            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now displays its data in the metric system.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2086            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now displays its data in the metric system.');
     2087        } else {
     2088            wp_die('NOPE');
     2089        }
    20792090    }
    20802091
     
    20852096     */
    20862097    private function switch_imperial() {
    2087         self::switch_to_imperial();
    2088         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now displays its data in the imperial system.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2089         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now displays its data in the imperial system.');
     2098        if( isset($_GET['lwssettingsswitchimperialnonce']) && wp_verify_nonce( $_GET['lwssettingsswitchimperialnonce'], 'lwssettingsswitchimperialnonce' ) ) {
     2099            self::switch_to_imperial();
     2100            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now displays its data in the imperial system.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2101            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now displays its data in the imperial system.');
     2102        } else {
     2103            wp_die('NOPE');
     2104        }
    20902105    }
    20912106
     
    20962111     */
    20972112    private function switch_full_translation() {
    2098         update_option('live_weather_station_partial_translation', 0);
    2099         $i18n = new Intl();
    2100         $i18n->delete_mo_files();
    2101         add_settings_error('lws_nonce_success', 200, sprintf(__('%s no longer uses partial translations.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2102         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station no longer uses partial translations.');
     2113        if( isset($_GET['lwssettingsswitchfulltranslationnonce']) && wp_verify_nonce( $_GET['lwssettingsswitchfulltranslationnonce'], 'lwssettingsswitchfulltranslationnonce' ) ) {
     2114            update_option('live_weather_station_partial_translation', 0);
     2115            $i18n = new Intl();
     2116            $i18n->delete_mo_files();
     2117            add_settings_error('lws_nonce_success', 200, sprintf(__('%s no longer uses partial translations.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2118            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station no longer uses partial translations.');
     2119        } else {
     2120            wp_die('NOPE');
     2121        }
    21032122    }
    21042123
     
    21092128     */
    21102129    private function switch_partial_translation() {
    2111         update_option('live_weather_station_partial_translation', 1);
    2112         $i18n = new Intl();
    2113         $i18n->cron_run();
    2114         add_settings_error('lws_nonce_success', 200, sprintf(__('%s now uses a partial translation.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
    2115         Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now uses a partial translation.');
     2130        if( isset($_GET['lwssettingsswitchpartialtranslationnonce']) && wp_verify_nonce( $_GET['lwssettingsswitchpartialtranslationnonce'], 'lwssettingsswitchpartialtranslationnonce' ) ) {
     2131            update_option('live_weather_station_partial_translation', 1);
     2132            $i18n = new Intl();
     2133            $i18n->cron_run();
     2134            add_settings_error('lws_nonce_success', 200, sprintf(__('%s now uses a partial translation.', 'live-weather-station'), LWS_PLUGIN_NAME), 'updated');
     2135            Logger::info($this->service, null, null, null, null, null, 0, 'Weather Station now uses a partial translation.');
     2136        } else {
     2137            wp_die('NOPE');
     2138        }
    21162139    }
    21172140
  • live-weather-station/trunk/admin/partials/SettingsGeneral.php

    r2931891 r2946254  
    2121        <em><?php echo __('Note: if you choose the simplified mode, all settings (like display options, units, etc.) will be automatically set for you.', 'live-weather-station');?></em>
    2222    </p>
    23     <p><a class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-simplified')); ?>"><?php echo __('Switch to Simplified Mode', 'live-weather-station');?></a></p>
     23    <p><a class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-simplified'), 'lwssettingsswitchsimplifiednonce', 'lwssettingsswitchsimplifiednonce')); ?>"><?php echo __('Switch to Simplified Mode', 'live-weather-station');?></a></p>
    2424<?php } else { ?>
    2525    <p>&nbsp;</p>
    2626    <p><?php echo sprintf(__('%s runs currently in simplified mode. If you want to access all the available settings, you must switch to extended mode.', 'live-weather-station'), LWS_PLUGIN_NAME);?></p>
    27     <p><a class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-extended')); ?>"><?php echo __('Switch to Extended Mode', 'live-weather-station');?></a></p>
     27    <p><a class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-extended'), 'lwssettingsswitchextendednonce', 'lwssettingsswitchextendednonce')); ?>"><?php echo __('Switch to Extended Mode', 'live-weather-station');?></a></p>
    2828    <?php if ((0 == get_option('live_weather_station_unit_temperature'))) { ?>
    2929        <p>&nbsp;</p>
    3030        <p><?php echo sprintf(__('The data displayed by %s are in <em>metric units</em>. If that does not suit your needs, you can choose imperial units.', 'live-weather-station'), LWS_PLUGIN_NAME);?></p>
    31         <p><a class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-imperial')); ?>"><?php echo __('Display Data in Imperial Units', 'live-weather-station');?></a></p>
     31        <p><a class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-imperial'), 'lwssettingsswitchimperialnonce', 'lwssettingsswitchimperialnonce')); ?>"><?php echo __('Display Data in Imperial Units', 'live-weather-station');?></a></p>
    3232    <?php } else { ?>
    3333        <p>&nbsp;</p>
    3434        <p><?php echo sprintf(__('The data displayed by %s are in <em>imperial units</em>. If that does not suit your needs, you can choose metric units.', 'live-weather-station'), LWS_PLUGIN_NAME);?></p>
    35         <p><a class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-metric')); ?>"><?php echo __('Display Data in Metric Units', 'live-weather-station');?></a></p>
     35        <p><a class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-metric'), 'lwssettingsswitchmetricnonce', 'lwssettingsswitchmetricnonce')); ?>"><?php echo __('Display Data in Metric Units', 'live-weather-station');?></a></p>
    3636    <?php } ?>
    3737<?php } ?>
     
    4343            <?php echo sprintf(__('Currently, %s uses a partial translation of your language. If you do not like half finished things, click the button below:', 'live-weather-station'), LWS_PLUGIN_NAME);?>
    4444        </p>
    45         <p><a id="partial-translation" class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-full-translation')); ?>"><?php echo __('Use Only Full Translation', 'live-weather-station');?></a>
     45        <p><a id="partial-translation" class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-full-translation'), 'lwssettingsswitchfulltranslationnonce', 'lwssettingsswitchfulltranslationnonce')); ?>"><?php echo __('Use Only Full Translation', 'live-weather-station');?></a>
    4646            <span id="span-sync" style="display: none;"><i class="<?php echo LWS_FAS;?> fa-cog fa-spin fa-lg fa-fw"></i>&nbsp;<strong><?php echo __('Deactivating partial translation, please wait', 'live-weather-station');?>&hellip;</strong></span></p>
    4747    <?php } else { ?>
     
    4949            <?php echo sprintf(__('Currently, %s is not displayed in your language. But, there is a partial translation that can be used!', 'live-weather-station'), LWS_PLUGIN_NAME);?>
    5050        </p>
    51         <p><a id="partial-translation" class="button button-primary" href="<?php echo esc_url(lws_get_admin_page_url('lws-settings', 'switch-partial-translation')); ?>"><?php echo __('Use Partial Translation', 'live-weather-station');?></a>
     51        <p><a id="partial-translation" class="button button-primary" href="<?php echo esc_url(wp_nonce_url( lws_get_admin_page_url('lws-settings', 'switch-partial-translation'), 'lwssettingsswitchpartialtranslationnonce', 'lwssettingsswitchpartialtranslationnonce')); ?>"><?php echo __('Use Partial Translation', 'live-weather-station');?></a>
    5252            <span id="span-sync" style="display: none;"><i class="<?php echo LWS_FAS;?> fa-cog fa-spin fa-lg fa-fw"></i>&nbsp;<strong><?php echo __('Activating partial translation, please wait', 'live-weather-station');?>&hellip;</strong></span></p>
    5353    <?php } ?>
  • live-weather-station/trunk/changelog.txt

    r2931891 r2946254  
     1#3.8.13 / August 1st, 2023
     2* Improvement: nonces implemented to several lws-setting to avoid potential Cross Site Request Forgery (CSRF) attack.
     3
    14#3.8.12 / June 26th, 2023
    25* Improvement: full support for WordPress 6.2.
  • live-weather-station/trunk/init.php

    r2931891 r2946254  
    3030//---------------------------------------------------------------------------------------------------
    3131
    32 define('LWS_VERSION', '3.8.12');
     32define('LWS_VERSION', '3.8.13');
    3333define('LWS_PREVIEW', false);
    3434
  • live-weather-station/trunk/live-weather-station.php

    r2931891 r2946254  
    2121 * License:         GPLv2 or later
    2222 * License URI:     http://www.gnu.org/licenses/gpl-2.0.txt
    23  * Version:         3.8.12
     23 * Version:         3.8.13
    2424 */
    2525
  • live-weather-station/trunk/readme.txt

    r2931891 r2946254  
    55Tested up to: 6.2.2
    66Requires PHP: 7.1
    7 Stable tag: 3.8.12
     7Stable tag: 3.8.13
    88License: GPLv2 or later
    99License URI: http://www.gnu.org/licenses/gpl-2.0.html
     
    118118Although it is not free of charge for its maintainer, I'd rather have your help to improve the plugin's code than receive money to pay for my coffee or beers. 🫶
    119119
    120 
    121 =  =
    122 
    123 
    124120== Changelog ==
    125121
Note: See TracChangeset for help on using the changeset viewer.