Open mamaretti opened 3 months ago
@artemiomorales can you look into this?
Pulling in feedback and a question from a separate issue:
I am the developer of an image caption plugin for publishers who need to show image attributions for legal reasons. With WordPress 6.5, lightboxes no longer show the caption I added to images in the post content since lightbox HTML is not rendered separately.
Ideally, I could add a placeholder for the caption into block_core_image_print_lightbox_overlay() using a filter, but there is none. Would you be able to provide one?
In a next step, I would need to figure out how to fill it, but the render_block_core/image filter might just be good for that.
@annezazu Thanks for the ping! I'm not sure I have bandwidth to look at this for the upcoming release. To clarify @webzunft, do you need to render the caption inside the lightbox overlay itself? And this was working prior to 6.5?
@artemiomorales
do you need to render the caption inside the lightbox overlay itself? And this was working prior to 6.5?
Yes and yes. In 6.4, I just had to place my caption markup close to the image and it was showing up with it in the lightbox.
It might be related to this refactoring that uses a shared HTML for all Lightbox overlays:
Description
hello
since #58835 figcaption is missing on opened lightbox image
(WP 6.5)
Step-by-step reproduction instructions
add an image with caption and trigger lightbox link
Screenshots, screen recording, code snippet
No response
Environment info
No response
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes