Plugin Directory

Changeset 3469262


Ignore:
Timestamp:
02/25/2026 09:45:20 AM (5 weeks ago)
Author:
wpchill
Message:

Update to version 2.14.17 from GitHub

Location:
modula-best-grid-gallery
Files:
8 edited
1 copied

Legend:

Unmodified
Added
Removed
  • modula-best-grid-gallery/tags/2.14.17/Modula.php

    r3468274 r3469262  
    55* Description:              Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
    66* Author:                   WPChill
    7 * Version:                  2.14.16
     7* Version:                  2.14.17
    88* Author URI:               https://www.wpchill.com/
    99* License:                  GPLv3 or later
     
    4848 */
    4949
    50 define( 'MODULA_LITE_VERSION', '2.14.16' );
     50define( 'MODULA_LITE_VERSION', '2.14.17' );
    5151define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
    5252define( '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 =
     2Fixed: Migrator detection cache.
     3
    14= 2.14.16 - 23.02.2026 =
    25Fixed: 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  
    6060
    6161    /**
     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    /**
    6278     * Constructor. Registers filter and admin hook for migrator notification.
    6379     *
     
    6884            add_action( 'admin_init', array( $this, 'maybe_add_migrator_notification' ), 20 );
    6985            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' ) );
    7090        }
    7191    }
     
    250270
    251271    /**
     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    /**
    252330     * Add a notification when migrator need is detected and at least one migrator is not active.
    253331     *
     
    256334     */
    257335    public function maybe_add_migrator_notification() {
     336        if ( ! $this->is_modula_admin_request() ) {
     337            return;
     338        }
     339
    258340        if ( ! current_user_can( 'install_plugins' ) ) {
    259341            return;
     
    262344            return;
    263345        }
    264         $needed = $this->get_needed_migrators();
     346        $needed = $this->get_cached_needed_migrators();
    265347        if ( empty( $needed ) ) {
    266348            return;
  • modula-best-grid-gallery/tags/2.14.17/readme.txt

    r3468274 r3469262  
    55Tested up to: 6.9
    66Requires PHP: 5.6
    7 Stable tag: 2.14.16
     7Stable tag: 2.14.17
    88
    99License: GNU General Public License v3.0 or later 
     
    326326
    327327== Changelog ==
     328= 2.14.17 - 25.02.2026 =
     329Fixed: Migrator detection cache.
     330
     331= 2.14.16 - 23.02.2026 =
     332Fixed: Moved touch navigation settings to base plugin
     333
    328334= 2.14.14 - 20.02.2026 =
    329335Fixed: Endpoint changes
  • modula-best-grid-gallery/trunk/Modula.php

    r3468274 r3469262  
    55* Description:              Modula is the most powerful, user-friendly WordPress gallery plugin. Add galleries, masonry grids and more in a few clicks.
    66* Author:                   WPChill
    7 * Version:                  2.14.16
     7* Version:                  2.14.17
    88* Author URI:               https://www.wpchill.com/
    99* License:                  GPLv3 or later
     
    4848 */
    4949
    50 define( 'MODULA_LITE_VERSION', '2.14.16' );
     50define( 'MODULA_LITE_VERSION', '2.14.17' );
    5151define( 'MODULA_PATH', plugin_dir_path( __FILE__ ) );
    5252define( 'MODULA_URL', plugin_dir_url( __FILE__ ) );
  • modula-best-grid-gallery/trunk/changelog.txt

    r3468274 r3469262  
     1= 2.14.17 - 25.02.2026 =
     2Fixed: Migrator detection cache.
     3
    14= 2.14.16 - 23.02.2026 =
    25Fixed: Moved touch navigation settings to base plugin
  • modula-best-grid-gallery/trunk/includes/features/migrate/class-modula-migrator-detector.php

    r3454697 r3469262  
    6060
    6161    /**
     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    /**
    6278     * Constructor. Registers filter and admin hook for migrator notification.
    6379     *
     
    6884            add_action( 'admin_init', array( $this, 'maybe_add_migrator_notification' ), 20 );
    6985            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' ) );
    7090        }
    7191    }
     
    250270
    251271    /**
     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    /**
    252330     * Add a notification when migrator need is detected and at least one migrator is not active.
    253331     *
     
    256334     */
    257335    public function maybe_add_migrator_notification() {
     336        if ( ! $this->is_modula_admin_request() ) {
     337            return;
     338        }
     339
    258340        if ( ! current_user_can( 'install_plugins' ) ) {
    259341            return;
     
    262344            return;
    263345        }
    264         $needed = $this->get_needed_migrators();
     346        $needed = $this->get_cached_needed_migrators();
    265347        if ( empty( $needed ) ) {
    266348            return;
  • modula-best-grid-gallery/trunk/readme.txt

    r3468274 r3469262  
    55Tested up to: 6.9
    66Requires PHP: 5.6
    7 Stable tag: 2.14.16
     7Stable tag: 2.14.17
    88
    99License: GNU General Public License v3.0 or later 
     
    326326
    327327== Changelog ==
     328= 2.14.17 - 25.02.2026 =
     329Fixed: Migrator detection cache.
     330
     331= 2.14.16 - 23.02.2026 =
     332Fixed: Moved touch navigation settings to base plugin
     333
    328334= 2.14.14 - 20.02.2026 =
    329335Fixed: Endpoint changes
Note: See TracChangeset for help on using the changeset viewer.