__  __    __   __  _____      _            _          _____ _          _ _ 
 |  \/  |   \ \ / / |  __ \    (_)          | |        / ____| |        | | |
 | \  / |_ __\ V /  | |__) | __ ___   ____ _| |_ ___  | (___ | |__   ___| | |
 | |\/| | '__|> <   |  ___/ '__| \ \ / / _` | __/ _ \  \___ \| '_ \ / _ \ | |
 | |  | | |_ / . \  | |   | |  | |\ V / (_| | ||  __/  ____) | | | |  __/ | |
 |_|  |_|_(_)_/ \_\ |_|   |_|  |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1
 if you need WebShell for Seo everyday contact me on Telegram
 Telegram Address : @jackleet
        
        
For_More_Tools: Telegram: @jackleet | Bulk Smtp support mail sender | Business Mail Collector | Mail Bouncer All Mail | Bulk Office Mail Validator | Html Letter private



Upload:

Command:

[email protected]: ~ $
import { RichText } from "@wordpress/block-editor";
import {
    sanitizeURL,
    BlockProps,
    sanitizeIconValue,
} from "@essential-blocks/controls";
const Save = ({ attributes }) => {
    const {
        blockId,
        sliderType,
        sliderContentType,
        images,
        arrows,
        adaptiveHeight,
        autoplay,
        autoplaySpeed,
        dots,
        fade,
        infinite,
        vertical,
        pauseOnHover,
        speed,
        textAlign,
        classHook,
        arrowNextIcon,
        arrowPrevIcon,
        dotPreset,
        isRTLEnable,
        titleTag,
        contentTag,
        version,
        showLightbox,
        enableLazyLoad,
    } = attributes;

    //Slider Settings
    const settings = {
        arrows,
        adaptiveHeight,
        autoplay,
        autoplaySpeed,
        dots,
        fade,
        infinite,
        pauseOnHover,
        slidesToShow: attributes.slideToShowRange,
        speed,
        vertical,
        currentSlide: 0,
        rtl: isRTLEnable,
        responsive: [
            {
                breakpoint: 1025,
                settings: {
                    slidesToShow:
                        attributes.TABslideToShowRange ||
                        attributes.slideToShowRange,
                },
            },
            {
                breakpoint: 767,
                settings: {
                    slidesToShow:
                        attributes.MOBslideToShowRange ||
                        attributes.slideToShowRange,
                },
            },
        ],
    };

    const sliderTypeClass =
        sliderType === "content"
            ? "eb-slider-type-content"
            : "eb-slider-type-image";

    return (
        <BlockProps.Save attributes={attributes}>
            <div
                className={`eb-parent-wrapper eb-parent-${blockId} ${classHook}`}
            >
                <div
                    className={`eb-slider-wrapper ${blockId}`}
                    data-blockid={blockId}
                    data-version={version}
                    data-settings={btoa(JSON.stringify(settings))}
                    data-arrowNextIcon={sanitizeIconValue(arrowNextIcon)}
                    data-arrowPrevIcon={sanitizeIconValue(arrowPrevIcon)}
                    data-lightbox={version === "v2" ? showLightbox : false}
                >
                    <div className={`eb-slider-init ${sliderTypeClass}`}>
                        {images.map((image, index) => (
                            <div
                                className={`eb-slider-item ${sliderContentType}`}
                                key={index}
                                data-src={image.url}
                            >
                                {image.buttonUrl && image.isValidUrl ? (
                                    <div>
                                        <a
                                            href={sanitizeURL(image.buttonUrl)}
                                            target={
                                                image.openNewTab
                                                    ? "_blank"
                                                    : "_self"
                                            }
                                            rel="noopener"
                                        >
                                            <img
                                                className="eb-slider-image"
                                                {...(enableLazyLoad ? { 'data-lazy': image.url } : { src: image.url })}

                                            />
                                        </a>
                                    </div>
                                ) : (
                                    <div>
                                        <img
                                            className="eb-slider-image"
                                            {...(enableLazyLoad ? { 'data-lazy': image.url } : { src: image.url })}
                                        />
                                    </div>
                                )}
                                {sliderType === "content" && (
                                    <div
                                        className={`eb-slider-content align-${textAlign} ${sliderContentType === "content-1" && image.enableContentLink && image.contentLink && image.contentLink.length > 0 && image.isContentUrlValid ? 'has-content-link' : ''}`}
                                        data-content-link={sliderContentType === "content-1" && image.enableContentLink && image.contentLink && image.contentLink.length > 0 && image.isContentUrlValid ? sanitizeURL(image.contentLink) : ''}
                                        data-content-target={sliderContentType === "content-1" && image.contentOpenNewTab ? '_blank' : '_self'}
                                    >
                                        {image.title &&
                                            image.title.length > 0 && (
                                                <RichText.Content
                                                    tagName={titleTag}
                                                    className="eb-slider-title"
                                                    value={image.title}
                                                />
                                            )}
                                        {image.subtitle &&
                                            image.subtitle.length > 0 && (
                                                <RichText.Content
                                                    tagName={contentTag}
                                                    className="eb-slider-subtitle"
                                                    value={image.subtitle}
                                                />
                                            )}

                                        <div className="eb-slider-button-wrapper">
                                            {image.showButton &&
                                                image.buttonText &&
                                                image.buttonText.length > 0 && (
                                                    <a
                                                        href={
                                                            image.buttonUrl &&
                                                                image.isValidUrl
                                                                ? sanitizeURL(
                                                                    image.buttonUrl,
                                                                )
                                                                : ""
                                                        }
                                                        className="eb-slider-button"
                                                        target={
                                                            image.openNewTab
                                                                ? "_blank"
                                                                : "_self"
                                                        }
                                                        rel="noopener"
                                                    >
                                                        <RichText.Content
                                                            value={
                                                                image.buttonText
                                                            }
                                                        />
                                                    </a>
                                                )}

                                            {image.showSecondButton &&
                                                image.secondButtonText &&
                                                image.secondButtonText.length >
                                                0 && (
                                                    <a
                                                        href={
                                                            image.secondButtonUrl &&
                                                                image.isValidUrl
                                                                ? sanitizeURL(
                                                                    image.secondButtonUrl,
                                                                )
                                                                : ""
                                                        }
                                                        className="eb-slider-second-button"
                                                        target={
                                                            image.secondButtonOpenNewTab
                                                                ? "_blank"
                                                                : "_self"
                                                        }
                                                        rel="noopener"
                                                    >
                                                        <RichText.Content
                                                            value={
                                                                image.secondButtonText
                                                            }
                                                        />
                                                    </a>
                                                )}
                                        </div>
                                    </div>
                                )}
                            </div>
                        ))}
                    </div>
                </div>
            </div>
        </BlockProps.Save >
    );
};

export default Save;

Filemanager

Name Type Size Permission Actions
constants Folder 0750
attributes.js File 8.49 KB 0640
deprecated.js File 141.37 KB 0640
edit.js File 24.84 KB 0640
example.js File 66 B 0640
frontend.js File 16.85 KB 0640
helpers.js File 7.27 KB 0640
icon.js File 2.21 KB 0640
icon.svg File 1.8 KB 0640
index.js File 712 B 0640
inspector.js File 57.57 KB 0640
save.js File 10.01 KB 0640
style.css File 2.03 KB 0640
style.js File 22.34 KB 0640
style.scss File 4.01 KB 0640
Filemanager