Plugin Directory

Changeset 3268218


Ignore:
Timestamp:
04/08/2025 04:31:27 AM (11 months ago)
Author:
rpetersen29
Message:

v3.0.6

Location:
simple-banner
Files:
2 edited
10 copied

Legend:

Unmodified
Added
Removed
  • simple-banner/tags/3.0.6/readme.txt

    r3264130 r3268218  
    55Requires at least: 3.0.1
    66Tested up to: 6.7.2
    7 Stable tag: 3.0.5
     7Stable tag: 3.0.6
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    100100== Changelog ==
    101101
     102= 3.0.6 =
     103* Clear caches on settings save
     104
    102105= 3.0.5 =
    103106* Test against wp 6.7.2, minor bugfixes
     
    361364== Upgrade Notice ==
    362365
     366= 3.0.6 =
     367* Clear caches on settings save
     368
    363369= 3.0.5 =
    364370* Test against wp 6.7.2, minor bugfixes
  • simple-banner/tags/3.0.6/simple-banner.php

    r3264130 r3268218  
    44 * Plugin URI: https://github.com/rpetersen29/simple-banner
    55 * Description: Display a simple banner at the top or bottom of your website. Now with multi-banner support
    6  * Version: 3.0.5
     6 * Version: 3.0.6
    77 * Author: Ryan Petersen
    88 * Author URI: http://rpetersen29.github.io/
     
    1010 *
    1111 * @package Simple Banner
    12  * @version 3.0.5
     12 * @version 3.0.6
    1313 * @author Ryan Petersen <rpetersen.dev@gmail.com>
    1414 */
    15 define ('SB_VERSION', '3.0.5');
     15define ('SB_VERSION', '3.0.6');
    1616
    1717register_activation_hook( __FILE__, 'simple_banner_activate' );
     
    358358        )
    359359    );
     360    register_setting( 'simple-banner-settings-group', 'simple_banner_clear_cache',
     361        array(
     362            'sanitize_callback' => 'wp_filter_nohtml_kses'
     363        )
     364    );
    360365
    361366    for ($i = 1; $i <= get_num_banners(); $i++) {
     
    670675            <?php include 'pro_features_general_settings.php' ?>
    671676
     677            <?php
     678                // Flip value to ensure changed value on every save
     679                $value = get_option('simple_banner_clear_cache') ? '' : '1';
     680                echo '<input hidden type="text" value="'. $value . '" name="simple_banner_clear_cache" />';
     681            ?>
    672682            <!-- Save Changes Button -->
    673683            <?php submit_button(); ?>
     
    982992}
    983993
    984 // Clear cache on save
    985 function clear_all_caches() {
     994/**
     995 * Clear 3rd party cache on save
     996 */
     997// Hack: Set hidden variable to always change on save
     998// TODO: Find better way of making sure cache is cleared on save
     999add_action( 'update_option_simple_banner_clear_cache', 'clear_all_caches', 10, 3 );
     1000
     1001function clear_all_caches($old_value, $value, $option) {
    9861002    try {
    987         $this->clearW3TotalCache();
    988         $this->clearWPSuperCache();
    989         $this->clearWPEngineCache();
    990         $this->clearWPFastestCache();
    991         $this->clearWPRocket();
    992         $this->clearAutoOptimizeCache();
    993         $this->clearLiteSpeedCache();
    994         $this->clearHummingbirdCache();
     1003        clearW3TotalCache();
     1004        clearWPSuperCache();
     1005        clearWPEngineCache();
     1006        clearWPFastestCache();
     1007        clearWPRocket();
     1008        clearAutoOptimizeCache();
     1009        clearLiteSpeedCache();
     1010        clearHummingbirdCache();
    9951011       
    9961012        return true;
     
    10291045    foreach ($methods as $method) {
    10301046        if (method_exists('WpeCommon', $method)) {
    1031             // WpeCommon::$method();  // Currently commented out in original code
     1047            // WpeCommon::$method();
    10321048        }
    10331049    }
  • simple-banner/trunk/readme.txt

    r3264130 r3268218  
    55Requires at least: 3.0.1
    66Tested up to: 6.7.2
    7 Stable tag: 3.0.5
     7Stable tag: 3.0.6
    88License: GPLv3
    99License URI: http://www.gnu.org/licenses/gpl-3.0.html
     
    100100== Changelog ==
    101101
     102= 3.0.6 =
     103* Clear caches on settings save
     104
    102105= 3.0.5 =
    103106* Test against wp 6.7.2, minor bugfixes
     
    361364== Upgrade Notice ==
    362365
     366= 3.0.6 =
     367* Clear caches on settings save
     368
    363369= 3.0.5 =
    364370* Test against wp 6.7.2, minor bugfixes
  • simple-banner/trunk/simple-banner.php

    r3264130 r3268218  
    44 * Plugin URI: https://github.com/rpetersen29/simple-banner
    55 * Description: Display a simple banner at the top or bottom of your website. Now with multi-banner support
    6  * Version: 3.0.5
     6 * Version: 3.0.6
    77 * Author: Ryan Petersen
    88 * Author URI: http://rpetersen29.github.io/
     
    1010 *
    1111 * @package Simple Banner
    12  * @version 3.0.5
     12 * @version 3.0.6
    1313 * @author Ryan Petersen <rpetersen.dev@gmail.com>
    1414 */
    15 define ('SB_VERSION', '3.0.5');
     15define ('SB_VERSION', '3.0.6');
    1616
    1717register_activation_hook( __FILE__, 'simple_banner_activate' );
     
    358358        )
    359359    );
     360    register_setting( 'simple-banner-settings-group', 'simple_banner_clear_cache',
     361        array(
     362            'sanitize_callback' => 'wp_filter_nohtml_kses'
     363        )
     364    );
    360365
    361366    for ($i = 1; $i <= get_num_banners(); $i++) {
     
    670675            <?php include 'pro_features_general_settings.php' ?>
    671676
     677            <?php
     678                // Flip value to ensure changed value on every save
     679                $value = get_option('simple_banner_clear_cache') ? '' : '1';
     680                echo '<input hidden type="text" value="'. $value . '" name="simple_banner_clear_cache" />';
     681            ?>
    672682            <!-- Save Changes Button -->
    673683            <?php submit_button(); ?>
     
    982992}
    983993
    984 // Clear cache on save
    985 function clear_all_caches() {
     994/**
     995 * Clear 3rd party cache on save
     996 */
     997// Hack: Set hidden variable to always change on save
     998// TODO: Find better way of making sure cache is cleared on save
     999add_action( 'update_option_simple_banner_clear_cache', 'clear_all_caches', 10, 3 );
     1000
     1001function clear_all_caches($old_value, $value, $option) {
    9861002    try {
    987         $this->clearW3TotalCache();
    988         $this->clearWPSuperCache();
    989         $this->clearWPEngineCache();
    990         $this->clearWPFastestCache();
    991         $this->clearWPRocket();
    992         $this->clearAutoOptimizeCache();
    993         $this->clearLiteSpeedCache();
    994         $this->clearHummingbirdCache();
     1003        clearW3TotalCache();
     1004        clearWPSuperCache();
     1005        clearWPEngineCache();
     1006        clearWPFastestCache();
     1007        clearWPRocket();
     1008        clearAutoOptimizeCache();
     1009        clearLiteSpeedCache();
     1010        clearHummingbirdCache();
    9951011       
    9961012        return true;
     
    10291045    foreach ($methods as $method) {
    10301046        if (method_exists('WpeCommon', $method)) {
    1031             // WpeCommon::$method();  // Currently commented out in original code
     1047            // WpeCommon::$method();
    10321048        }
    10331049    }
Note: See TracChangeset for help on using the changeset viewer.