Save
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -1 +0,0 @@
|
|||||||
{"version":3,"sources":["main.scss"],"names":[],"mappings":"AAAA,8BACC,YAAA,CACA,kBAAA,CACA,WAAA,CAGD,oCACC,SAAA,CACA,YAAA,CACA,eAAA,CAIA,2DACC,YAAA,CACA,qBAAA,CACA,iBAAA,CAED,0DACC,oBAAA,CACA,aAAA,CACA,aAAA,CAED,2DACC,WAAA,CACA,UAAA,CAED,yDACC,QAAA,CAED,2DACC,aAAA,CACA,QAAA,CAED,+DACC,QAAA,CAED,yFACC,0BAAA,CACA,cAAA,CAED,2FACC,kBAAA,CACA,gBAAA,CAED,0FACC,4BAAA,CACA,qBAAA,CACA,iBAAA,CAED,wFACC,4BAAA,CACA,6BAAA,CACA,iBAAA,CAED,mDACC,oGACC,0BAAA,CACA,cAAA,CAED,sGACC,kBAAA,CACA,gBAAA,CAED,qGACC,4BAAA,CACA,qBAAA,CACA,iBAAA,CAED,mGACC,4BAAA,CACA,6BAAA,CACA,iBAAA,CAAA,CAGF,+CACC,gGACC,0BAAA,CACA,cAAA,CAED,kGACC,kBAAA,CACA,gBAAA,CAED,iGACC,4BAAA,CACA,qBAAA,CACA,iBAAA,CAED,+FACC,4BAAA,CACA,6BAAA,CACA,iBAAA,CAAA,CAGF,qDACC,sGACC,0BAAA,CACA,cAAA,CAED,wGAEC,kBAAA,CACA,gBAAA,CAED,uGAEC,4BAAA,CACA,qBAAA,CACA,iBAAA,CAED,qGACC,4BAAA,CACA,6BAAA,CACA,iBAAA,CAAA,CAGF,+CACC,gGACC,0BAAA,CACA,cAAA,CAED,kGACC,kBAAA,CACA,gBAAA,CAED,iGACC,4BAAA,CACA,qBAAA,CACA,iBAAA,CAED,+FACC,4BAAA,CACA,6BAAA,CACA,iBAAA,CAAA,CAGF,qDACC,sGACC,0BAAA,CACA,cAAA,CAED,wGAEC,kBAAA,CACA,gBAAA,CAED,uGAEC,4BAAA,CACA,qBAAA,CACA,iBAAA,CAED,qGACC,4BAAA,CACA,6BAAA,CACA,iBAAA,CAAA,CAGF,+CACC,gGACC,0BAAA,CACA,cAAA,CAED,kGACC,kBAAA,CACA,gBAAA,CAED,iGACC,4BAAA,CACA,qBAAA,CACA,iBAAA,CAED,+FACC,4BAAA,CACA,6BAAA,CACA,iBAAA,CAAA","file":"main.css"}
|
|
||||||
@@ -1,180 +0,0 @@
|
|||||||
.elementor-vertical-separator {
|
|
||||||
display: flex;
|
|
||||||
align-items: center;
|
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
|
|
||||||
.elementor-vertical-separator__line {
|
|
||||||
width: 1px;
|
|
||||||
height: 100px;
|
|
||||||
background: #000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.elementor-widget-number-box {
|
|
||||||
.elementor-number-box-wrapper {
|
|
||||||
display: flex;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
.elementor-number-box-number {
|
|
||||||
display: inline-block;
|
|
||||||
flex: 0 0 auto;
|
|
||||||
line-height: 0;
|
|
||||||
}
|
|
||||||
.elementor-number-box-content {
|
|
||||||
flex-grow: 1;
|
|
||||||
width: 100%;
|
|
||||||
}
|
|
||||||
.elementor-number-box-title {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.elementor-number-box-title a {
|
|
||||||
color: inherit;
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
.elementor-number-box-description {
|
|
||||||
margin: 0;
|
|
||||||
}
|
|
||||||
&.elementor-position-inline-end .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
&.elementor-position-inline-start .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row;
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
&.elementor-position-block-start .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
&.elementor-position-block-end .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column-reverse;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
@media (min-width: ELEMENTOR_SCREEN_WIDESCREEN_MIN) {
|
|
||||||
&.elementor-widescreen-position-inline-end .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
&.elementor-widescreen-position-inline-start .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row;
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
&.elementor-widescreen-position-block-start .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
&.elementor-widescreen-position-block-end .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column-reverse;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (max-width: ELEMENTOR_SCREEN_LAPTOP_MAX) {
|
|
||||||
&.elementor-laptop-position-inline-end .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
&.elementor-laptop-position-inline-start .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row;
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
&.elementor-laptop-position-block-start .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
&.elementor-laptop-position-block-end .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column-reverse;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (max-width: ELEMENTOR_SCREEN_TABLET_EXTRA_MAX) {
|
|
||||||
&.elementor-tablet_extra-position-inline-end .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
&.elementor-tablet_extra-position-inline-start
|
|
||||||
.elementor-number-box-wrapper {
|
|
||||||
flex-direction: row;
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
&.elementor-tablet_extra-position-block-start
|
|
||||||
.elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
&.elementor-tablet_extra-position-block-end .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column-reverse;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (max-width: ELEMENTOR_SCREEN_TABLET_MAX) {
|
|
||||||
&.elementor-tablet-position-inline-end .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
&.elementor-tablet-position-inline-start .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row;
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
&.elementor-tablet-position-block-start .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
&.elementor-tablet-position-block-end .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column-reverse;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (max-width: ELEMENTOR_SCREEN_MOBILE_EXTRA_MAX) {
|
|
||||||
&.elementor-mobile_extra-position-inline-end .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
&.elementor-mobile_extra-position-inline-start
|
|
||||||
.elementor-number-box-wrapper {
|
|
||||||
flex-direction: row;
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
&.elementor-mobile_extra-position-block-start
|
|
||||||
.elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
&.elementor-mobile_extra-position-block-end .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column-reverse;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@media (max-width: ELEMENTOR_SCREEN_MOBILE_MAX) {
|
|
||||||
&.elementor-mobile-position-inline-end .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row-reverse;
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
&.elementor-mobile-position-inline-start .elementor-number-box-wrapper {
|
|
||||||
flex-direction: row;
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
&.elementor-mobile-position-block-start .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
&.elementor-mobile-position-block-end .elementor-number-box-wrapper {
|
|
||||||
align-items: unset !important;
|
|
||||||
flex-direction: column-reverse;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
(function () {
|
||||||
|
'use strict';
|
||||||
|
|
||||||
|
var activeModal = null;
|
||||||
|
var activeButton = null;
|
||||||
|
|
||||||
|
function getFocusableElements(container) {
|
||||||
|
return Array.prototype.slice.call(
|
||||||
|
container.querySelectorAll('a[href], button:not([disabled]), textarea:not([disabled]), input:not([disabled]), select:not([disabled]), [tabindex]:not([tabindex="-1"])')
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
function openPopup(button) {
|
||||||
|
var widget = button.closest('.ea-popup-widget');
|
||||||
|
var modal = widget ? widget.querySelector('[data-ea-popup-modal]') : null;
|
||||||
|
|
||||||
|
if (!modal) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
activeModal = modal;
|
||||||
|
activeButton = button;
|
||||||
|
|
||||||
|
if (typeof modal.showModal === 'function' && !modal.open) {
|
||||||
|
modal.showModal();
|
||||||
|
} else if (!modal.open) {
|
||||||
|
modal.setAttribute('open', '');
|
||||||
|
}
|
||||||
|
|
||||||
|
modal.classList.add('is-open');
|
||||||
|
modal.setAttribute('aria-hidden', 'false');
|
||||||
|
button.setAttribute('aria-expanded', 'true');
|
||||||
|
document.body.classList.add('ea-popup-lock');
|
||||||
|
|
||||||
|
var focusable = getFocusableElements(modal);
|
||||||
|
if (focusable.length) {
|
||||||
|
focusable[0].focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function closePopup(modal) {
|
||||||
|
if (!modal) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
modal.classList.remove('is-open');
|
||||||
|
modal.setAttribute('aria-hidden', 'true');
|
||||||
|
|
||||||
|
if (typeof modal.close === 'function' && modal.open) {
|
||||||
|
modal.close();
|
||||||
|
} else {
|
||||||
|
modal.removeAttribute('open');
|
||||||
|
}
|
||||||
|
|
||||||
|
if (activeButton) {
|
||||||
|
activeButton.setAttribute('aria-expanded', 'false');
|
||||||
|
activeButton.focus();
|
||||||
|
}
|
||||||
|
|
||||||
|
document.body.classList.remove('ea-popup-lock');
|
||||||
|
activeModal = null;
|
||||||
|
activeButton = null;
|
||||||
|
}
|
||||||
|
|
||||||
|
function trapFocus(event) {
|
||||||
|
if (!activeModal || event.key !== 'Tab') {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var focusable = getFocusableElements(activeModal);
|
||||||
|
if (!focusable.length) {
|
||||||
|
event.preventDefault();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var first = focusable[0];
|
||||||
|
var last = focusable[focusable.length - 1];
|
||||||
|
|
||||||
|
if (event.shiftKey && document.activeElement === first) {
|
||||||
|
event.preventDefault();
|
||||||
|
last.focus();
|
||||||
|
} else if (!event.shiftKey && document.activeElement === last) {
|
||||||
|
event.preventDefault();
|
||||||
|
first.focus();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
document.addEventListener('click', function (event) {
|
||||||
|
var openButton = event.target.closest('.ea-popup-button');
|
||||||
|
var closeButton = event.target.closest('[data-ea-popup-close]');
|
||||||
|
|
||||||
|
if (openButton) {
|
||||||
|
event.preventDefault();
|
||||||
|
openPopup(openButton);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (closeButton) {
|
||||||
|
event.preventDefault();
|
||||||
|
closePopup(closeButton.closest('[data-ea-popup-modal]'));
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (event.target.matches('[data-ea-popup-modal]')) {
|
||||||
|
closePopup(event.target);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
document.addEventListener('keydown', function (event) {
|
||||||
|
if (event.key === 'Escape' && activeModal) {
|
||||||
|
closePopup(activeModal);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
trapFocus(event);
|
||||||
|
});
|
||||||
|
})();
|
||||||
|
|||||||
163
wp-content/plugins/elementor-addon/assets/scss/main.scss
Normal file
163
wp-content/plugins/elementor-addon/assets/scss/main.scss
Normal file
@@ -0,0 +1,163 @@
|
|||||||
|
$popup-button-bg: #1f7a8c;
|
||||||
|
$popup-button-bg-hover: #195f6d;
|
||||||
|
$popup-button-color: #fff;
|
||||||
|
$popup-overlay-bg: rgba(0, 0, 0, 0.55);
|
||||||
|
$popup-box-bg: #fff;
|
||||||
|
$popup-box-color: #1a1a1a;
|
||||||
|
$popup-close-color: #333;
|
||||||
|
$popup-close-color-hover: #111;
|
||||||
|
$popup-transition: 0.2s ease;
|
||||||
|
$popup-z-index: 2147483647;
|
||||||
|
|
||||||
|
.ea-popup-widget {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ea-popup-button {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
gap: 8px;
|
||||||
|
min-height: 44px;
|
||||||
|
padding: 12px 24px;
|
||||||
|
border: 1px solid transparent;
|
||||||
|
border-radius: 4px;
|
||||||
|
background: $popup-button-bg;
|
||||||
|
color: $popup-button-color;
|
||||||
|
font: inherit;
|
||||||
|
line-height: 1.2;
|
||||||
|
text-align: center;
|
||||||
|
text-decoration: none;
|
||||||
|
cursor: pointer;
|
||||||
|
transition:
|
||||||
|
background-color $popup-transition,
|
||||||
|
border-color $popup-transition,
|
||||||
|
color $popup-transition,
|
||||||
|
box-shadow $popup-transition,
|
||||||
|
transform $popup-transition;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background: $popup-button-bg-hover;
|
||||||
|
color: $popup-button-color;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 2px solid currentColor;
|
||||||
|
outline-offset: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ea-popup-modal {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
z-index: $popup-z-index;
|
||||||
|
width: 100vw;
|
||||||
|
max-width: none;
|
||||||
|
height: 100vh;
|
||||||
|
max-height: none;
|
||||||
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
padding: 24px;
|
||||||
|
border: 0;
|
||||||
|
background: $popup-overlay-bg;
|
||||||
|
opacity: 0;
|
||||||
|
visibility: hidden;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity $popup-transition, visibility $popup-transition;
|
||||||
|
|
||||||
|
&:not([open]) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.is-open {
|
||||||
|
display: flex;
|
||||||
|
opacity: 1;
|
||||||
|
visibility: visible;
|
||||||
|
pointer-events: auto;
|
||||||
|
|
||||||
|
.ea-popup-dialog {
|
||||||
|
transform: translateY(0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
&::backdrop {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ea-popup-dialog {
|
||||||
|
position: relative;
|
||||||
|
width: 100%;
|
||||||
|
margin: auto;
|
||||||
|
max-width: 720px;
|
||||||
|
max-height: calc(100vh - 48px);
|
||||||
|
overflow: auto;
|
||||||
|
padding: 32px;
|
||||||
|
border-radius: 8px;
|
||||||
|
background: $popup-box-bg;
|
||||||
|
color: $popup-box-color;
|
||||||
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
|
||||||
|
transform: translateY(12px);
|
||||||
|
transition: transform $popup-transition;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ea-popup-close {
|
||||||
|
position: absolute;
|
||||||
|
top: 12px;
|
||||||
|
right: 12px;
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
width: 36px;
|
||||||
|
height: 36px;
|
||||||
|
padding: 0;
|
||||||
|
border: 0;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: transparent;
|
||||||
|
color: $popup-close-color;
|
||||||
|
font-size: 28px;
|
||||||
|
line-height: 1;
|
||||||
|
cursor: pointer;
|
||||||
|
|
||||||
|
&:hover,
|
||||||
|
&:focus {
|
||||||
|
background: rgba(0, 0, 0, 0.08);
|
||||||
|
color: $popup-close-color-hover;
|
||||||
|
}
|
||||||
|
|
||||||
|
&:focus-visible {
|
||||||
|
outline: 2px solid currentColor;
|
||||||
|
outline-offset: 3px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
.ea-popup-content {
|
||||||
|
padding-right: 20px;
|
||||||
|
|
||||||
|
> :first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
> :last-child {
|
||||||
|
margin-bottom: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
body.ea-popup-lock {
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 767px) {
|
||||||
|
.ea-popup-modal {
|
||||||
|
padding: 16px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.ea-popup-dialog {
|
||||||
|
max-height: calc(100vh - 32px);
|
||||||
|
padding: 28px 22px;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Plugin Name: Elementor Addon
|
* Plugin Name: Elementor Addon
|
||||||
* Description: Simple hello world widgets for Elementor.
|
* Description: Custom Elementor widgets.
|
||||||
* Version: 1.0.0
|
* Version: 1.0.0
|
||||||
* Author: Elementor Developer
|
* Author: Elementor Developer
|
||||||
* Author URI: https://developers.elementor.com/
|
* Author URI: https://developers.elementor.com/
|
||||||
@@ -19,14 +19,12 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|||||||
/**
|
/**
|
||||||
* Register widget files
|
* Register widget files
|
||||||
*/
|
*/
|
||||||
function register_hello_world_widget( $widgets_manager ) {
|
function register_elementor_addon_widgets( $widgets_manager ) {
|
||||||
require_once( __DIR__ . '/widgets/vertical-separator.php' );
|
require_once( __DIR__ . '/widgets/info-box-popup.php' );
|
||||||
require_once( __DIR__ . '/widgets/number-box.php' );
|
|
||||||
|
|
||||||
$widgets_manager->register( new \Elementor_Vertical_Separator() );
|
$widgets_manager->register( new \Elementor_Info_Box_Popup() );
|
||||||
$widgets_manager->register( new \Elementor_Number_Box() );
|
|
||||||
}
|
}
|
||||||
add_action( 'elementor/widgets/register', 'register_hello_world_widget' );
|
add_action( 'elementor/widgets/register', 'register_elementor_addon_widgets' );
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Register scripts/styles only.
|
* Register scripts/styles only.
|
||||||
|
|||||||
536
wp-content/plugins/elementor-addon/widgets/info-box-popup.php
Normal file
536
wp-content/plugins/elementor-addon/widgets/info-box-popup.php
Normal file
@@ -0,0 +1,536 @@
|
|||||||
|
<?php
|
||||||
|
use Elementor\Controls_Manager;
|
||||||
|
use Elementor\Group_Control_Background;
|
||||||
|
use Elementor\Group_Control_Border;
|
||||||
|
use Elementor\Group_Control_Box_Shadow;
|
||||||
|
use Elementor\Group_Control_Typography;
|
||||||
|
use Elementor\Widget_Base;
|
||||||
|
|
||||||
|
if ( ! defined( 'ABSPATH' ) ) {
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
|
class Elementor_Info_Box_Popup extends Widget_Base {
|
||||||
|
public function get_name() {
|
||||||
|
return 'info_box_popup';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_title() {
|
||||||
|
return esc_html__( 'Info Box Popup', 'elementor-addon' );
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_icon() {
|
||||||
|
return 'eicon-button';
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_categories() {
|
||||||
|
return [ 'general' ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_keywords() {
|
||||||
|
return [ 'popup', 'modal', 'button', 'czytaj wiecej', 'content' ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_style_depends() {
|
||||||
|
return [ 'elementor-addon-main-css' ];
|
||||||
|
}
|
||||||
|
|
||||||
|
public function get_script_depends() {
|
||||||
|
return [ 'elementor-addon-main-js' ];
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function register_controls() {
|
||||||
|
$this->start_controls_section(
|
||||||
|
'section_content',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Content', 'elementor-addon' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'button_text',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Button Text', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::TEXT,
|
||||||
|
'default' => esc_html__( 'Czytaj wiecej', 'elementor-addon' ),
|
||||||
|
'placeholder' => esc_html__( 'Czytaj wiecej', 'elementor-addon' ),
|
||||||
|
'label_block' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'popup_content',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Popup Content', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::WYSIWYG,
|
||||||
|
'default' => '<p>' . esc_html__( 'Write your popup content here.', 'elementor-addon' ) . '</p>',
|
||||||
|
'show_label' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'close_label',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Close Button Label', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::TEXT,
|
||||||
|
'default' => esc_html__( 'Close popup', 'elementor-addon' ),
|
||||||
|
'label_block' => true,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'section_button_style',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Button', 'elementor-addon' ),
|
||||||
|
'tab' => Controls_Manager::TAB_STYLE,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'button_align',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Alignment', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::CHOOSE,
|
||||||
|
'options' => [
|
||||||
|
'left' => [
|
||||||
|
'title' => esc_html__( 'Left', 'elementor-addon' ),
|
||||||
|
'icon' => 'eicon-text-align-left',
|
||||||
|
],
|
||||||
|
'center' => [
|
||||||
|
'title' => esc_html__( 'Center', 'elementor-addon' ),
|
||||||
|
'icon' => 'eicon-text-align-center',
|
||||||
|
],
|
||||||
|
'right' => [
|
||||||
|
'title' => esc_html__( 'Right', 'elementor-addon' ),
|
||||||
|
'icon' => 'eicon-text-align-right',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'default' => 'left',
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-widget' => 'text-align: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'button_full_width',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Full Width', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::SWITCHER,
|
||||||
|
'label_on' => esc_html__( 'Yes', 'elementor-addon' ),
|
||||||
|
'label_off' => esc_html__( 'No', 'elementor-addon' ),
|
||||||
|
'return_value' => 'yes',
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-button' => 'width: 100%;',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'button_typography',
|
||||||
|
'selector' => '{{WRAPPER}} .ea-popup-button',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'button_padding',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Padding', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::DIMENSIONS,
|
||||||
|
'size_units' => [ 'px', 'em', 'rem' ],
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Border::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'button_border',
|
||||||
|
'selector' => '{{WRAPPER}} .ea-popup-button',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'button_border_radius',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Border Radius', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::DIMENSIONS,
|
||||||
|
'size_units' => [ 'px', '%', 'em', 'rem' ],
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-button' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Box_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'button_box_shadow',
|
||||||
|
'selector' => '{{WRAPPER}} .ea-popup-button',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->start_controls_tabs( 'button_style_tabs' );
|
||||||
|
|
||||||
|
$this->start_controls_tab(
|
||||||
|
'button_style_normal',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Normal', 'elementor-addon' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'button_text_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-button' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'button_background_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Background Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-button' => 'background-color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_tab();
|
||||||
|
|
||||||
|
$this->start_controls_tab(
|
||||||
|
'button_style_hover',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Hover', 'elementor-addon' ),
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'button_hover_text_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-button:hover, {{WRAPPER}} .ea-popup-button:focus' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'button_hover_background_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Background Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-button:hover, {{WRAPPER}} .ea-popup-button:focus' => 'background-color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'button_hover_border_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Border Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-button:hover, {{WRAPPER}} .ea-popup-button:focus' => 'border-color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_tab();
|
||||||
|
$this->end_controls_tabs();
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'section_overlay_style',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Overlay', 'elementor-addon' ),
|
||||||
|
'tab' => Controls_Manager::TAB_STYLE,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'overlay_background_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Background Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'default' => 'rgba(0, 0, 0, 0.55)',
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-modal' => 'background-color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'section_popup_style',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Popup Box', 'elementor-addon' ),
|
||||||
|
'tab' => Controls_Manager::TAB_STYLE,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'popup_width',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Width', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'size_units' => [ 'px', '%', 'vw' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'min' => 260,
|
||||||
|
'max' => 1200,
|
||||||
|
],
|
||||||
|
'%' => [
|
||||||
|
'min' => 20,
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
'vw' => [
|
||||||
|
'min' => 20,
|
||||||
|
'max' => 100,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'default' => [
|
||||||
|
'unit' => 'px',
|
||||||
|
'size' => 720,
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-dialog' => 'max-width: {{SIZE}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'popup_padding',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Padding', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::DIMENSIONS,
|
||||||
|
'size_units' => [ 'px', 'em', 'rem' ],
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-dialog' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Background::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'popup_background',
|
||||||
|
'types' => [ 'classic', 'gradient' ],
|
||||||
|
'selector' => '{{WRAPPER}} .ea-popup-dialog',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Border::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'popup_border',
|
||||||
|
'selector' => '{{WRAPPER}} .ea-popup-dialog',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'popup_border_radius',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Border Radius', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::DIMENSIONS,
|
||||||
|
'size_units' => [ 'px', '%', 'em', 'rem' ],
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-dialog' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Box_Shadow::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'popup_box_shadow',
|
||||||
|
'selector' => '{{WRAPPER}} .ea-popup-dialog',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'section_popup_content_style',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Popup Content', 'elementor-addon' ),
|
||||||
|
'tab' => Controls_Manager::TAB_STYLE,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'content_text_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Text Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-content' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_group_control(
|
||||||
|
Group_Control_Typography::get_type(),
|
||||||
|
[
|
||||||
|
'name' => 'content_typography',
|
||||||
|
'selector' => '{{WRAPPER}} .ea-popup-content',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'content_align',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Alignment', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::CHOOSE,
|
||||||
|
'options' => [
|
||||||
|
'left' => [
|
||||||
|
'title' => esc_html__( 'Left', 'elementor-addon' ),
|
||||||
|
'icon' => 'eicon-text-align-left',
|
||||||
|
],
|
||||||
|
'center' => [
|
||||||
|
'title' => esc_html__( 'Center', 'elementor-addon' ),
|
||||||
|
'icon' => 'eicon-text-align-center',
|
||||||
|
],
|
||||||
|
'right' => [
|
||||||
|
'title' => esc_html__( 'Right', 'elementor-addon' ),
|
||||||
|
'icon' => 'eicon-text-align-right',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-content' => 'text-align: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
|
||||||
|
$this->start_controls_section(
|
||||||
|
'section_close_style',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Close Button', 'elementor-addon' ),
|
||||||
|
'tab' => Controls_Manager::TAB_STYLE,
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'close_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-close' => 'color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_control(
|
||||||
|
'close_background_color',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Background Color', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::COLOR,
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-close' => 'background-color: {{VALUE}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'close_size',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Size', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'size_units' => [ 'px', 'em', 'rem' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'min' => 24,
|
||||||
|
'max' => 80,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-close' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_responsive_control(
|
||||||
|
'close_icon_size',
|
||||||
|
[
|
||||||
|
'label' => esc_html__( 'Icon Size', 'elementor-addon' ),
|
||||||
|
'type' => Controls_Manager::SLIDER,
|
||||||
|
'size_units' => [ 'px', 'em', 'rem' ],
|
||||||
|
'range' => [
|
||||||
|
'px' => [
|
||||||
|
'min' => 12,
|
||||||
|
'max' => 48,
|
||||||
|
],
|
||||||
|
],
|
||||||
|
'selectors' => [
|
||||||
|
'{{WRAPPER}} .ea-popup-close' => 'font-size: {{SIZE}}{{UNIT}};',
|
||||||
|
],
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->end_controls_section();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function render() {
|
||||||
|
$settings = $this->get_settings_for_display();
|
||||||
|
$widget_id = 'ea-popup-' . $this->get_id();
|
||||||
|
$button_id = $widget_id . '-button';
|
||||||
|
$dialog_id = $widget_id . '-dialog';
|
||||||
|
$button_text = ! empty( $settings['button_text'] ) ? $settings['button_text'] : esc_html__( 'Czytaj wiecej', 'elementor-addon' );
|
||||||
|
$close_label = ! empty( $settings['close_label'] ) ? $settings['close_label'] : esc_html__( 'Close popup', 'elementor-addon' );
|
||||||
|
|
||||||
|
$this->add_render_attribute(
|
||||||
|
'wrapper',
|
||||||
|
[
|
||||||
|
'class' => 'ea-popup-widget',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
|
||||||
|
$this->add_render_attribute(
|
||||||
|
'button',
|
||||||
|
[
|
||||||
|
'id' => $button_id,
|
||||||
|
'class' => 'ea-popup-button',
|
||||||
|
'type' => 'button',
|
||||||
|
'aria-haspopup' => 'dialog',
|
||||||
|
'aria-controls' => $dialog_id,
|
||||||
|
'aria-expanded' => 'false',
|
||||||
|
]
|
||||||
|
);
|
||||||
|
?>
|
||||||
|
<div <?php $this->print_render_attribute_string( 'wrapper' ); ?>>
|
||||||
|
<button <?php $this->print_render_attribute_string( 'button' ); ?>>
|
||||||
|
<?php echo esc_html( $button_text ); ?>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<dialog class="ea-popup-modal" data-ea-popup-modal aria-hidden="true">
|
||||||
|
<div class="ea-popup-dialog" id="<?php echo esc_attr( $dialog_id ); ?>" aria-labelledby="<?php echo esc_attr( $button_id ); ?>">
|
||||||
|
<button class="ea-popup-close" type="button" data-ea-popup-close aria-label="<?php echo esc_attr( $close_label ); ?>">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
|
||||||
|
<div class="ea-popup-content">
|
||||||
|
<?php echo wp_kses_post( $this->parse_text_editor( $settings['popup_content'] ) ); ?>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</dialog>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
}
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -1,143 +0,0 @@
|
|||||||
<?php
|
|
||||||
if (!defined('ABSPATH')) {
|
|
||||||
exit;
|
|
||||||
}
|
|
||||||
|
|
||||||
use Elementor\Controls_Manager;
|
|
||||||
|
|
||||||
class Elementor_Vertical_Separator extends \Elementor\Widget_Base {
|
|
||||||
|
|
||||||
public function get_name() {
|
|
||||||
return 'Vertical_Separator';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get_title() {
|
|
||||||
return esc_html__( 'Vertical Separator', 'elementor-addon' );
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get_icon() {
|
|
||||||
return 'eicon-code';
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get_categories() {
|
|
||||||
return [ 'basic' ];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get_keywords() {
|
|
||||||
return [ 'vertical', 'separator' ];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get_style_depends() {
|
|
||||||
return [ 'elementor-addon-main-css' ];
|
|
||||||
}
|
|
||||||
|
|
||||||
public function get_script_depends() {
|
|
||||||
return [ 'elementor-addon-main-js' ];
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function register_controls() {
|
|
||||||
$this->start_controls_section(
|
|
||||||
'section_setting',
|
|
||||||
[
|
|
||||||
'label' => esc_html__( 'Settings', 'elementor' ),
|
|
||||||
'tab' => Controls_Manager::TAB_CONTENT,
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->add_control(
|
|
||||||
'line_color',
|
|
||||||
[
|
|
||||||
'label' => esc_html__( 'Color', 'elementor-addon' ),
|
|
||||||
'type' => Controls_Manager::COLOR,
|
|
||||||
'default' => '#000000',
|
|
||||||
'selectors' => [
|
|
||||||
'{{WRAPPER}} .elementor-vertical-separator__line' => 'background: {{VALUE}};'
|
|
||||||
],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->add_responsive_control(
|
|
||||||
'line_thickness',
|
|
||||||
[
|
|
||||||
'label' => esc_html__( 'Thickness', 'elementor-addon' ),
|
|
||||||
'type' => Controls_Manager::SLIDER,
|
|
||||||
'size_units' => [ 'px' ],
|
|
||||||
'range' => [
|
|
||||||
'px' => [
|
|
||||||
'min' => 1,
|
|
||||||
'max' => 20,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'default' => [
|
|
||||||
'size' => 1,
|
|
||||||
'unit' => 'px',
|
|
||||||
],
|
|
||||||
'selectors' => [
|
|
||||||
'{{WRAPPER}} .elementor-vertical-separator__line' => 'width: {{SIZE}}{{UNIT}};'
|
|
||||||
],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->add_responsive_control(
|
|
||||||
'line_height',
|
|
||||||
[
|
|
||||||
'label' => esc_html__( 'Height', 'elementor-addon' ),
|
|
||||||
'type' => Controls_Manager::SLIDER,
|
|
||||||
'size_units' => [ 'px', '%' ],
|
|
||||||
'range' => [
|
|
||||||
'px' => [
|
|
||||||
'min' => 10,
|
|
||||||
'max' => 600,
|
|
||||||
],
|
|
||||||
'%' => [
|
|
||||||
'min' => 10,
|
|
||||||
'max' => 100,
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'default' => [
|
|
||||||
'size' => 100,
|
|
||||||
'unit' => 'px',
|
|
||||||
],
|
|
||||||
'selectors' => [
|
|
||||||
'{{WRAPPER}} .elementor-vertical-separator__line' => 'height: {{SIZE}}{{UNIT}};'
|
|
||||||
],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->add_responsive_control(
|
|
||||||
'line_alignment',
|
|
||||||
[
|
|
||||||
'label' => esc_html__( 'Alignment', 'elementor-addon' ),
|
|
||||||
'type' => Controls_Manager::CHOOSE,
|
|
||||||
'default' => 'center',
|
|
||||||
'options' => [
|
|
||||||
'flex-start' => [
|
|
||||||
'title' => esc_html__( 'Left', 'elementor-addon' ),
|
|
||||||
'icon' => 'eicon-text-align-left',
|
|
||||||
],
|
|
||||||
'center' => [
|
|
||||||
'title' => esc_html__( 'Center', 'elementor-addon' ),
|
|
||||||
'icon' => 'eicon-text-align-center',
|
|
||||||
],
|
|
||||||
'flex-end' => [
|
|
||||||
'title' => esc_html__( 'Right', 'elementor-addon' ),
|
|
||||||
'icon' => 'eicon-text-align-right',
|
|
||||||
],
|
|
||||||
],
|
|
||||||
'selectors' => [
|
|
||||||
'{{WRAPPER}} .elementor-vertical-separator' => 'justify-content: {{VALUE}};'
|
|
||||||
],
|
|
||||||
]
|
|
||||||
);
|
|
||||||
|
|
||||||
$this->end_controls_section();
|
|
||||||
}
|
|
||||||
|
|
||||||
protected function render() {
|
|
||||||
?>
|
|
||||||
<div class="elementor-vertical-separator">
|
|
||||||
<span class="elementor-vertical-separator__line"></span>
|
|
||||||
</div>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
}
|
|
||||||
Reference in New Issue
Block a user