Plugin Directory

Changeset 3792865


Ignore:
Timestamp:
11/09/2026 04:29:24 PM (19 hours ago)
Author:
mlaza
Message:

v1.2.1

Location:
jalbum-gallery-block
Files:
11 added
5 edited

Legend:

Unmodified
Added
Removed
  • jalbum-gallery-block/trunk/block.json

    r3573315 r3792865  
    33        "apiVersion": 3,
    44        "name": "jalbum/gallery",
    5         "version": "1.2.0",
     5        "version": "1.2.1",
    66        "title": "jAlbum Gallery",
    77        "category": "media",
  • jalbum-gallery-block/trunk/build/index.asset.php

    r3573315 r3792865  
    77        'wp-i18n',
    88    ),
    9     'version' => '1.2.0',
     9    'version' => '1.2.1',
    1010);
  • jalbum-gallery-block/trunk/jalbum-gallery-block.php

    r3573315 r3792865  
    66        Description:            Gutenberg block to embed jAlbum Embed galleries via a URL.
    77        Tags:                           jAlbum, album, gallery, photo, embed
    8         Version:                1.2.0
     8        Version:                1.2.1
    99        Author:                 jalbum
    1010        Author URI:             https://jalbum.net/
  • jalbum-gallery-block/trunk/readme.txt

    r3573315 r3792865  
    77Tested up to: 7.0
    88Requires PHP: 7.4
    9 Stable tag: 1.2.0
     9Stable tag: 1.2.1
    1010License: GPLv2 or later
    1111License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    7373== Changelog ==
    7474         
     75= 1.2.1 =
     76* Fixed: multiple galleries on the same page could break the page (the gallery script is now loaded only once)
     77
    7578= 1.2.0 =
    7679* Padding, border and rulers (above and below) can be added
  • jalbum-gallery-block/trunk/render.php

    r3573315 r3792865  
    2222$jalbum_gallery_block_script_url = $jalbum_gallery_block_base . 'res/jalbum-gallery.js';
    2323
    24 // Enqueue the gallery script into <head> with defer.
    25 // Using a URL-derived handle so multiple blocks on the same page
    26 // with the same gallery don't double-register.
    27 $jalbum_gallery_block_handle = 'jalbum-gallery-' . md5( $jalbum_gallery_block_script_url );
     24// Enqueue the gallery script once per page, with defer.
     25// A single fixed handle is used on purpose: jalbum-gallery.js declares globals
     26// and registers custom elements, so loading it twice (e.g. two blocks pointing
     27// at different galleries, each with its own res/jalbum-gallery.js URL) throws
     28// "Identifier '_jaScriptBase' has already been declared" and breaks the page.
     29// The first block's script serves every <jalbum-gallery> element on the page.
     30$jalbum_gallery_block_handle = 'jalbum-gallery-embed';
    2831
    2932if ( ! wp_script_is( $jalbum_gallery_block_handle, 'registered' ) ) {
Note: See TracChangeset for help on using the changeset viewer.