/home/vianto5/cititower.mx/wp-content/plugins/easy-fancybox/src
Edit: /home/vianto5/cititower.mx/wp-content/plugins/easy-fancybox/src/lightbox-panel.jsx (3029B)
import { InspectorControls } from '@wordpress/block-editor';
import { PanelBody, Button, ToggleControl } from '@wordpress/components';
import { createHigherOrderComponent } from '@wordpress/compose';
import { addFilter } from '@wordpress/hooks';
import { __ } from '@wordpress/i18n';
import './blocks.scss';
const withLightboxPanelControls = createHigherOrderComponent( ( BlockEdit ) => {
return ( props ) => {
const { name } = props;
const isImageOrGalleryBlock = 'core/image' === name || 'core/gallery' === name;
// firelight object passed via wp_localize_script
const activeLightbox = firelight.activeLightbox;
const isProLightbox = 'Firelight Pro Lightbox' === activeLightbox;
const isPayingUser = firelight.isPayingUser;
const isProUser = firelight.isProUser;
const settingsUrl = firelight.settingsUrl;
const lightboxPanelOpen = firelight.lightboxPanelOpen === '1' ? true : false;
if ( ! isImageOrGalleryBlock ) {
return
}
return (
<>
{ __( 'You are using: ' ) }
{ activeLightbox }
{ '.' }
{
! isProUser && (
<>
{ __( 'Upgrade to enable Pro Lightbox.' ) }
{ __( ' 20% off with coupon PRO20.' ) }
{ ' ' }
>
)
}
{
isProUser && ! isProLightbox && (
{ __( 'Notice: You have an active Firelight Pro license and can use the Firelight Pro Lightbox!') }
)
}
>
);
};
}, 'withLightboxPanelControls' );
addFilter(
'editor.BlockEdit',
'lightpress/lightbox-panel',
withLightboxPanelControls
);