Changeset 3478485
- Timestamp:
- 03/09/2026 07:25:28 PM (3 weeks ago)
- Location:
- responsive-lightbox/trunk
- Files:
-
- 3 edited
-
includes/class-frontend.php (modified) (3 diffs)
-
readme.txt (modified) (3 diffs)
-
responsive-lightbox.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
responsive-lightbox/trunk/includes/class-frontend.php
r3465060 r3478485 73 73 public function get_data( $attr ) { 74 74 return property_exists( $this, $attr ) ? $this->{$attr} : null; 75 } 76 77 /** 78 * Determine whether gallery assets should be preloaded for the current request. 79 * 80 * @return bool 81 */ 82 private function should_preload_gallery_assets() { 83 global $post; 84 85 if ( ! is_object( $post ) ) 86 return false; 87 88 if ( get_post_type( $post ) === 'rl_gallery' && is_singular( 'rl_gallery' ) ) 89 return true; 90 91 return has_shortcode( $post->post_content, 'gallery' ) || has_shortcode( $post->post_content, 'rl_gallery' ); 75 92 } 76 93 … … 1764 1781 */ 1765 1782 public function widget_output( $content, $widget_id_base, $widget_id ) { 1766 return wp_kses( $this->add_lightbox( $content ), $this->get_comment_lightbox_allowed_html() ); 1783 if ( ( is_admin() && ! wp_doing_ajax() ) || Responsive_Lightbox()->options['settings']['widgets'] !== true ) 1784 return $content; 1785 1786 // Widgets can contain valid form controls and inline scripts (e.g. core Archives dropdown handlers). 1787 // Reuse the pre-2.7.4 behavior and only apply lightbox rewriting. 1788 return $this->add_lightbox( $content ); 1767 1789 } 1768 1790 … … 2638 2660 if ( ! empty( $this->style_data['basicmasonry'] ) ) 2639 2661 wp_add_inline_style( 'responsive-lightbox-basicmasonry-gallery', $this->style_data['basicmasonry'] ); 2662 2663 if ( $this->should_preload_gallery_assets() ) { 2664 $styles = apply_filters( 2665 'rl_gallery_preload_styles', 2666 [ 2667 'responsive-lightbox-gallery', 2668 'responsive-lightbox-basicgrid-gallery', 2669 'responsive-lightbox-basicslider-gallery', 2670 'responsive-lightbox-basicmasonry-gallery' 2671 ] 2672 ); 2673 2674 foreach ( $styles as $style ) { 2675 if ( is_string( $style ) && $style !== '' ) 2676 wp_enqueue_style( $style ); 2677 } 2678 2679 $scripts = apply_filters( 'rl_gallery_preload_scripts', [] ); 2680 2681 foreach ( $scripts as $script ) { 2682 if ( is_string( $script ) && $script !== '' ) 2683 wp_enqueue_script( $script ); 2684 } 2685 } 2640 2686 } 2641 2687 -
responsive-lightbox/trunk/readme.txt
r3468845 r3478485 5 5 Requires at least: 6.0 6 6 Tested up to: 6.9.1 7 Stable tag: 2.7. 47 Stable tag: 2.7.5 8 8 Requires PHP: 7.0 9 9 License: MIT License … … 141 141 == Changelog == 142 142 143 = 2.7.5 = 144 * Fix: Restore widget rendering when comments lightbox filtering runs, including Archives dropdown markup 145 * Tweak: Preload built-in gallery assets earlier for gallery pages and shortcode requests 146 143 147 = 2.7.4 = 144 148 * Fix: Make gallery title sorting independent of lightbox title setting … … 618 622 == Upgrade Notice == 619 623 620 = 2.7. 4=621 Imp ortant fixes for gallery title sorting and folder option handling to prevent errors624 = 2.7.5 = 625 Improves built-in gallery asset loading reliability and restores widget rendering when comments lightbox filtering runs. -
responsive-lightbox/trunk/responsive-lightbox.php
r3468845 r3478485 3 3 Plugin Name: Responsive Lightbox & Gallery 4 4 Description: Responsive Lightbox & Gallery allows users to create galleries and view larger versions of images, galleries and videos in a lightbox (overlay) effect optimized for mobile devices. 5 Version: 2.7. 45 Version: 2.7.5 6 6 Author: dFactory 7 7 Author URI: http://www.dfactory.co/ … … 46 46 * 47 47 * @class Responsive_Lightbox 48 * @version 2.7. 448 * @version 2.7.5 49 49 */ 50 50 class Responsive_Lightbox { … … 285 285 'origin_top' => true 286 286 ], 287 'version' => '2.7. 4',287 'version' => '2.7.5', 288 288 'activation_date' => '' 289 289 ]; … … 2145 2145 } 2146 2146 2147 // gallery style2148 wp_register_style( 'responsive-lightbox-gallery', plugins_url( 'css/gallery.css', __FILE__ ), [], $this->defaults['version'] );2149 2147 } 2150 2148
Note: See TracChangeset
for help on using the changeset viewer.