Changeset 3792865
- Timestamp:
- 11/09/2026 04:29:24 PM (19 hours ago)
- Location:
- jalbum-gallery-block
- Files:
-
- 11 added
- 5 edited
-
tags/1.2.1 (added)
-
tags/1.2.1/block.json (added)
-
tags/1.2.1/build (added)
-
tags/1.2.1/build/index.asset.php (added)
-
tags/1.2.1/build/index.css (added)
-
tags/1.2.1/build/index.js (added)
-
tags/1.2.1/jalbum-gallery-block.php (added)
-
tags/1.2.1/languages (added)
-
tags/1.2.1/languages/jalbum-gallery-block.pot (added)
-
tags/1.2.1/readme.txt (added)
-
tags/1.2.1/render.php (added)
-
trunk/block.json (modified) (1 diff)
-
trunk/build/index.asset.php (modified) (1 diff)
-
trunk/jalbum-gallery-block.php (modified) (1 diff)
-
trunk/readme.txt (modified) (2 diffs)
-
trunk/render.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
jalbum-gallery-block/trunk/block.json
r3573315 r3792865 3 3 "apiVersion": 3, 4 4 "name": "jalbum/gallery", 5 "version": "1.2. 0",5 "version": "1.2.1", 6 6 "title": "jAlbum Gallery", 7 7 "category": "media", -
jalbum-gallery-block/trunk/build/index.asset.php
r3573315 r3792865 7 7 'wp-i18n', 8 8 ), 9 'version' => '1.2. 0',9 'version' => '1.2.1', 10 10 ); -
jalbum-gallery-block/trunk/jalbum-gallery-block.php
r3573315 r3792865 6 6 Description: Gutenberg block to embed jAlbum Embed galleries via a URL. 7 7 Tags: jAlbum, album, gallery, photo, embed 8 Version: 1.2. 08 Version: 1.2.1 9 9 Author: jalbum 10 10 Author URI: https://jalbum.net/ -
jalbum-gallery-block/trunk/readme.txt
r3573315 r3792865 7 7 Tested up to: 7.0 8 8 Requires PHP: 7.4 9 Stable tag: 1.2. 09 Stable tag: 1.2.1 10 10 License: GPLv2 or later 11 11 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 73 73 == Changelog == 74 74 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 75 78 = 1.2.0 = 76 79 * Padding, border and rulers (above and below) can be added -
jalbum-gallery-block/trunk/render.php
r3573315 r3792865 22 22 $jalbum_gallery_block_script_url = $jalbum_gallery_block_base . 'res/jalbum-gallery.js'; 23 23 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'; 28 31 29 32 if ( ! wp_script_is( $jalbum_gallery_block_handle, 'registered' ) ) {
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)