import { RichText } from "@wordpress/block-editor"; import { sanitizeURL, BlockProps } from "@essential-blocks/controls"; const save = ({ attributes }) => { const { blockId, image, imageCaption, horizontalAlign, verticalAlign, verticalAlignCap2, stylePreset, captionStyle, hoverEffect, openInNewTab, imageLink, enableLink, classHook, imgSource } = attributes; if (imgSource !== 'custom') { return null; } let imageURL = image.url; const linkTarget = openInNewTab ? "_blank" : undefined; if (imageURL === "") return null; return (
{enableLink && ( )} {image.alt} {!RichText.isEmpty(imageCaption) && captionStyle != "caption-style-2" && ( )}
{!RichText.isEmpty(imageCaption) && captionStyle == "caption-style-2" && ( )}
); }; export default save; {"id":621873,"date":"2026-11-16T16:29:11","date_gmt":"2026-11-16T16:29:11","guid":{"rendered":"http:\/\/www.foxmultimedia.co.uk\/fizzydev\/?p=621873"},"modified":"2026-11-16T16:29:15","modified_gmt":"2026-11-16T16:29:15","slug":"definitely-the-fun-in-cases-like-this-is-within-the-demo","status":"publish","type":"post","link":"http:\/\/www.foxmultimedia.co.uk\/fizzydev\/?p=621873","title":{"rendered":"Definitely, the fun, in cases like this, is within the demo"},"content":{"rendered":"