Changeset 3469262
- Timestamp:
- 02/25/2026 09:45:20 AM (5 weeks ago)
- Location:
- modula-best-grid-gallery
- Files:
-
- 8 edited
- 1 copied
-
tags/2.14.17 (copied) (copied from modula-best-grid-gallery/trunk)
-
tags/2.14.17/Modula.php (modified) (2 diffs)
-
tags/2.14.17/changelog.txt (modified) (1 diff)
-
tags/2.14.17/includes/features/migrate/class-modula-migrator-detector.php (modified) (5 diffs)
-
tags/2.14.17/readme.txt (modified) (2 diffs)
-
trunk/Modula.php (modified) (2 diffs)
-
trunk/changelog.txt (modified) (1 diff)
-
trunk/includes/features/migrate/class-modula-migrator-detector.php (modified) (5 diffs)
-
trunk/readme.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
modula-best-grid-gallery/tags/2.14.17/Modula.php
r3468274 r3469262 5 5 * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks. 6 6 * Author: WPChill 7 * Version: 2.14.1 67 * Version: 2.14.17 8 8 * Author URI: https://www.wpchill.com/ 9 9 * License: GPLv3 or later … … 48 48 */ 49 49 50 define( 'MODULA_LITE_VERSION', '2.14.1 6' );50 define( 'MODULA_LITE_VERSION', '2.14.17' ); 51 51 define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) ); 52 52 define( 'MODULA_URL', plugin_dir_url( __FILE__ ) ); -
modula-best-grid-gallery/tags/2.14.17/changelog.txt
r3468274 r3469262 1 = 2.14.17 - 25.02.2026 = 2 Fixed: Migrator detection cache. 3 1 4 = 2.14.16 - 23.02.2026 = 2 5 Fixed: Moved touch navigation settings to base plugin -
modula-best-grid-gallery/tags/2.14.17/includes/features/migrate/class-modula-migrator-detector.php
r3454697 r3469262 60 60 61 61 /** 62 * Cache key for computed migrator needs. 63 * 64 * @since 2.15.0 65 * @var string 66 */ 67 private static $needed_migrators_cache_key = 'modula_needed_migrators'; 68 69 /** 70 * Cache TTL for computed migrator needs. 71 * 72 * @since 2.15.0 73 * @var int 74 */ 75 private static $needed_migrators_cache_ttl = DAY_IN_SECONDS; 76 77 /** 62 78 * Constructor. Registers filter and admin hook for migrator notification. 63 79 * … … 68 84 add_action( 'admin_init', array( $this, 'maybe_add_migrator_notification' ), 20 ); 69 85 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_migrator_notification_script' ), 21 ); 86 87 // Invalidate cached detection when plugins change. 88 add_action( 'activated_plugin', array( $this, 'invalidate_needed_migrators_cache' ) ); 89 add_action( 'deactivated_plugin', array( $this, 'invalidate_needed_migrators_cache' ) ); 70 90 } 71 91 } … … 250 270 251 271 /** 272 * Invalidate the migrator detection cache. 273 * 274 * @since 2.15.0 275 * @return void 276 */ 277 public function invalidate_needed_migrators_cache() { 278 delete_transient( self::$needed_migrators_cache_key ); 279 } 280 281 /** 282 * Determine if current request is a Modula admin request where notification checks are relevant. 283 * 284 * @since 2.15.0 285 * @return bool 286 */ 287 private function is_modula_admin_request() { 288 if ( ! is_admin() ) { 289 return false; 290 } 291 292 if ( wp_doing_ajax() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { 293 return false; 294 } 295 296 $post_type = isset( $_GET['post_type'] ) ? sanitize_key( wp_unslash( $_GET['post_type'] ) ) : ''; 297 $page = isset( $_GET['page'] ) ? sanitize_key( wp_unslash( $_GET['page'] ) ) : ''; 298 299 if ( 'modula-gallery' === $post_type ) { 300 return true; 301 } 302 303 if ( in_array( $page, array( 'modula', 'modula-addons', 'wpchill-dashboard' ), true ) ) { 304 return true; 305 } 306 307 return false; 308 } 309 310 /** 311 * Get cached needed migrators and refresh cache when missing. 312 * 313 * @since 2.15.0 314 * @return array 315 */ 316 private function get_cached_needed_migrators() { 317 $needed = get_transient( self::$needed_migrators_cache_key ); 318 319 if ( false !== $needed && is_array( $needed ) ) { 320 return $needed; 321 } 322 323 $needed = $this->get_needed_migrators(); 324 set_transient( self::$needed_migrators_cache_key, $needed, self::$needed_migrators_cache_ttl ); 325 326 return $needed; 327 } 328 329 /** 252 330 * Add a notification when migrator need is detected and at least one migrator is not active. 253 331 * … … 256 334 */ 257 335 public function maybe_add_migrator_notification() { 336 if ( ! $this->is_modula_admin_request() ) { 337 return; 338 } 339 258 340 if ( ! current_user_can( 'install_plugins' ) ) { 259 341 return; … … 262 344 return; 263 345 } 264 $needed = $this->get_ needed_migrators();346 $needed = $this->get_cached_needed_migrators(); 265 347 if ( empty( $needed ) ) { 266 348 return; -
modula-best-grid-gallery/tags/2.14.17/readme.txt
r3468274 r3469262 5 5 Tested up to: 6.9 6 6 Requires PHP: 5.6 7 Stable tag: 2.14.1 67 Stable tag: 2.14.17 8 8 9 9 License: GNU General Public License v3.0 or later … … 326 326 327 327 == Changelog == 328 = 2.14.17 - 25.02.2026 = 329 Fixed: Migrator detection cache. 330 331 = 2.14.16 - 23.02.2026 = 332 Fixed: Moved touch navigation settings to base plugin 333 328 334 = 2.14.14 - 20.02.2026 = 329 335 Fixed: Endpoint changes -
modula-best-grid-gallery/trunk/Modula.php
r3468274 r3469262 5 5 * Description: Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks. 6 6 * Author: WPChill 7 * Version: 2.14.1 67 * Version: 2.14.17 8 8 * Author URI: https://www.wpchill.com/ 9 9 * License: GPLv3 or later … … 48 48 */ 49 49 50 define( 'MODULA_LITE_VERSION', '2.14.1 6' );50 define( 'MODULA_LITE_VERSION', '2.14.17' ); 51 51 define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) ); 52 52 define( 'MODULA_URL', plugin_dir_url( __FILE__ ) ); -
modula-best-grid-gallery/trunk/changelog.txt
r3468274 r3469262 1 = 2.14.17 - 25.02.2026 = 2 Fixed: Migrator detection cache. 3 1 4 = 2.14.16 - 23.02.2026 = 2 5 Fixed: Moved touch navigation settings to base plugin -
modula-best-grid-gallery/trunk/includes/features/migrate/class-modula-migrator-detector.php
r3454697 r3469262 60 60 61 61 /** 62 * Cache key for computed migrator needs. 63 * 64 * @since 2.15.0 65 * @var string 66 */ 67 private static $needed_migrators_cache_key = 'modula_needed_migrators'; 68 69 /** 70 * Cache TTL for computed migrator needs. 71 * 72 * @since 2.15.0 73 * @var int 74 */ 75 private static $needed_migrators_cache_ttl = DAY_IN_SECONDS; 76 77 /** 62 78 * Constructor. Registers filter and admin hook for migrator notification. 63 79 * … … 68 84 add_action( 'admin_init', array( $this, 'maybe_add_migrator_notification' ), 20 ); 69 85 add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_migrator_notification_script' ), 21 ); 86 87 // Invalidate cached detection when plugins change. 88 add_action( 'activated_plugin', array( $this, 'invalidate_needed_migrators_cache' ) ); 89 add_action( 'deactivated_plugin', array( $this, 'invalidate_needed_migrators_cache' ) ); 70 90 } 71 91 } … … 250 270 251 271 /** 272 * Invalidate the migrator detection cache. 273 * 274 * @since 2.15.0 275 * @return void 276 */ 277 public function invalidate_needed_migrators_cache() { 278 delete_transient( self::$needed_migrators_cache_key ); 279 } 280 281 /** 282 * Determine if current request is a Modula admin request where notification checks are relevant. 283 * 284 * @since 2.15.0 285 * @return bool 286 */ 287 private function is_modula_admin_request() { 288 if ( ! is_admin() ) { 289 return false; 290 } 291 292 if ( wp_doing_ajax() || ( defined( 'REST_REQUEST' ) && REST_REQUEST ) ) { 293 return false; 294 } 295 296 $post_type = isset( $_GET['post_type'] ) ? sanitize_key( wp_unslash( $_GET['post_type'] ) ) : ''; 297 $page = isset( $_GET['page'] ) ? sanitize_key( wp_unslash( $_GET['page'] ) ) : ''; 298 299 if ( 'modula-gallery' === $post_type ) { 300 return true; 301 } 302 303 if ( in_array( $page, array( 'modula', 'modula-addons', 'wpchill-dashboard' ), true ) ) { 304 return true; 305 } 306 307 return false; 308 } 309 310 /** 311 * Get cached needed migrators and refresh cache when missing. 312 * 313 * @since 2.15.0 314 * @return array 315 */ 316 private function get_cached_needed_migrators() { 317 $needed = get_transient( self::$needed_migrators_cache_key ); 318 319 if ( false !== $needed && is_array( $needed ) ) { 320 return $needed; 321 } 322 323 $needed = $this->get_needed_migrators(); 324 set_transient( self::$needed_migrators_cache_key, $needed, self::$needed_migrators_cache_ttl ); 325 326 return $needed; 327 } 328 329 /** 252 330 * Add a notification when migrator need is detected and at least one migrator is not active. 253 331 * … … 256 334 */ 257 335 public function maybe_add_migrator_notification() { 336 if ( ! $this->is_modula_admin_request() ) { 337 return; 338 } 339 258 340 if ( ! current_user_can( 'install_plugins' ) ) { 259 341 return; … … 262 344 return; 263 345 } 264 $needed = $this->get_ needed_migrators();346 $needed = $this->get_cached_needed_migrators(); 265 347 if ( empty( $needed ) ) { 266 348 return; -
modula-best-grid-gallery/trunk/readme.txt
r3468274 r3469262 5 5 Tested up to: 6.9 6 6 Requires PHP: 5.6 7 Stable tag: 2.14.1 67 Stable tag: 2.14.17 8 8 9 9 License: GNU General Public License v3.0 or later … … 326 326 327 327 == Changelog == 328 = 2.14.17 - 25.02.2026 = 329 Fixed: Migrator detection cache. 330 331 = 2.14.16 - 23.02.2026 = 332 Fixed: Moved touch navigation settings to base plugin 333 328 334 = 2.14.14 - 20.02.2026 = 329 335 Fixed: Endpoint changes
Note: See TracChangeset
for help on using the changeset viewer.