Plugin Directory

Changeset 3777832


Ignore:
Timestamp:
11/01/2026 10:17:12 AM (21 hours ago)
Author:
astroblob
Message:

Release 1.2.0: invisible XMP metadata on gallery images

Location:
astroblob-banners
Files:
2 added
12 edited
1 copied

Legend:

Unmodified
Added
Removed
  • astroblob-banners/tags/1.2.0/astroblob-banners.php

    r3777825 r3777832  
    33 * Plugin Name:       AstroBlob Banners
    44 * 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.0
     5 * Version:           1.2.0
    66 * Requires at least: 6.0
    77 * Requires PHP:      7.4
    … …  
    1818defined( 'ABSPATH' ) || exit;
    1919
    20 define( 'ASTROBLOB_BANNERS_VERSION', '1.1.0' );
     20define( 'ASTROBLOB_BANNERS_VERSION', '1.2.0' );
    2121define( 'ASTROBLOB_BANNERS_FILE', __FILE__ );
    2222define( 'ASTROBLOB_BANNERS_DIR', plugin_dir_path( __FILE__ ) );
    … …  
    2828require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-shortcode.php';
    2929require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-block.php';
     30require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-image-marker.php';
    3031require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-gallery.php';
    3132require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-gallery-renderer.php';
  • astroblob-banners/tags/1.2.0/blocks/banner/block.json

    r3777825 r3777832  
    33        "apiVersion": 3,
    44        "name": "astroblob/banner",
    5         "version": "1.1.0",
     5        "version": "1.2.0",
    66        "title": "AstroBlob Banner",
    77        "category": "widgets",
  • astroblob-banners/tags/1.2.0/blocks/gallery/block.json

    r3777825 r3777832  
    33        "apiVersion": 3,
    44        "name": "astroblob/gallery",
    5         "version": "1.1.0",
     5        "version": "1.2.0",
    66        "title": "AstroBlob Gallery",
    77        "category": "media",
  • astroblob-banners/tags/1.2.0/includes/class-astroblob-gallery.php

    r3777825 r3777832  
    547547                ) as $variant => $path ) {
    548548                        $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 );
    551556                        }
    552557                        $size = wp_getimagesize( $file );
    … …  
    562567
    563568        /**
    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.
    568575         * @return bool
    569576         */
    570         private static function download( $path, $file ) {
     577        private static function download( $path, $file, array $image, $variant ) {
    571578                $part = $file . '.part';
    572579
    … …  
    602609                }
    603610
     611                if ( $valid ) {
     612                        // A missing packet never blocks the image.
     613                        Astroblob_Image_Marker::mark( $part, $image, $variant );
     614                }
     615
    604616                $filesystem = $valid ? self::filesystem() : null;
    605617                if ( null === $filesystem || ! $filesystem->move( $part, $file, true ) ) {
    … …  
    643655                                        wp_delete_file( $file );
    644656                                }
    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 ) {
    646658                                wp_delete_file( $file );
    647659                        }
  • astroblob-banners/tags/1.2.0/languages/astroblob-banners.pot

    r3777825 r3777832  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: AstroBlob Banners 1.1.0\n"
     5"Project-Id-Version: AstroBlob Banners 1.2.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astroblob-banners\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-10-14T17:30:22+00:00\n"
     12"POT-Creation-Date: 2026-11-01T10:12:29+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
  • astroblob-banners/tags/1.2.0/readme.txt

    r3777825 r3777832  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.1.0
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    150150In `wp-content/uploads/astroblob-gallery/`. The folder is deleted when you uninstall the plugin.
    151151
     152= Are the gallery images marked? =
     153
     154Yes, 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
    152156= Can I use my theme's font? =
    153157
    … …  
    178182== Changelog ==
    179183
     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
    180187= 1.1.0 =
    181188* 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.
    … …  
    190197== Upgrade Notice ==
    191198
     199= 1.2.0 =
     200Gallery images now carry invisible metadata that identifies them as AstroBlob images.
     201
    192202= 1.1.0 =
    193203Adds 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  
    33 * Plugin Name:       AstroBlob Banners
    44 * 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.0
     5 * Version:           1.2.0
    66 * Requires at least: 6.0
    77 * Requires PHP:      7.4
    … …  
    1818defined( 'ABSPATH' ) || exit;
    1919
    20 define( 'ASTROBLOB_BANNERS_VERSION', '1.1.0' );
     20define( 'ASTROBLOB_BANNERS_VERSION', '1.2.0' );
    2121define( 'ASTROBLOB_BANNERS_FILE', __FILE__ );
    2222define( 'ASTROBLOB_BANNERS_DIR', plugin_dir_path( __FILE__ ) );
    … …  
    2828require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-shortcode.php';
    2929require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-block.php';
     30require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-image-marker.php';
    3031require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-gallery.php';
    3132require_once ASTROBLOB_BANNERS_DIR . 'includes/class-astroblob-gallery-renderer.php';
  • astroblob-banners/trunk/blocks/banner/block.json

    r3777825 r3777832  
    33        "apiVersion": 3,
    44        "name": "astroblob/banner",
    5         "version": "1.1.0",
     5        "version": "1.2.0",
    66        "title": "AstroBlob Banner",
    77        "category": "widgets",
  • astroblob-banners/trunk/blocks/gallery/block.json

    r3777825 r3777832  
    33        "apiVersion": 3,
    44        "name": "astroblob/gallery",
    5         "version": "1.1.0",
     5        "version": "1.2.0",
    66        "title": "AstroBlob Gallery",
    77        "category": "media",
  • astroblob-banners/trunk/includes/class-astroblob-gallery.php

    r3777825 r3777832  
    547547                ) as $variant => $path ) {
    548548                        $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 );
    551556                        }
    552557                        $size = wp_getimagesize( $file );
    … …  
    562567
    563568        /**
    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.
    568575         * @return bool
    569576         */
    570         private static function download( $path, $file ) {
     577        private static function download( $path, $file, array $image, $variant ) {
    571578                $part = $file . '.part';
    572579
    … …  
    602609                }
    603610
     611                if ( $valid ) {
     612                        // A missing packet never blocks the image.
     613                        Astroblob_Image_Marker::mark( $part, $image, $variant );
     614                }
     615
    604616                $filesystem = $valid ? self::filesystem() : null;
    605617                if ( null === $filesystem || ! $filesystem->move( $part, $file, true ) ) {
    … …  
    643655                                        wp_delete_file( $file );
    644656                                }
    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 ) {
    646658                                wp_delete_file( $file );
    647659                        }
  • astroblob-banners/trunk/languages/astroblob-banners.pot

    r3777825 r3777832  
    33msgid ""
    44msgstr ""
    5 "Project-Id-Version: AstroBlob Banners 1.1.0\n"
     5"Project-Id-Version: AstroBlob Banners 1.2.0\n"
    66"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/astroblob-banners\n"
    77"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
    … …  
    1010"Content-Type: text/plain; charset=UTF-8\n"
    1111"Content-Transfer-Encoding: 8bit\n"
    12 "POT-Creation-Date: 2026-10-14T17:30:22+00:00\n"
     12"POT-Creation-Date: 2026-11-01T10:12:29+00:00\n"
    1313"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
    1414"X-Generator: WP-CLI 2.12.0\n"
  • astroblob-banners/trunk/readme.txt

    r3777825 r3777832  
    55Tested up to: 7.1
    66Requires PHP: 7.4
    7 Stable tag: 1.1.0
     7Stable tag: 1.2.0
    88License: GPLv2 or later
    99License URI: https://www.gnu.org/licenses/gpl-2.0.html
    … …  
    150150In `wp-content/uploads/astroblob-gallery/`. The folder is deleted when you uninstall the plugin.
    151151
     152= Are the gallery images marked? =
     153
     154Yes, 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
    152156= Can I use my theme's font? =
    153157
    … …  
    178182== Changelog ==
    179183
     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
    180187= 1.1.0 =
    181188* 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.
    … …  
    190197== Upgrade Notice ==
    191198
     199= 1.2.0 =
     200Gallery images now carry invisible metadata that identifies them as AstroBlob images.
     201
    192202= 1.1.0 =
    193203Adds 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.