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":647068,"date":"2026-11-19T13:23:22","date_gmt":"2026-11-19T13:23:22","guid":{"rendered":"http:\/\/www.foxmultimedia.co.uk\/fizzydev\/?p=647068"},"modified":"2026-11-19T13:23:22","modified_gmt":"2026-11-19T13:23:22","slug":"2026%e5%b9%b4%e7%89%88%e6%9c%80%e6%96%b0%e3%82%aa%e3%83%b3%e3%83%a9%e3%82%a4%e3%83%b3%e3%82%ab%e3%82%b8%e3%83%8e%ef%bc%9a%e6%9c%80%e6%96%b0%e3%82%ab%e3%82%b8%e3%83%8e%e3%82%a6%e3%82%a7%e3%83%96","status":"publish","type":"post","link":"http:\/\/www.foxmultimedia.co.uk\/fizzydev\/?p=647068","title":{"rendered":"2026\u5e74\u7248\u6700\u65b0\u30aa\u30f3\u30e9\u30a4\u30f3\u30ab\u30b8\u30ce\uff1a\u6700\u65b0\u30ab\u30b8\u30ce\u30a6\u30a7\u30d6\u30b5\u30a4\u30c8\u4e00\u89a7"},"content":{"rendered":"
\n

\u30d6\u30ed\u30b0<\/p>\n