Changeset 3738613
- Timestamp:
- 10/10/2026 07:52:06 PM (6 weeks ago)
- Location:
- lloyd-gallery
- Files:
-
- 4 added
- 12 edited
- 1 copied
-
tags/1.1.4 (copied) (copied from lloyd-gallery/trunk )
-
tags/1.1.4/includes/class-lloyga-admin-pages.php (modified) (1 diff)
-
tags/1.1.4/includes/class-lloyga-frontend.php (modified) (3 diffs)
-
tags/1.1.4/includes/class-lloyga-photos.php (modified) (2 diffs)
-
tags/1.1.4/includes/class-lloyga-rest.php (modified) (1 diff)
-
tags/1.1.4/includes/integrations (added)
-
tags/1.1.4/includes/integrations/class-lloyga-polylang.php (added)
-
tags/1.1.4/lloyd-gallery.php (modified) (3 diffs)
-
tags/1.1.4/readme.txt (modified) (3 diffs)
-
trunk/includes/class-lloyga-admin-pages.php (modified) (1 diff)
-
trunk/includes/class-lloyga-frontend.php (modified) (3 diffs)
-
trunk/includes/class-lloyga-photos.php (modified) (2 diffs)
-
trunk/includes/class-lloyga-rest.php (modified) (1 diff)
-
trunk/includes/integrations (added)
-
trunk/includes/integrations/class-lloyga-polylang.php (added)
-
trunk/lloyd-gallery.php (modified) (3 diffs)
-
trunk/readme.txt (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lloyd-gallery/tags/1.1.4/includes/class-lloyga-admin-pages.php
r3716027 r3738613 487 487 echo esc_html( sprintf( _n( '%d photo', '%d photos', $count, 'lloyd-gallery' ), $count ) ); 488 488 ?> 489 · <?php echo esc_html( get_the_date( ' j M Y', $album ) ); ?>489 · <?php echo esc_html( get_the_date( '', $album ) ); ?> 490 490 </span> 491 491 </a> -
lloyd-gallery/tags/1.1.4/includes/class-lloyga-frontend.php
r3716043 r3738613 233 233 } 234 234 235 $date = '<p class="lg-event-date">' . esc_html( get_the_date( 'j F Y', $current ) ) . '</p>'; 235 // No format of our own: the site's date format (Settings > General) 236 // decides the order of day, month and year, and WordPress translates 237 // the month name, so the date reads naturally in any language. The 238 // album cards and the admin album list follow the same rule. 239 $date = '<p class="lg-event-date">' . esc_html( get_the_date( '', $current ) ) . '</p>'; 236 240 237 241 // WordPress has already decided this visitor may see this album by … … 342 346 </span> 343 347 <span class="lg-album-card-title"><?php echo esc_html( get_the_title( $album ) ); ?></span> 344 <span class="lg-album-card-date"><?php echo esc_html( get_the_date( ' j F Y', $album ) ); ?></span>348 <span class="lg-album-card-date"><?php echo esc_html( get_the_date( '', $album ) ); ?></span> 345 349 </a> 346 350 </li> … … 430 434 $lightbox_data = self::visitor_image( $photo->ID ); 431 435 $lightbox_url = $lightbox_data['url']; 432 $lightbox_w = $lightbox_data['width'] ? : $width;433 $lightbox_h = $lightbox_data['height'] ? : $height;436 $lightbox_w = $lightbox_data['width'] ? $lightbox_data['width'] : $width; 437 $lightbox_h = $lightbox_data['height'] ? $lightbox_data['height'] : $height; 434 438 435 439 $grid_sizes = array_filter( $breakpoints, static fn( $size ) => $size >= 768 ); -
lloyd-gallery/tags/1.1.4/includes/class-lloyga-photos.php
r3716027 r3738613 221 221 } 222 222 223 return get_posts( 223 /** 224 * Filters the query that loads an album's photos. 225 * 226 * The IDs come from the album's own stored list, so the query is 227 * meant to return exactly those attachments. A plugin that filters 228 * attachment queries site-wide (by language, for example) would 229 * otherwise drop some of them from the album, so its integration 230 * can use this to keep the list whole. This plugin adds nothing here 231 * itself. 232 * 233 * @param array $query_args WP_Query arguments. 234 * @param int $album_id Album ID. 235 */ 236 $query_args = apply_filters( 237 'lloyga_album_photos_query_args', 224 238 array( 225 239 'post_type' => 'attachment', … … 228 242 'orderby' => 'post__in', 229 243 'posts_per_page' => -1, 230 ) 231 ); 244 ), 245 $album_id 246 ); 247 248 return get_posts( $query_args ); 232 249 } 233 250 -
lloyd-gallery/tags/1.1.4/includes/class-lloyga-rest.php
r3716027 r3738613 1105 1105 // the photo is left in the Media Library for the client to delete 1106 1106 // for good if they want the space back. (Its post_parent is left 1107 // alone too, so it won't necessarily show as "Unattached" there .)1107 // alone too, so it won't necessarily show as "Unattached" there). 1108 1108 $result = LLOYGA_Photos::remove( $album_id, $photo_id ); 1109 1109 if ( is_wp_error( $result ) ) { -
lloyd-gallery/tags/1.1.4/lloyd-gallery.php
r3716043 r3738613 3 3 * Plugin Name: Lloyd Gallery 4 4 * Description: Album-based photo galleries for clients who don't want to think about photo editing. Automatic orientation, compression and WebP conversion on upload. 5 * Version: 1.1. 35 * Version: 1.1.4 6 6 * Requires at least: 6.7 7 7 * Requires PHP: 8.1 … … 19 19 } 20 20 21 define( 'LLOYGA_VERSION', '1.1. 3' );21 define( 'LLOYGA_VERSION', '1.1.4' ); 22 22 define( 'LLOYGA_PLUGIN_FILE', __FILE__ ); 23 23 define( 'LLOYGA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); … … 51 51 52 52 /** 53 * Loads the Polylang integration, and only when Polylang itself starts up. 54 * `pll_init` is Polylang's own action, fired from `plugins_loaded` once 55 * its API exists, so on a site without Polylang the file is never read. 56 */ 57 function lloyga_load_polylang(): void { 58 require_once LLOYGA_PLUGIN_DIR . 'includes/integrations/class-lloyga-polylang.php'; 59 LLOYGA_Polylang::boot(); 60 } 61 add_action( 'pll_init', 'lloyga_load_polylang' ); 62 63 /** 53 64 * Creates the gallery page, registers the post type against that page's 54 65 * actual path, creates the membership table and then flushes, so album -
lloyd-gallery/tags/1.1.4/readme.txt
r3716043 r3738613 5 5 Tested up to: 7.1 6 6 Requires PHP: 8.1 7 Stable tag: 1.1. 37 Stable tag: 1.1.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 175 175 == Changelog == 176 176 177 = 1.1.4 = 178 * Album photos now show on sites using Polylang with media translation switched on. Before, photos in another language, and every photo uploaded before Polylang was installed, were missing from album pages and the album screen. 179 * Album dates now use your site's own date format from Settings > General, so they read naturally in any language. Before, they were always shown as day, month, year. 180 177 181 = 1.1.3 = 178 182 * Your galleries, album list and lightbox now always show visitors resized copies of your photos, never the original files, so the location data phones store in photos isn't shared. … … 253 257 == Upgrade Notice == 254 258 259 = 1.1.4 = 260 Fixes missing album photos on sites that use Polylang's media translation. Album dates now follow your site's date format. 261 255 262 = 1.1.3 = 256 263 Stops original photo files, which can contain location data, being shown to visitors. Recommended for everyone. -
lloyd-gallery/trunk/includes/class-lloyga-admin-pages.php
r3716027 r3738613 487 487 echo esc_html( sprintf( _n( '%d photo', '%d photos', $count, 'lloyd-gallery' ), $count ) ); 488 488 ?> 489 · <?php echo esc_html( get_the_date( ' j M Y', $album ) ); ?>489 · <?php echo esc_html( get_the_date( '', $album ) ); ?> 490 490 </span> 491 491 </a> -
lloyd-gallery/trunk/includes/class-lloyga-frontend.php
r3716043 r3738613 233 233 } 234 234 235 $date = '<p class="lg-event-date">' . esc_html( get_the_date( 'j F Y', $current ) ) . '</p>'; 235 // No format of our own: the site's date format (Settings > General) 236 // decides the order of day, month and year, and WordPress translates 237 // the month name, so the date reads naturally in any language. The 238 // album cards and the admin album list follow the same rule. 239 $date = '<p class="lg-event-date">' . esc_html( get_the_date( '', $current ) ) . '</p>'; 236 240 237 241 // WordPress has already decided this visitor may see this album by … … 342 346 </span> 343 347 <span class="lg-album-card-title"><?php echo esc_html( get_the_title( $album ) ); ?></span> 344 <span class="lg-album-card-date"><?php echo esc_html( get_the_date( ' j F Y', $album ) ); ?></span>348 <span class="lg-album-card-date"><?php echo esc_html( get_the_date( '', $album ) ); ?></span> 345 349 </a> 346 350 </li> … … 430 434 $lightbox_data = self::visitor_image( $photo->ID ); 431 435 $lightbox_url = $lightbox_data['url']; 432 $lightbox_w = $lightbox_data['width'] ? : $width;433 $lightbox_h = $lightbox_data['height'] ? : $height;436 $lightbox_w = $lightbox_data['width'] ? $lightbox_data['width'] : $width; 437 $lightbox_h = $lightbox_data['height'] ? $lightbox_data['height'] : $height; 434 438 435 439 $grid_sizes = array_filter( $breakpoints, static fn( $size ) => $size >= 768 ); -
lloyd-gallery/trunk/includes/class-lloyga-photos.php
r3716027 r3738613 221 221 } 222 222 223 return get_posts( 223 /** 224 * Filters the query that loads an album's photos. 225 * 226 * The IDs come from the album's own stored list, so the query is 227 * meant to return exactly those attachments. A plugin that filters 228 * attachment queries site-wide (by language, for example) would 229 * otherwise drop some of them from the album, so its integration 230 * can use this to keep the list whole. This plugin adds nothing here 231 * itself. 232 * 233 * @param array $query_args WP_Query arguments. 234 * @param int $album_id Album ID. 235 */ 236 $query_args = apply_filters( 237 'lloyga_album_photos_query_args', 224 238 array( 225 239 'post_type' => 'attachment', … … 228 242 'orderby' => 'post__in', 229 243 'posts_per_page' => -1, 230 ) 231 ); 244 ), 245 $album_id 246 ); 247 248 return get_posts( $query_args ); 232 249 } 233 250 -
lloyd-gallery/trunk/includes/class-lloyga-rest.php
r3716027 r3738613 1105 1105 // the photo is left in the Media Library for the client to delete 1106 1106 // for good if they want the space back. (Its post_parent is left 1107 // alone too, so it won't necessarily show as "Unattached" there .)1107 // alone too, so it won't necessarily show as "Unattached" there). 1108 1108 $result = LLOYGA_Photos::remove( $album_id, $photo_id ); 1109 1109 if ( is_wp_error( $result ) ) { -
lloyd-gallery/trunk/lloyd-gallery.php
r3716043 r3738613 3 3 * Plugin Name: Lloyd Gallery 4 4 * Description: Album-based photo galleries for clients who don't want to think about photo editing. Automatic orientation, compression and WebP conversion on upload. 5 * Version: 1.1. 35 * Version: 1.1.4 6 6 * Requires at least: 6.7 7 7 * Requires PHP: 8.1 … … 19 19 } 20 20 21 define( 'LLOYGA_VERSION', '1.1. 3' );21 define( 'LLOYGA_VERSION', '1.1.4' ); 22 22 define( 'LLOYGA_PLUGIN_FILE', __FILE__ ); 23 23 define( 'LLOYGA_PLUGIN_DIR', plugin_dir_path( __FILE__ ) ); … … 51 51 52 52 /** 53 * Loads the Polylang integration, and only when Polylang itself starts up. 54 * `pll_init` is Polylang's own action, fired from `plugins_loaded` once 55 * its API exists, so on a site without Polylang the file is never read. 56 */ 57 function lloyga_load_polylang(): void { 58 require_once LLOYGA_PLUGIN_DIR . 'includes/integrations/class-lloyga-polylang.php'; 59 LLOYGA_Polylang::boot(); 60 } 61 add_action( 'pll_init', 'lloyga_load_polylang' ); 62 63 /** 53 64 * Creates the gallery page, registers the post type against that page's 54 65 * actual path, creates the membership table and then flushes, so album -
lloyd-gallery/trunk/readme.txt
r3716043 r3738613 5 5 Tested up to: 7.1 6 6 Requires PHP: 8.1 7 Stable tag: 1.1. 37 Stable tag: 1.1.4 8 8 License: GPLv2 or later 9 9 License URI: https://www.gnu.org/licenses/gpl-2.0.html … … 175 175 == Changelog == 176 176 177 = 1.1.4 = 178 * Album photos now show on sites using Polylang with media translation switched on. Before, photos in another language, and every photo uploaded before Polylang was installed, were missing from album pages and the album screen. 179 * Album dates now use your site's own date format from Settings > General, so they read naturally in any language. Before, they were always shown as day, month, year. 180 177 181 = 1.1.3 = 178 182 * Your galleries, album list and lightbox now always show visitors resized copies of your photos, never the original files, so the location data phones store in photos isn't shared. … … 253 257 == Upgrade Notice == 254 258 259 = 1.1.4 = 260 Fixes missing album photos on sites that use Polylang's media translation. Album dates now follow your site's date format. 261 255 262 = 1.1.3 = 256 263 Stops original photo files, which can contain location data, being shown to visitors. Recommended for everyone.
Note:
See TracChangeset
for help on using the changeset viewer.