Changeset 3777832
- Timestamp:
- 11/01/2026 10:17:12 AM (21 hours ago)
- Location:
- astroblob-banners
- Files:
-
- 2 added
- 12 edited
- 1 copied
-
tags/1.2.0 (copied) (copied from astroblob-banners/trunk )
-
tags/1.2.0/astroblob-banners.php (modified) (3 diffs)
-
tags/1.2.0/blocks/banner/block.json (modified) (1 diff)
-
tags/1.2.0/blocks/gallery/block.json (modified) (1 diff)
-
tags/1.2.0/includes/class-astroblob-gallery.php (modified) (4 diffs)
-
tags/1.2.0/includes/class-astroblob-image-marker.php (added)
-
tags/1.2.0/languages/astroblob-banners.pot (modified) (2 diffs)
-
tags/1.2.0/readme.txt (modified) (4 diffs)
-
trunk/astroblob-banners.php (modified) (3 diffs)
-
trunk/blocks/banner/block.json (modified) (1 diff)
-
trunk/blocks/gallery/block.json (modified) (1 diff)
-
trunk/includes/class-astroblob-gallery.php (modified) (4 diffs)
-
trunk/includes/class-astroblob-image-marker.php (added)
-
trunk/languages/astroblob-banners.pot (modified) (2 diffs)
-
trunk/readme.txt (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
astroblob-banners/tags/1.2.0/astroblob-banners.php
r3777825 r3777832 3 3 * Plugin Name: AstroBlob Banners 4 4 * Description: Add AstroBlob banners and a gallery of your members' astrophotos to your site, linking to your astronomy association on AstroBlob, the platform for sharing robotic telescopes. 5 * Version: 1. 1.05 * Version: 1.2.0 6 6 * Requires at least: 6.0 7 7 * Requires PHP: 7.4 … … 18 18 defined( 'ABSPATH' ) || exit; 19 19 20 define( 'ASTROBLOB_BANNERS_VERSION', '1. 1.0' );20 define( 'ASTROBLOB_BANNERS_VERSION', '1.2.0' ); 21 21 define( 'ASTROBLOB_BANNERS_FILE', __FILE__ ); 22 22 define( 'ASTROBLOB_BANNERS_DIR', plugin_dir_path( __FILE__ ) ); … … 28 28 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-shortcode.php'; 29 29 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-block.php'; 30 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-image-marker.php'; 30 31 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-gallery.php'; 31 32 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-gallery-renderer.php'; -
astroblob-banners/tags/1.2.0/blocks/banner/block.json
r3777825 r3777832 3 3 "apiVersion": 3, 4 4 "name": "astroblob/banner", 5 "version": "1. 1.0",5 "version": "1.2.0", 6 6 "title": "AstroBlob Banner", 7 7 "category": "widgets", -
astroblob-banners/tags/1.2.0/blocks/gallery/block.json
r3777825 r3777832 3 3 "apiVersion": 3, 4 4 "name": "astroblob/gallery", 5 "version": "1. 1.0",5 "version": "1.2.0", 6 6 "title": "AstroBlob Gallery", 7 7 "category": "media", -
astroblob-banners/tags/1.2.0/includes/class-astroblob-gallery.php
r3777825 r3777832 547 547 ) as $variant => $path ) { 548 548 $file = $dir['path'] . '/' . self::file_name( $image['id'], $variant ); 549 if ( ! file_exists( $file ) && ! self::download( $path, $file ) ) { 550 return null; 549 if ( ! file_exists( $file ) ) { 550 if ( ! self::download( $path, $file, $image, $variant ) ) { 551 return null; 552 } 553 } elseif ( ! Astroblob_Image_Marker::has_xmp( $file ) ) { 554 // Copies downloaded before 1.2.0. 555 Astroblob_Image_Marker::mark( $file, $image, $variant ); 551 556 } 552 557 $size = wp_getimagesize( $file ); … … 562 567 563 568 /** 564 * Download one JPEG from the API into $file, validating it first. 565 * 566 * @param string $path Path relative to the API base. 567 * @param string $file Destination file. 569 * Download one JPEG from the API into $file, validating and marking it first. 570 * 571 * @param string $path Path relative to the API base. 572 * @param string $file Destination file. 573 * @param array $image Normalised API image, for the XMP packet. 574 * @param string $variant thumb|full. 568 575 * @return bool 569 576 */ 570 private static function download( $path, $file ) {577 private static function download( $path, $file, array $image, $variant ) { 571 578 $part = $file . '.part'; 572 579 … … 602 609 } 603 610 611 if ( $valid ) { 612 // A missing packet never blocks the image. 613 Astroblob_Image_Marker::mark( $part, $image, $variant ); 614 } 615 604 616 $filesystem = $valid ? self::filesystem() : null; 605 617 if ( null === $filesystem || ! $filesystem->move( $part, $file, true ) ) { … … 643 655 wp_delete_file( $file ); 644 656 } 645 } elseif ( preg_match( '/^\d+-(?:thumb|full)\.jpg \.part$/', $name ) && filemtime( $file ) < time() - HOUR_IN_SECONDS ) {657 } elseif ( preg_match( '/^\d+-(?:thumb|full)\.jpg(?:\.part|\.part\.xmp|\.xmp)$/', $name ) && filemtime( $file ) < time() - HOUR_IN_SECONDS ) { 646 658 wp_delete_file( $file ); 647 659 } -
astroblob-banners/tags/1.2.0/languages/astroblob-banners.pot
r3777825 r3777832 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: AstroBlob Banners 1. 1.0\n"5 "Project-Id-Version: AstroBlob Banners 1.2.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astroblob-banners\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-1 0-14T17:30:22+00:00\n"12 "POT-Creation-Date: 2026-11-01T10:12:29+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" -
astroblob-banners/tags/1.2.0/readme.txt
r3777825 r3777832 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 1.07 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 150 150 In `wp-content/uploads/astroblob-gallery/`. The folder is deleted when you uninstall the plugin. 151 151 152 = Are the gallery images marked? = 153 154 Yes, invisibly. The plugin adds XMP metadata to its local copies: the title, the author (only if the author allowed it), AstroBlob as the source, the image ID, and your site's address. The image itself is not re-encoded or changed. Image optimization plugins and CDNs that strip metadata also remove these marks. 155 152 156 = Can I use my theme's font? = 153 157 … … 178 182 == Changelog == 179 183 184 = 1.2.0 = 185 * New: gallery images carry invisible XMP metadata (title, author if shared, AstroBlob as the source, image ID and your site's address) so they can be identified later. The image itself is not re-encoded. Images already downloaded are marked at the next hourly refresh. 186 180 187 = 1.1.0 = 181 188 * New: members' gallery with the `[astroblob_gallery]` shortcode and the `astroblob/gallery` block, in five formats (grid, mosaic, carousel, strip and spotlight), with an accessible lightbox. … … 190 197 == Upgrade Notice == 191 198 199 = 1.2.0 = 200 Gallery images now carry invisible metadata that identifies them as AstroBlob images. 201 192 202 = 1.1.0 = 193 203 Adds a gallery of your members' astrophotos, served from your own site, and font and text size options. -
astroblob-banners/trunk/astroblob-banners.php
r3777825 r3777832 3 3 * Plugin Name: AstroBlob Banners 4 4 * Description: Add AstroBlob banners and a gallery of your members' astrophotos to your site, linking to your astronomy association on AstroBlob, the platform for sharing robotic telescopes. 5 * Version: 1. 1.05 * Version: 1.2.0 6 6 * Requires at least: 6.0 7 7 * Requires PHP: 7.4 … … 18 18 defined( 'ABSPATH' ) || exit; 19 19 20 define( 'ASTROBLOB_BANNERS_VERSION', '1. 1.0' );20 define( 'ASTROBLOB_BANNERS_VERSION', '1.2.0' ); 21 21 define( 'ASTROBLOB_BANNERS_FILE', __FILE__ ); 22 22 define( 'ASTROBLOB_BANNERS_DIR', plugin_dir_path( __FILE__ ) ); … … 28 28 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-shortcode.php'; 29 29 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-block.php'; 30 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-image-marker.php'; 30 31 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-gallery.php'; 31 32 require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-gallery-renderer.php'; -
astroblob-banners/trunk/blocks/banner/block.json
r3777825 r3777832 3 3 "apiVersion": 3, 4 4 "name": "astroblob/banner", 5 "version": "1. 1.0",5 "version": "1.2.0", 6 6 "title": "AstroBlob Banner", 7 7 "category": "widgets", -
astroblob-banners/trunk/blocks/gallery/block.json
r3777825 r3777832 3 3 "apiVersion": 3, 4 4 "name": "astroblob/gallery", 5 "version": "1. 1.0",5 "version": "1.2.0", 6 6 "title": "AstroBlob Gallery", 7 7 "category": "media", -
astroblob-banners/trunk/includes/class-astroblob-gallery.php
r3777825 r3777832 547 547 ) as $variant => $path ) { 548 548 $file = $dir['path'] . '/' . self::file_name( $image['id'], $variant ); 549 if ( ! file_exists( $file ) && ! self::download( $path, $file ) ) { 550 return null; 549 if ( ! file_exists( $file ) ) { 550 if ( ! self::download( $path, $file, $image, $variant ) ) { 551 return null; 552 } 553 } elseif ( ! Astroblob_Image_Marker::has_xmp( $file ) ) { 554 // Copies downloaded before 1.2.0. 555 Astroblob_Image_Marker::mark( $file, $image, $variant ); 551 556 } 552 557 $size = wp_getimagesize( $file ); … … 562 567 563 568 /** 564 * Download one JPEG from the API into $file, validating it first. 565 * 566 * @param string $path Path relative to the API base. 567 * @param string $file Destination file. 569 * Download one JPEG from the API into $file, validating and marking it first. 570 * 571 * @param string $path Path relative to the API base. 572 * @param string $file Destination file. 573 * @param array $image Normalised API image, for the XMP packet. 574 * @param string $variant thumb|full. 568 575 * @return bool 569 576 */ 570 private static function download( $path, $file ) {577 private static function download( $path, $file, array $image, $variant ) { 571 578 $part = $file . '.part'; 572 579 … … 602 609 } 603 610 611 if ( $valid ) { 612 // A missing packet never blocks the image. 613 Astroblob_Image_Marker::mark( $part, $image, $variant ); 614 } 615 604 616 $filesystem = $valid ? self::filesystem() : null; 605 617 if ( null === $filesystem || ! $filesystem->move( $part, $file, true ) ) { … … 643 655 wp_delete_file( $file ); 644 656 } 645 } elseif ( preg_match( '/^\d+-(?:thumb|full)\.jpg \.part$/', $name ) && filemtime( $file ) < time() - HOUR_IN_SECONDS ) {657 } elseif ( preg_match( '/^\d+-(?:thumb|full)\.jpg(?:\.part|\.part\.xmp|\.xmp)$/', $name ) && filemtime( $file ) < time() - HOUR_IN_SECONDS ) { 646 658 wp_delete_file( $file ); 647 659 } -
astroblob-banners/trunk/languages/astroblob-banners.pot
r3777825 r3777832 3 3 msgid "" 4 4 msgstr "" 5 "Project-Id-Version: AstroBlob Banners 1. 1.0\n"5 "Project-Id-Version: AstroBlob Banners 1.2.0\n" 6 6 "Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astroblob-banners\n" 7 7 "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" … … 10 10 "Content-Type: text/plain; charset=UTF-8\n" 11 11 "Content-Transfer-Encoding: 8bit\n" 12 "POT-Creation-Date: 2026-1 0-14T17:30:22+00:00\n"12 "POT-Creation-Date: 2026-11-01T10:12:29+00:00\n" 13 13 "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 14 14 "X-Generator: WP-CLI 2.12.0\n" -
astroblob-banners/trunk/readme.txt
r3777825 r3777832 5 5 Tested up to: 7.1 6 6 Requires PHP: 7.4 7 Stable tag: 1. 1.07 Stable tag: 1.2.0 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 150 150 In `wp-content/uploads/astroblob-gallery/`. The folder is deleted when you uninstall the plugin. 151 151 152 = Are the gallery images marked? = 153 154 Yes, invisibly. The plugin adds XMP metadata to its local copies: the title, the author (only if the author allowed it), AstroBlob as the source, the image ID, and your site's address. The image itself is not re-encoded or changed. Image optimization plugins and CDNs that strip metadata also remove these marks. 155 152 156 = Can I use my theme's font? = 153 157 … … 178 182 == Changelog == 179 183 184 = 1.2.0 = 185 * New: gallery images carry invisible XMP metadata (title, author if shared, AstroBlob as the source, image ID and your site's address) so they can be identified later. The image itself is not re-encoded. Images already downloaded are marked at the next hourly refresh. 186 180 187 = 1.1.0 = 181 188 * New: members' gallery with the `[astroblob_gallery]` shortcode and the `astroblob/gallery` block, in five formats (grid, mosaic, carousel, strip and spotlight), with an accessible lightbox. … … 190 197 == Upgrade Notice == 191 198 199 = 1.2.0 = 200 Gallery images now carry invisible metadata that identifies them as AstroBlob images. 201 192 202 = 1.1.0 = 193 203 Adds a gallery of your members' astrophotos, served from your own site, and font and text size options.
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)