Changeset 3468552
- Timestamp:
- 02/24/2026 10:42:54 AM (6 weeks ago)
- Location:
- adsimple-cookie-manager-for-wp/trunk
- Files:
-
- 6 edited
-
adsimple-cookie-manager.php (modified) (1 diff)
-
includes/controllers/extensions/rocket.php (modified) (1 diff)
-
includes/controllers/popup.php (modified) (1 diff)
-
includes/services/cache/loader.php (modified) (1 diff)
-
includes/services/cache/manager.php (modified) (2 diffs)
-
readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
adsimple-cookie-manager-for-wp/trunk/adsimple-cookie-manager.php
r3467886 r3468552 7 7 * Plugin Name: AdSimple Cookie Consent Banner 8 8 * Description: Add a GDPR-compliant cookie consent banner to your website in just a few steps. Certified CMP under IAB Europe TCF with CMP ID 463. 9 * Version: 2.1. 39 * Version: 2.1.4 10 10 * Author: AdSimple 11 11 * Author URI: https://www.adsimple.at -
adsimple-cookie-manager-for-wp/trunk/includes/controllers/extensions/rocket.php
r3457260 r3468552 21 21 22 22 /** 23 * Clear all known third-party page caches. 24 * 23 25 * @since 2.0.6 26 * @since 2.1.4 extended to cover WP Super Cache, W3TC, LiteSpeed, Autoptimize, SG Optimizer, WP Fastest Cache 24 27 */ 25 28 public static function auto_clear_cache() { 29 // WP Rocket 26 30 if ( function_exists( 'rocket_clean_domain' ) ) { 27 31 rocket_clean_domain(); 32 } 33 34 // WP Super Cache 35 if ( function_exists( 'wp_cache_clear_cache' ) ) { 36 wp_cache_clear_cache(); 37 } 38 39 // W3 Total Cache 40 if ( function_exists( 'w3tc_flush_all' ) ) { 41 w3tc_flush_all(); 42 } 43 44 // LiteSpeed Cache 45 // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- Calling third-party LiteSpeed Cache hook, not defining our own. 46 do_action( 'litespeed_purge_all' ); 47 48 // Autoptimize 49 if ( class_exists( 'autoptimizeCache' ) && method_exists( 'autoptimizeCache', 'clearall' ) ) { 50 autoptimizeCache::clearall(); 51 } 52 53 // SG Optimizer (SiteGround) 54 if ( function_exists( 'sg_cachepress_purge_cache' ) ) { 55 sg_cachepress_purge_cache(); 56 } 57 58 // WP Fastest Cache 59 if ( function_exists( 'wpfc_clear_all_cache' ) ) { 60 wpfc_clear_all_cache( true ); 28 61 } 29 62 } -
adsimple-cookie-manager-for-wp/trunk/includes/controllers/popup.php
r3457260 r3468552 34 34 } 35 35 36 echo "\r\n" . wp_kses_post( apply_filters( AS_CM_Manager::$action . '_embed_code', $code ) ) . "\r\n"; 36 $code = apply_filters( AS_CM_Manager::$action . '_embed_code', $code ); 37 38 $allowed_html = array( 39 'script' => array( 40 'type' => true, 41 'src' => true, 42 'id' => true, 43 'async' => true, 44 'defer' => true, 45 'charset' => true, 46 'crossorigin' => true, 47 ), 48 ); 49 50 echo "\r\n" . wp_kses( $code, $allowed_html ) . "\r\n"; 37 51 } 38 52 -
adsimple-cookie-manager-for-wp/trunk/includes/services/cache/loader.php
r3457260 r3468552 217 217 218 218 $options['cache']['timestamp'] = time(); 219 $options['cache']['plugin_version'] = AS_CM_Manager::$version; 219 220 220 221 AS_CM_Controllers_Options::update_options( $options ); -
adsimple-cookie-manager-for-wp/trunk/includes/services/cache/manager.php
r3457260 r3468552 12 12 13 13 add_action( AS_CM_Manager::$action . '_options_page', [ __CLASS__, 'handler_request_clear_cache' ] ); 14 15 add_action( 'init', [ __CLASS__, 'maybe_invalidate_cache_on_update' ] ); 16 } 17 18 /** 19 * @since 2.1.4 20 */ 21 public static function maybe_invalidate_cache_on_update() { 22 if ( ! static::is_cache_available() ) { 23 return; 24 } 25 26 $cache_options = AS_CM_Controllers_Options::get_option( 'cache' ); 27 $cached_version = isset( $cache_options['plugin_version'] ) ? $cache_options['plugin_version'] : ''; 28 29 if ( $cached_version === AS_CM_Manager::$version ) { 30 return; 31 } 32 33 static::delete_cache(); 34 35 $options = (array) AS_CM_Controllers_Options::get_option(); 36 $options['cache']['plugin_version'] = AS_CM_Manager::$version; 37 $options['cache']['timestamp'] = 0; 38 AS_CM_Controllers_Options::update_options( $options ); 14 39 } 15 40 … … 150 175 } 151 176 152 if ( ! $result ) {153 return false;154 }155 156 177 do_action( AS_CM_Manager::$action . '_after_delete_cache' ); 157 178 -
adsimple-cookie-manager-for-wp/trunk/readme.txt
r3467886 r3468552 5 5 Requires at least: 4.2.0 6 6 Tested up to: 6.9 7 Stable tag: 2.1. 37 Stable tag: 2.1.4 8 8 Requires PHP: 5.4 9 9 License: GPLv2 or later … … 161 161 == Changelog == 162 162 163 = 2.1.4 = 164 165 * Release Date - 24th February 2026 166 * Fixed: Consent banner script tags were stripped by wp_kses_post(), causing raw JavaScript to appear as text on the page (with local cache) or the banner not loading at all (without local cache) 167 * Fixed: Local script cache is now automatically invalidated when the plugin version changes, preventing stale cached scripts after updates 168 * Fixed: Third-party page cache clearing now supports WP Super Cache, W3 Total Cache, LiteSpeed Cache, Autoptimize, SG Optimizer and WP Fastest Cache (in addition to WP Rocket) 169 * Fixed: Third-party page caches are now always cleared when local cache is deleted, even if individual cache file deletions fail 170 163 171 = 2.1.3 = 164 172
Note: See TracChangeset
for help on using the changeset viewer.