HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: /home/confeduphaar/public_html/wp-content/plugins/essential-blocks/src/blocks/openverse/src/save.js
import { __ } from "@wordpress/i18n";
import {
BlockProps
} from "@essential-blocks/controls";
const save = ({ attributes }) => {
    const {
        blockId,
        horizontalAlign,
        verticalAlign,
        verticalAlignCap2,
        stylePreset,
        displayAttribution,
        attributionStyle,
        hoverEffect,
        classHook,
        imageurl,
        imageAttr,
    } = attributes;

    return (
        <BlockProps.Save attributes={attributes}>
            {imageurl && (
                <div className={`eb-parent-wrapper eb-parent-${blockId} ${classHook}`}>
                    <figure
                        className={`eb-openverse-wrapper ${blockId} img-style-${stylePreset} ${attributionStyle}  ${hoverEffect}`}
                        data-id={blockId}
                    >
                        <div className="image-wrapper">
                            <img src={imageurl} alt={imageAttr.title} />
                        </div>

                        {displayAttribution && (
                            <>
                                <div className="image-attribution">
                                    {imageAttr.title && (
                                        <span>
                                            {imageAttr.foreignUrl && (
                                                <a
                                                    target="_blank"
                                                    rel="noopener noreferrer"
                                                    href={imageAttr.foreignUrl}
                                                >
                                                    {imageAttr.title}
                                                </a>
                                            )}
                                            {!imageAttr.foreignUrl && imageAttr.title}
                                        </span>
                                    )}
                                    {/* // creator */}
                                    {imageAttr.creator && (
                                        <span>
                                            {__(" By ", "essential-blocks")}

                                            {imageAttr.creatorUrl && (
                                                <a
                                                    target="_blank"
                                                    rel="noopener noreferrer"
                                                    href={imageAttr.creatorUrl}
                                                >
                                                    {imageAttr.creator}
                                                </a>
                                            )}
                                            {!imageAttr.creatorUrl && imageAttr.creator}
                                        </span>
                                    )}
                                    {/* // licensed */}
                                    {imageAttr.license && (
                                        <span>
                                            {imageAttr.licenseUrl && (
                                                <>
                                                    {__(" Is licensed under ", "essential-blocks")}
                                                    <a
                                                        target="_blank"
                                                        rel="noopener noreferrer"
                                                        href={imageAttr.licenseUrl}
                                                        className="licensed-wrap"
                                                    >
                                                        {imageAttr.license + " " + imageAttr.licenseVersion}
                                                    </a>
                                                </>
                                            )}
                                            {!imageAttr.licenseUrl &&
                                                imageAttr.license + " " + imageAttr.licenseVersion}

                                            {__(" .", "essential-blocks")}
                                        </span>
                                    )}
                                </div>
                            </>
                        )}
                    </figure>
                </div>
            )}
        </BlockProps.Save>
    );
};

export default save;