Changeset 3259762
- Timestamp:
- 03/21/2025 01:37:01 PM (12 months ago)
- Location:
- gallery-block-lightbox
- Files:
-
- 5 edited
- 1 copied
-
assets/screenshot-3.png (modified) (1 prop) (previous)
-
tags/1.16 (copied) (copied from gallery-block-lightbox/trunk)
-
tags/1.16/README.md (modified) (2 diffs)
-
tags/1.16/gallery-block-lightbox.php (modified) (1 diff)
-
trunk/README.md (modified) (2 diffs)
-
trunk/gallery-block-lightbox.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
gallery-block-lightbox/assets/screenshot-3.png
-
Property
svn:mime-type
changed from
application/octet-streamtoimage/png
-
Property
svn:mime-type
changed from
-
gallery-block-lightbox/tags/1.16/README.md
r3218386 r3259762 112 112 ``` 113 113 114 ### Can I change or disable the animation on image transitions? 115 116 By default, baguetteBox.js shows a slide-in animation on image transitions. You can change it to the following filter to `'fadeIn'`: 117 ``` 118 add_filter( 'baguettebox_animation', function () { return 'fadeIn'; } ); 119 ``` 120 Or disable the animation completely with `'false'`: 121 ``` 122 add_filter( 'baguettebox_animation', function () { return 'false'; } ); 123 ``` 124 114 125 ## Screenshots 115 126 … … 124 135 ### 1.15 125 136 137 - Add filter baguettebox_animation to choose between 'slideIn' | 'fadeIn' | 'false' animation styles on image transitions. 138 139 ### 1.15 140 126 141 - Add filter baguettebox_captions to change the JavaScript function to get the caption of an image 127 142 -
gallery-block-lightbox/tags/1.16/gallery-block-lightbox.php
r3156208 r3259762 50 50 $baguettebox_captions = apply_filters( 'baguettebox_captions', 'function(t){var e=t.parentElement.classList.contains("wp-block-image")||t.parentElement.classList.contains("wp-block-media-text__media")?t.parentElement.querySelector("figcaption"):t.parentElement.parentElement.querySelector("figcaption,dd");return!!e&&e.innerHTML}' ); 51 51 52 wp_add_inline_script( 'baguettebox', 'window.addEventListener("load", function() {baguetteBox.run("' . $baguettebox_selector . '",{captions:' . $baguettebox_captions . ',filter:' . $baguettebox_filter . ',ignoreClass:"' . $baguettebox_ignoreclass . '"});});' ); 52 /** 53 * Filters the animation attribute of baguetteBox.js 54 * 55 * @since 1.16 56 * 57 * @param string $value Use the given animation style on image transitions. 58 * 'slideIn' | 'fadeIn' | 'false' 59 */ 60 $baguettebox_animation = apply_filters( 'baguettebox_animation', 'slideIn' ); 53 61 62 $baguettebox_options = "{captions:{$baguettebox_captions},filter:{$baguettebox_filter},ignoreClass:'{$baguettebox_ignoreclass}',animation:'{$baguettebox_animation}'}"; 63 64 wp_add_inline_script( "baguettebox", "window.addEventListener('load', function() {baguetteBox.run('{$baguettebox_selector}',{$baguettebox_options});});" ); 54 65 } 55 66 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\register_assets' ); -
gallery-block-lightbox/trunk/README.md
r3218386 r3259762 112 112 ``` 113 113 114 ### Can I change or disable the animation on image transitions? 115 116 By default, baguetteBox.js shows a slide-in animation on image transitions. You can change it to the following filter to `'fadeIn'`: 117 ``` 118 add_filter( 'baguettebox_animation', function () { return 'fadeIn'; } ); 119 ``` 120 Or disable the animation completely with `'false'`: 121 ``` 122 add_filter( 'baguettebox_animation', function () { return 'false'; } ); 123 ``` 124 114 125 ## Screenshots 115 126 … … 124 135 ### 1.15 125 136 137 - Add filter baguettebox_animation to choose between 'slideIn' | 'fadeIn' | 'false' animation styles on image transitions. 138 139 ### 1.15 140 126 141 - Add filter baguettebox_captions to change the JavaScript function to get the caption of an image 127 142 -
gallery-block-lightbox/trunk/gallery-block-lightbox.php
r3156208 r3259762 50 50 $baguettebox_captions = apply_filters( 'baguettebox_captions', 'function(t){var e=t.parentElement.classList.contains("wp-block-image")||t.parentElement.classList.contains("wp-block-media-text__media")?t.parentElement.querySelector("figcaption"):t.parentElement.parentElement.querySelector("figcaption,dd");return!!e&&e.innerHTML}' ); 51 51 52 wp_add_inline_script( 'baguettebox', 'window.addEventListener("load", function() {baguetteBox.run("' . $baguettebox_selector . '",{captions:' . $baguettebox_captions . ',filter:' . $baguettebox_filter . ',ignoreClass:"' . $baguettebox_ignoreclass . '"});});' ); 52 /** 53 * Filters the animation attribute of baguetteBox.js 54 * 55 * @since 1.16 56 * 57 * @param string $value Use the given animation style on image transitions. 58 * 'slideIn' | 'fadeIn' | 'false' 59 */ 60 $baguettebox_animation = apply_filters( 'baguettebox_animation', 'slideIn' ); 53 61 62 $baguettebox_options = "{captions:{$baguettebox_captions},filter:{$baguettebox_filter},ignoreClass:'{$baguettebox_ignoreclass}',animation:'{$baguettebox_animation}'}"; 63 64 wp_add_inline_script( "baguettebox", "window.addEventListener('load', function() {baguetteBox.run('{$baguettebox_selector}',{$baguettebox_options});});" ); 54 65 } 55 66 add_action( 'wp_enqueue_scripts', __NAMESPACE__ . '\register_assets' );
Note: See TracChangeset
for help on using the changeset viewer.