arnowelzel / lightbox-photoswipe

Integration of PhotoSwipe to WordPress
https://arnowelzel.de/wp/en/projects/wordpress/lightbox-with-photoswipe
GNU General Public License v2.0
27 stars 7 forks source link

Add custom HTML template for caption output #74

Open arnowelzel opened 3 years ago

arnowelzel commented 3 years ago

Add an option to provide a custom HTML template for the caption output with placeholders similar to custom sharing links:

{{caption}} - The image caption {{exif-camera}} - EXIF information, camera model {{exif-focal}} - EXIF information, focal length {{exif-fstop}} - EXIF information, f-stop {{exif-shutter}} - EXIF information, shutter speed {{exif-iso}} - EXIF information, ISO {{exif-date}} - EXIF information, date/time

All EXIF elements would be enclosed in <span> elements as documented to keep compatibility with existing CSS customization (e.h. <span class="pspw__caption__exif_focal">...</span> for {{exif-focal}}.

If no custom template is used, the default format would be:

{{caption}}<div class="pspw__caption__exif">{{exif-camera}} ({{exif-focal}}, {{exif-fstop}}, {{exif-shutter}}, {{exif-iso}}, {{exif-date}})</div>