Version Description
- Tweak: Mega Menu widget performance improved.
- Fixed: CSS class not properly added in Bullet List widget.
- Fixed: Mega Menu widget compatibility issue with Flex Container element.
Download this release
Release Info
Developer | leap13 |
Plugin | Premium Addons for Elementor |
Version | 4.9.42 |
Comparing to | |
See all releases |
Code changes from version 4.9.41 to 4.9.42
- assets/frontend/js/premium-nav-menu.js +2 -1
- assets/frontend/min-js/premium-nav-menu.min.js +1 -1
- premium-addons-for-elementor.php +5 -5
- readme.txt +7 -1
- widgets/premium-blog.php +3 -0
- widgets/premium-icon-list.php +2 -3
- widgets/premium-modalbox.php +2469 -2469
- widgets/premium-nav-menu.php +4885 -4885
assets/frontend/js/premium-nav-menu.js
CHANGED
@@ -245,7 +245,8 @@
|
|
245 |
Â
*/
|
246 |
Â
function fullWidthContent($item) {
|
247 |
Â
|
248 |
-
var
|
Â
|
|
249 |
Â
width = $parentSec.outerWidth(),
|
250 |
Â
sectionLeft = $parentSec.offset().left - $item.offset().left;
|
251 |
Â
|
245 |
Â
*/
|
246 |
Â
function fullWidthContent($item) {
|
247 |
Â
|
248 |
+
var isContainer = elementorFrontend.config.experimentalFeatures.container,
|
249 |
+
$parentSec = isContainer ? $scope.closest('.e-con').parents('.e-con').last() : $scope.closest('.elementor-top-section'),
|
250 |
Â
width = $parentSec.outerWidth(),
|
251 |
Â
sectionLeft = $parentSec.offset().left - $item.offset().left;
|
252 |
Â
|
assets/frontend/min-js/premium-nav-menu.min.js
CHANGED
@@ -1 +1 @@
|
|
1 |
-
!function(e){function i(a,o){a.find(".premium-nav-widget-container").removeClass("elementor-invisible");var r=a.find(".premium-nav-widget-container").data("settings");if(r){var t,e,n,m=a.find(".premium-mobile-menu"),s=a.find(".premium-hamburger-toggle"),i=a.find(".premium-mobile-menu-close"),u=a.find(".premium-mega-content-centered"),l=a.find('.premium-nav-menu-container li[data-full-width="true"]'),d={},
|
1 |
+
!function(e){function i(a,o){a.find(".premium-nav-widget-container").removeClass("elementor-invisible");var r=a.find(".premium-nav-widget-container").data("settings");if(r){var t,e,n,m=a.find(".premium-mobile-menu"),s=a.find(".premium-hamburger-toggle"),i=a.find(".premium-mobile-menu-close"),u=a.find(".premium-mega-content-centered"),l=a.find('.premium-nav-menu-container li[data-full-width="true"]'),d={},c=!1,p="stickyPos"+a.data("id"),v="stickyWidth"+a.data("id"),f=!!a.hasClass("premium-disable-scroll-yes");if(window.PaCurrStickyDevice=elementorFrontend.getCurrentDeviceMode(),elementorFrontend.isEditMode()&&!f&&o("body").removeClass("premium-scroll-disabled"),u.each(function(e,i){o(i).closest(".premium-nav-menu-item").addClass("premium-mega-item-static")}),"slide"!==r.mobileLayout&&"slide"!==r.mainLayout||a.addClass("premium-ver-hamburger-menu"),r.rn_badges&&(e=r.rn_badges,n=["hor","ver"].includes(r.mainLayout)?a.find(".premium-nav-menu-container"):a.find(".premium-mobile-menu-container"),e.forEach(function(e){var i=n.find(e.selector+":not(.has-pa-badge)").length;""!==e.selector&&i&&function(e,i){var t=function(e){return'<span class="premium-rn-badge elementor-repeater-item-'+e.id+'">'+e.text+"</span>"}(e),n=a.find(".premium-nav-menu-container "+e.selector+":not(.has-pa-badge)");mobileTargets=a.find(".premium-mobile-menu-container "+e.selector+":not(.has-pa-badge)"),hoverEffectClass=""!==r.hoverEffect?"premium-badge-"+r.hoverEffect:"";for(var m=0;m<i.length;m++)["hor","ver"].includes(r.mainLayout)&&a.find(n[i[m]-1]).css("position","relative").addClass("has-pa-badge "+hoverEffectClass).append(t),a.find(mobileTargets[i[m]-1]).css("position","relative").addClass("has-pa-badge "+hoverEffectClass).append(t)}(e,function(e,i){for(var t=P(e),n=[],m=0;m<t;m++){var r=P(i);n.includes(r)||n.push(r)}return n}(e.max,i))})),"dot"===r.hoverEffect)a.find(".premium-mega-content-container .premium-badge-dot, .premium-sub-menu .premium-badge-dot").each(function(e,i){o(i).mouseenter(function(){o(i).removeClass("premium-badge-dot")}).mouseleave(function(){o(i).addClass("premium-badge-dot")})});var g=null,h=null;if(y(r),a.hasClass("premium-nav-hor")&&b(),k(),["hor","ver"].includes(r.mainLayout))if("hover"===r.submenuEvent)a.find(".premium-nav-menu-item").on("mouseenter.PaItemHover",function(e){e.stopPropagation(),clearTimeout(t),o(this).siblings().removeClass("premium-item-hovered"),o(this).addClass("premium-item-hovered"),o(this).hasClass("premium-sub-menu-item")&&o(this).parents(".premium-nav-menu-item").addClass("premium-item-hovered")}),a.on("mouseleave.PaItemHover",function(e){t=setTimeout(function(){a.find(".premium-item-hovered").removeClass("premium-item-hovered")},300)}),a.find(".premium-sub-menu, .premium-mega-content-container").on("mouseenter.PaItemHover",function(e){var i=o(this).parents(".premium-nav-menu-item").first();clearTimeout(t),i.siblings().removeClass("premium-item-hovered"),i.addClass("premium-item-hovered")}).on("mouseleave.PaItemHover",function(e){clearTimeout(t)});else{var C="item"===r.submenuTrigger?" > .premium-menu-link":" > .premium-menu-link > .premium-dropdown-icon",w=a.find(".premium-nav-menu-container .premium-nav-menu-item.menu-item-has-children"+C);elementorFrontend.isEditMode()&&a.off("mouseleave.PaItemHover"),w.off("click.PaItemClick"),w.on("click.PaItemClick",function(e){e.preventDefault(),e.stopPropagation();var i=o(this).parents(".premium-nav-menu-item").first();i.siblings().removeClass("premium-item-hovered").find(".premium-item-hovered").removeClass("premium-item-hovered"),i.toggleClass("premium-item-hovered")})}i.on("click",function(){a.find(".premium-mobile-menu-outer-container, .premium-nav-slide-overlay").removeClass("premium-vertical-toggle-open"),o("body").removeClass("premium-scroll-disabled")}),s.on("click",function(){"slide"===r.mobileLayout||"slide"===r.mainLayout?(a.find(".premium-mobile-menu-outer-container, .premium-nav-slide-overlay").addClass("premium-vertical-toggle-open"),f&&o("body").addClass("premium-scroll-disabled")):o(m).hasClass("premium-active-menu")?a.find(".premium-mobile-menu-container").slideUp("slow",function(){m.removeClass("premium-active-menu"),a.find(".premium-mobile-menu-container").show()}):m.addClass("premium-active-menu"),s.toggleClass("premium-toggle-opened")}),m.find(".premium-nav-menu-item.menu-item-has-children a, .premium-mega-nav-item a").on("click",function(e){if(!(o(this).find(".premium-dropdown-icon").length<1)){var i=o(this).parent(".premium-nav-menu-item");e.stopPropagation(),e.preventDefault(),i.hasClass("premium-active-menu")?i.toggleClass("premium-active-menu"):(m.find(".premium-active-menu").toggleClass("premium-active-menu"),i.toggleClass("premium-active-menu"),o(i).parents(".premium-nav-menu-item.menu-item-has-children").toggleClass("premium-active-menu"))}}),o(document).on("click",".premium-nav-slide-overlay",function(){a.find(".premium-mobile-menu-outer-container, .premium-nav-slide-overlay").removeClass("premium-vertical-toggle-open"),o("body").removeClass("premium-scroll-disabled")}),o(document).on("click.PaCloseMegaMenu",function(e){var i=o(e.target).closest(".premium-tabs-nav-list-item").length;o(e.target).closest(".premium-nav-widget-container").length||i||o(m).hasClass("premium-active-menu")&&s.click()}),o(window).on("resize",function(){window.PaCurrStickyDevice!==elementorFrontend.getCurrentDeviceMode()&&(c=!0,window.PaCurrStickyDevice=elementorFrontend.getCurrentDeviceMode()),y(r),a.hasClass("premium-nav-hor")&&b(),k()}),a.hasClass("premium-ver-toggle-yes")&&a.hasClass("premium-ver-click")&&a.find(".premium-ver-toggler").on("click",function(){a.find(".premium-nav-widget-container").toggleClass("premium-ver-collapsed",500)})}function b(){l.each(function(e,i){var t,n,m,r;t=o(i),n=elementorFrontend.config.experimentalFeatures.container?a.closest(".e-con").parents(".e-con").last():a.closest(".elementor-top-section"),m=n.outerWidth(),r=n.offset().left-t.offset().left,o(t).removeClass("premium-mega-item-static").find(".premium-mega-content-container, > .premium-sub-menu").css({width:m+"px",left:r+"px"})})}function y(e){e.breakpoint>=o(window).outerWidth()&&!g?(a.find(".premium-ver-toggler").css("display","none"),a.addClass("premium-hamburger-menu"),a.find(".premium-active-menu").removeClass("premium-active-menu"),function(e){if(!e.length)return;var i=o(a).closest(".elementor-top-section, .e-con"),t=o(i).outerWidth(),n=a.offset().top,m=o(i).offset().top+o(i).outerHeight()-n,r=a.offset().left-o(i).offset().left;o(e).css({width:t+"px",left:"-"+r+"px",top:m+"px"})}(a.find(".premium-stretch-dropdown .premium-mobile-menu-container")),h=!(g=!0)):e.breakpoint<o(window).outerWidth()&&!h&&(a.hasClass("premium-ver-toggle-yes")&&a.find(".premium-ver-toggler").css("display","flex"),s.removeClass("premium-toggle-opened"),a.find(".premium-mobile-menu-container .premium-active-menu").removeClass("premium-active-menu"),a.removeClass("premium-hamburger-menu premium-ham-dropdown"),a.find(".premium-vertical-toggle-open").removeClass("premium-vertical-toggle-open"),a.find(".premium-nav-default").removeClass("premium-nav-default"),g=!(h=!0))}function k(){a.hasClass("premium-nav-sticky-yes")&&o("#"+r.stickyOptions.targetId).length&&!r.stickyOptions.disableOn.includes(elementorFrontend.getCurrentDeviceMode())?((d=r.stickyOptions).spacerClass="premium-sticky-spacer-"+o("#"+d.targetId).data("id"),o("#"+d.targetId).addClass("premium-sticky-active"),function(e){var i=v+elementorFrontend.getCurrentDeviceMode(),t=o("#"+e.targetId).hasClass("premium-sticky-parent");t&&o("#"+e.targetId).css({position:"relative",width:"inherit"});window[i]=o("#"+e.targetId).outerWidth()+"px",t&&o("#"+e.targetId).css({position:"fixed",width:window[i]})}(d),0===o("."+d.spacerClass).length&&o('<div class="'+d.spacerClass+'"></div>').insertBefore("#"+d.targetId),o(window).on("load",I),o(window).on("scroll.PaStickyNav",I)):(o(window).off("scroll.PaStickyNav"),o('<div class="'+d.spacerClass+'"></div>').remove(),o("#"+d.targetId).removeClass("premium-sticky-parent premium-sticky-active premium-sticky-parent-"+a.data("id")).css({top:"unset",width:"inherit",position:"relative"}))}function I(){var e=elementorFrontend.elements.$wpAdminBar.height()?elementorFrontend.elements.$wpAdminBar.height():0,i=o(window).scrollTop()+e,t=v+elementorFrontend.getCurrentDeviceMode();if(window[p]&&!c||(window[p]=o("."+d.spacerClass).offset().top,c=!1),i>=window[p]?(o("."+d.spacerClass).css("height",o("#"+d.targetId).outerHeight()+"px"),o("#"+d.targetId).addClass("premium-sticky-parent premium-sticky-parent-"+a.data("id")).css({width:window[t],top:e,position:"fixed"})):(o("."+d.spacerClass).css("height","0px"),o("#"+d.targetId).removeClass("premium-sticky-parent premium-sticky-parent-"+a.data("id")).css({top:"unset",width:"inherit",position:"relative"})),d.onScroll){var n=document.querySelector("#"+d.targetId+".premium-sticky-parent");if(n)o("#"+d.targetId+".premium-sticky-parent").addClass("premium-sticky-scroll-yes"),new Headroom(n,{tolerance:5,classes:{initial:"animated",pinned:"slideDown",unpinned:"slideUp",offset:{up:o("#"+d.targetId).outerHeight()+150}}}).init()}else o("#"+d.targetId+".premium-sticky-parent").removeClass("premium-sticky-scroll-yes")}function P(e){return Math.floor(Math.random()*e)+1}}e(window).on("elementor/frontend/init",function(){elementorFrontend.hooks.addAction("frontend/element_ready/premium-nav-menu.default",i)})}(jQuery);
|
premium-addons-for-elementor.php
CHANGED
@@ -3,9 +3,9 @@
|
|
3 |
Â
Plugin Name: Premium Addons for Elementor
|
4 |
Â
Description: Premium Addons for Elementor plugin includes widgets and addons like Blog Post Grid, Megamenu, Post Carousel, Advanced Slider, Modal Popup, Google Maps, Pricing Tables, Lottie Animations, Countdown, Testimonials.
|
5 |
Â
Plugin URI: https://premiumaddons.com
|
6 |
-
Version: 4.9.
|
7 |
-
Elementor tested up to: 3.
|
8 |
-
Elementor Pro tested up to: 3.
|
9 |
Â
Author: Leap13
|
10 |
Â
Author URI: https://leap13.com/
|
11 |
Â
Text Domain: premium-addons-for-elementor
|
@@ -18,14 +18,14 @@ if ( ! defined( 'ABSPATH' ) ) {
|
|
18 |
Â
}
|
19 |
Â
|
20 |
Â
// Define Constants.
|
21 |
-
define( 'PREMIUM_ADDONS_VERSION', '4.9.
|
22 |
Â
define( 'PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
|
23 |
Â
define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
|
24 |
Â
define( 'PREMIUM_ASSETS_PATH', set_url_scheme( wp_upload_dir()['basedir'] . '/premium-addons-elementor' ) );
|
25 |
Â
define( 'PREMIUM_ASSETS_URL', set_url_scheme( wp_upload_dir()['baseurl'] . '/premium-addons-elementor' ) );
|
26 |
Â
define( 'PREMIUM_ADDONS_FILE', __FILE__ );
|
27 |
Â
define( 'PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
|
28 |
-
define( 'PREMIUM_ADDONS_STABLE_VERSION', '4.9.
|
29 |
Â
|
30 |
Â
/*
|
31 |
Â
* Load plugin core file
|
3 |
Â
Plugin Name: Premium Addons for Elementor
|
4 |
Â
Description: Premium Addons for Elementor plugin includes widgets and addons like Blog Post Grid, Megamenu, Post Carousel, Advanced Slider, Modal Popup, Google Maps, Pricing Tables, Lottie Animations, Countdown, Testimonials.
|
5 |
Â
Plugin URI: https://premiumaddons.com
|
6 |
+
Version: 4.9.42
|
7 |
+
Elementor tested up to: 3.9.0
|
8 |
+
Elementor Pro tested up to: 3.9.0
|
9 |
Â
Author: Leap13
|
10 |
Â
Author URI: https://leap13.com/
|
11 |
Â
Text Domain: premium-addons-for-elementor
|
18 |
Â
}
|
19 |
Â
|
20 |
Â
// Define Constants.
|
21 |
+
define( 'PREMIUM_ADDONS_VERSION', '4.9.42' );
|
22 |
Â
define( 'PREMIUM_ADDONS_URL', plugins_url( '/', __FILE__ ) );
|
23 |
Â
define( 'PREMIUM_ADDONS_PATH', plugin_dir_path( __FILE__ ) );
|
24 |
Â
define( 'PREMIUM_ASSETS_PATH', set_url_scheme( wp_upload_dir()['basedir'] . '/premium-addons-elementor' ) );
|
25 |
Â
define( 'PREMIUM_ASSETS_URL', set_url_scheme( wp_upload_dir()['baseurl'] . '/premium-addons-elementor' ) );
|
26 |
Â
define( 'PREMIUM_ADDONS_FILE', __FILE__ );
|
27 |
Â
define( 'PREMIUM_ADDONS_BASENAME', plugin_basename( PREMIUM_ADDONS_FILE ) );
|
28 |
+
define( 'PREMIUM_ADDONS_STABLE_VERSION', '4.9.41' );
|
29 |
Â
|
30 |
Â
/*
|
31 |
Â
* Load plugin core file
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate Link: https://premiumaddons.com/?utm_source=wp-repo&utm_medium=link&utm_c
|
|
5 |
Â
Requires at least: 5.0
|
6 |
Â
Tested Up To: 6.1.1
|
7 |
Â
Requires PHP: 7.0
|
8 |
-
Stable Tag: 4.9.
|
9 |
Â
License: GPL v3.0
|
10 |
Â
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
Â
|
@@ -220,6 +220,12 @@ Premium Addonsis 100% Ads Free, Ads can only be detected from Youtube videos, th
|
|
220 |
Â
|
221 |
Â
== Changelog ==
|
222 |
Â
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
Â
|
|
223 |
Â
= 4.9.41 =
|
224 |
Â
|
225 |
Â
- Tweak: Added Transition Speed option for carousel in Blog widget.
|
5 |
Â
Requires at least: 5.0
|
6 |
Â
Tested Up To: 6.1.1
|
7 |
Â
Requires PHP: 7.0
|
8 |
+
Stable Tag: 4.9.42
|
9 |
Â
License: GPL v3.0
|
10 |
Â
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
Â
|
220 |
Â
|
221 |
Â
== Changelog ==
|
222 |
Â
|
223 |
+
= 4.9.42 =
|
224 |
+
|
225 |
+
- Tweak: Mega Menu widget performance improved.
|
226 |
+
- Fixed: CSS class not properly added in Bullet List widget.
|
227 |
+
- Fixed: Mega Menu widget compatibility issue with Flex Container element.
|
228 |
+
|
229 |
Â
= 4.9.41 =
|
230 |
Â
|
231 |
Â
- Tweak: Added Transition Speed option for carousel in Blog widget.
|
widgets/premium-blog.php
CHANGED
@@ -1256,6 +1256,9 @@ class Premium_Blog extends Widget_Base {
|
|
1256 |
Â
'selectors' => array(
|
1257 |
Â
'{{WRAPPER}} .premium-blog-wrap .slick-slide' => 'transition: all {{VALUE}}ms !important',
|
1258 |
Â
),
|
Â
|
|
Â
|
|
Â
|
|
1259 |
Â
'frontend_available' => true,
|
1260 |
Â
)
|
1261 |
Â
);
|
1256 |
Â
'selectors' => array(
|
1257 |
Â
'{{WRAPPER}} .premium-blog-wrap .slick-slide' => 'transition: all {{VALUE}}ms !important',
|
1258 |
Â
),
|
1259 |
+
'condition' => array(
|
1260 |
+
'premium_blog_carousel' => 'yes',
|
1261 |
+
),
|
1262 |
Â
'frontend_available' => true,
|
1263 |
Â
)
|
1264 |
Â
);
|
widgets/premium-icon-list.php
CHANGED
@@ -2253,9 +2253,8 @@ class Premium_Icon_List extends Widget_Base {
|
|
2253 |
Â
$this->add_render_attribute(
|
2254 |
Â
$item_link,
|
2255 |
Â
array(
|
2256 |
-
'class',
|
2257 |
-
'
|
2258 |
-
'aria-label' => 'pa-bullet-link-' . $id . $index,
|
2259 |
Â
)
|
2260 |
Â
);
|
2261 |
Â
|
2253 |
Â
$this->add_render_attribute(
|
2254 |
Â
$item_link,
|
2255 |
Â
array(
|
2256 |
+
'class' => 'premium-bullet-list-link',
|
2257 |
+
'aria-label' => $item['list_title'],
|
Â
|
|
2258 |
Â
)
|
2259 |
Â
);
|
2260 |
Â
|
widgets/premium-modalbox.php
CHANGED
@@ -1,2469 +1,2469 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Premium Modal Box.
|
4 |
-
*/
|
5 |
-
|
6 |
-
namespace PremiumAddons\Widgets;
|
7 |
-
|
8 |
-
// Elementor Classes.
|
9 |
-
use Elementor\Icons_Manager;
|
10 |
-
use Elementor\Widget_Base;
|
11 |
-
use Elementor\Utils;
|
12 |
-
use Elementor\Control_Media;
|
13 |
-
use Elementor\Controls_Manager;
|
14 |
-
use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
|
15 |
-
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
|
16 |
-
use Elementor\Group_Control_Border;
|
17 |
-
use Elementor\Group_Control_Css_Filter;
|
18 |
-
use Elementor\Group_Control_Typography;
|
19 |
-
use Elementor\Group_Control_Text_Shadow;
|
20 |
-
use Elementor\Group_Control_Box_Shadow;
|
21 |
-
use Elementor\Group_Control_Background;
|
22 |
-
|
23 |
-
// PremiumAddons Classes.
|
24 |
-
use PremiumAddons\Admin\Includes\Admin_Helper;
|
25 |
-
use PremiumAddons\Includes\Helper_Functions;
|
26 |
-
use PremiumAddons\Includes\Premium_Template_Tags;
|
27 |
-
|
28 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
29 |
-
exit; // If this file is called directly, abort.
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Class Premium_Modalbox
|
34 |
-
*/
|
35 |
-
class Premium_Modalbox extends Widget_Base {
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Check Icon Draw Option.
|
39 |
-
*
|
40 |
-
* @since 4.9.26
|
41 |
-
* @access public
|
42 |
-
*/
|
43 |
-
public function check_icon_draw() {
|
44 |
-
$is_enabled = Admin_Helper::check_svg_draw( 'premium-modalbox' );
|
45 |
-
return $is_enabled;
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Get Elementor Helper Instance.
|
50 |
-
*
|
51 |
-
* @since 1.0.0
|
52 |
-
* @access public
|
53 |
-
*/
|
54 |
-
public function getTemplateInstance() {
|
55 |
-
$this->template_instance = Premium_Template_Tags::getInstance();
|
56 |
-
return $this->template_instance;
|
57 |
-
}
|
58 |
-
|
59 |
-
/**
|
60 |
-
* Retrieve Widget Name.
|
61 |
-
*
|
62 |
-
* @since 1.0.0
|
63 |
-
* @access public
|
64 |
-
*/
|
65 |
-
public function get_name() {
|
66 |
-
return 'premium-addon-modal-box';
|
67 |
-
}
|
68 |
-
|
69 |
-
/**
|
70 |
-
* Check RTL
|
71 |
-
*
|
72 |
-
* @since 1.0.0
|
73 |
-
* @access public
|
74 |
-
*/
|
75 |
-
public function check_rtl() {
|
76 |
-
return is_rtl();
|
77 |
-
}
|
78 |
-
|
79 |
-
/**
|
80 |
-
* Retrieve Widget Title.
|
81 |
-
*
|
82 |
-
* @since 1.0.0
|
83 |
-
* @access public
|
84 |
-
*/
|
85 |
-
public function get_title() {
|
86 |
-
return __( 'Modal Box', 'premium-addons-for-elementor' );
|
87 |
-
}
|
88 |
-
|
89 |
-
/**
|
90 |
-
* Retrieve Widget Icon.
|
91 |
-
*
|
92 |
-
* @since 1.0.0
|
93 |
-
* @access public
|
94 |
-
*
|
95 |
-
* @return string widget icon.
|
96 |
-
*/
|
97 |
-
public function get_icon() {
|
98 |
-
return 'pa-modal-box';
|
99 |
-
}
|
100 |
-
|
101 |
-
/**
|
102 |
-
* Retrieve Widget Dependent CSS.
|
103 |
-
*
|
104 |
-
* @since 1.0.0
|
105 |
-
* @access public
|
106 |
-
*
|
107 |
-
* @return array CSS style handles.
|
108 |
-
*/
|
109 |
-
public function get_style_depends() {
|
110 |
-
return array(
|
111 |
-
'premium-addons',
|
112 |
-
);
|
113 |
-
}
|
114 |
-
|
115 |
-
/**
|
116 |
-
* Retrieve Widget Dependent JS.
|
117 |
-
*
|
118 |
-
* @since 1.0.0
|
119 |
-
* @access public
|
120 |
-
*
|
121 |
-
* @return array JS script handles.
|
122 |
-
*/
|
123 |
-
public function get_script_depends() {
|
124 |
-
|
125 |
-
$draw_scripts = $this->check_icon_draw() ? array(
|
126 |
-
'pa-fontawesome-all',
|
127 |
-
'pa-tweenmax',
|
128 |
-
'pa-motionpath',
|
129 |
-
) : array();
|
130 |
-
|
131 |
-
return array_merge(
|
132 |
-
$draw_scripts,
|
133 |
-
array(
|
134 |
-
'pa-modal',
|
135 |
-
'lottie-js',
|
136 |
-
'premium-addons',
|
137 |
-
)
|
138 |
-
);
|
139 |
-
}
|
140 |
-
|
141 |
-
/**
|
142 |
-
* Retrieve Widget Keywords.
|
143 |
-
*
|
144 |
-
* @since 1.0.0
|
145 |
-
* @access public
|
146 |
-
*
|
147 |
-
* @return string Widget keywords.
|
148 |
-
*/
|
149 |
-
public function get_keywords() {
|
150 |
-
return array( 'pa', 'premium', 'popup', 'lightbox', 'advanced', 'embed' );
|
151 |
-
}
|
152 |
-
|
153 |
-
/**
|
154 |
-
* Retrieve Widget Categories.
|
155 |
-
*
|
156 |
-
* @since 1.5.1
|
157 |
-
* @access public
|
158 |
-
*
|
159 |
-
* @return array Widget categories.
|
160 |
-
*/
|
161 |
-
public function get_categories() {
|
162 |
-
return array( 'premium-elements' );
|
163 |
-
}
|
164 |
-
|
165 |
-
/**
|
166 |
-
* Retrieve Widget Support URL.
|
167 |
-
*
|
168 |
-
* @access public
|
169 |
-
*
|
170 |
-
* @return string support URL.
|
171 |
-
*/
|
172 |
-
public function get_custom_help_url() {
|
173 |
-
return 'https://premiumaddons.com/support/';
|
174 |
-
}
|
175 |
-
|
176 |
-
/**
|
177 |
-
* Register Modal Box controls.
|
178 |
-
*
|
179 |
-
* @since 1.0.0
|
180 |
-
* @access protected
|
181 |
-
*/
|
182 |
-
protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
183 |
-
|
184 |
-
$draw_icon = $this->check_icon_draw();
|
185 |
-
|
186 |
-
$this->start_controls_section(
|
187 |
-
'premium_modal_box_selector_content_section',
|
188 |
-
array(
|
189 |
-
'label' => __( 'Content', 'premium-addons-for-elementor' ),
|
190 |
-
)
|
191 |
-
);
|
192 |
-
|
193 |
-
$this->add_control(
|
194 |
-
'premium_modal_box_header_switcher',
|
195 |
-
array(
|
196 |
-
'label' => __( 'Header', 'premium-addons-for-elementor' ),
|
197 |
-
'type' => Controls_Manager::SWITCHER,
|
198 |
-
'label_on' => 'show',
|
199 |
-
'label_off' => 'hide',
|
200 |
-
'default' => 'yes',
|
201 |
-
'description' => __( 'Enable or disable modal header', 'premium-addons-for-elementor' ),
|
202 |
-
)
|
203 |
-
);
|
204 |
-
|
205 |
-
$this->add_control(
|
206 |
-
'premium_modal_box_icon_selection',
|
207 |
-
array(
|
208 |
-
'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
|
209 |
-
'type' => Controls_Manager::SELECT,
|
210 |
-
'options' => array(
|
211 |
-
'noicon' => __( 'None', 'premium-addons-for-elementor' ),
|
212 |
-
'fonticon' => __( 'Icon', 'premium-addons-for-elementor' ),
|
213 |
-
'image' => __( 'Custom Image', 'premium-addons-for-elementor' ),
|
214 |
-
'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
|
215 |
-
),
|
216 |
-
'default' => 'noicon',
|
217 |
-
'condition' => array(
|
218 |
-
'premium_modal_box_header_switcher' => 'yes',
|
219 |
-
),
|
220 |
-
'label_block' => true,
|
221 |
-
)
|
222 |
-
);
|
223 |
-
|
224 |
-
$this->add_control(
|
225 |
-
'premium_modal_box_font_icon_updated',
|
226 |
-
array(
|
227 |
-
'label' => __( 'Select Icon', 'premium-addons-for-elementor' ),
|
228 |
-
'type' => Controls_Manager::ICONS,
|
229 |
-
'fa4compatibility' => 'premium_modal_box_font_icon',
|
230 |
-
'condition' => array(
|
231 |
-
'premium_modal_box_icon_selection' => 'fonticon',
|
232 |
-
'premium_modal_box_header_switcher' => 'yes',
|
233 |
-
),
|
234 |
-
'label_block' => true,
|
235 |
-
)
|
236 |
-
);
|
237 |
-
|
238 |
-
$this->add_control(
|
239 |
-
'premium_modal_box_image_icon',
|
240 |
-
array(
|
241 |
-
'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),
|
242 |
-
'type' => Controls_Manager::MEDIA,
|
243 |
-
'dynamic' => array( 'active' => true ),
|
244 |
-
'default' => array(
|
245 |
-
'url' => Utils::get_placeholder_image_src(),
|
246 |
-
),
|
247 |
-
'condition' => array(
|
248 |
-
'premium_modal_box_icon_selection' => 'image',
|
249 |
-
'premium_modal_box_header_switcher' => 'yes',
|
250 |
-
),
|
251 |
-
'label_block' => true,
|
252 |
-
)
|
253 |
-
);
|
254 |
-
|
255 |
-
$this->add_control(
|
256 |
-
'header_lottie_url',
|
257 |
-
array(
|
258 |
-
'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
|
259 |
-
'type' => Controls_Manager::TEXT,
|
260 |
-
'dynamic' => array( 'active' => true ),
|
261 |
-
'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
|
262 |
-
'label_block' => true,
|
263 |
-
'condition' => array(
|
264 |
-
'premium_modal_box_icon_selection' => 'animation',
|
265 |
-
'premium_modal_box_header_switcher' => 'yes',
|
266 |
-
),
|
267 |
-
)
|
268 |
-
);
|
269 |
-
|
270 |
-
$this->add_control(
|
271 |
-
'header_lottie_loop',
|
272 |
-
array(
|
273 |
-
'label' => __( 'Loop', 'premium-addons-for-elementor' ),
|
274 |
-
'type' => Controls_Manager::SWITCHER,
|
275 |
-
'return_value' => 'true',
|
276 |
-
'default' => 'true',
|
277 |
-
'condition' => array(
|
278 |
-
'premium_modal_box_icon_selection' => 'animation',
|
279 |
-
'premium_modal_box_header_switcher' => 'yes',
|
280 |
-
),
|
281 |
-
)
|
282 |
-
);
|
283 |
-
|
284 |
-
$this->add_control(
|
285 |
-
'header_lottie_reverse',
|
286 |
-
array(
|
287 |
-
'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
|
288 |
-
'type' => Controls_Manager::SWITCHER,
|
289 |
-
'return_value' => 'true',
|
290 |
-
'condition' => array(
|
291 |
-
'premium_modal_box_icon_selection' => 'animation',
|
292 |
-
'premium_modal_box_header_switcher' => 'yes',
|
293 |
-
),
|
294 |
-
)
|
295 |
-
);
|
296 |
-
|
297 |
-
$this->add_responsive_control(
|
298 |
-
'premium_modal_box_font_icon_size',
|
299 |
-
array(
|
300 |
-
'label' => __( 'Icon Size', 'premium-addons-for-elementor' ),
|
301 |
-
'type' => Controls_Manager::SLIDER,
|
302 |
-
'size_units' => array( 'px', 'em' ),
|
303 |
-
'selectors' => array(
|
304 |
-
'{{WRAPPER}} .premium-modal-box-modal-title i' => 'font-size: {{SIZE}}{{UNIT}}',
|
305 |
-
'{{WRAPPER}} .premium-modal-box-modal-title img' => 'width: {{SIZE}}{{UNIT}}',
|
306 |
-
'{{WRAPPER}} .premium-modal-box-modal-title svg' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important',
|
307 |
-
),
|
308 |
-
'condition' => array(
|
309 |
-
'premium_modal_box_icon_selection!' => 'noicon',
|
310 |
-
'premium_modal_box_header_switcher' => 'yes',
|
311 |
-
),
|
312 |
-
)
|
313 |
-
);
|
314 |
-
|
315 |
-
$this->add_control(
|
316 |
-
'premium_modal_box_title',
|
317 |
-
array(
|
318 |
-
'label' => __( 'Title', 'premium-addons-for-elementor' ),
|
319 |
-
'type' => Controls_Manager::TEXT,
|
320 |
-
'dynamic' => array( 'active' => true ),
|
321 |
-
'description' => __( 'Add a title for the modal box', 'premium-addons-for-elementor' ),
|
322 |
-
'default' => 'Modal Box Title',
|
323 |
-
'condition' => array(
|
324 |
-
'premium_modal_box_header_switcher' => 'yes',
|
325 |
-
),
|
326 |
-
'label_block' => true,
|
327 |
-
)
|
328 |
-
);
|
329 |
-
|
330 |
-
$this->add_control(
|
331 |
-
'premium_modal_box_content_type',
|
332 |
-
array(
|
333 |
-
'label' => __( 'Content to Show', 'premium-addons-for-elementor' ),
|
334 |
-
'type' => Controls_Manager::SELECT,
|
335 |
-
'options' => array(
|
336 |
-
'editor' => __( 'Text Editor', 'premium-addons-for-elementor' ),
|
337 |
-
'template' => __( 'Elementor Template', 'premium-addons-for-elementor' ),
|
338 |
-
),
|
339 |
-
'default' => 'editor',
|
340 |
-
'separator' => 'before',
|
341 |
-
'label_block' => true,
|
342 |
-
)
|
343 |
-
);
|
344 |
-
|
345 |
-
$this->add_control(
|
346 |
-
'live_temp_content',
|
347 |
-
array(
|
348 |
-
'label' => __( 'Template Title', 'premium-addons-for-elementor' ),
|
349 |
-
'type' => Controls_Manager::TEXT,
|
350 |
-
'classes' => 'premium-live-temp-title control-hidden',
|
351 |
-
'label_block' => true,
|
352 |
-
'condition' => array(
|
353 |
-
'premium_modal_box_content_type' => 'template',
|
354 |
-
),
|
355 |
-
)
|
356 |
-
);
|
357 |
-
|
358 |
-
$this->add_control(
|
359 |
-
'modal_temp_live_btn',
|
360 |
-
array(
|
361 |
-
'type' => Controls_Manager::BUTTON,
|
362 |
-
'label_block' => true,
|
363 |
-
'button_type' => 'default papro-btn-block',
|
364 |
-
'text' => __( 'Create / Edit Template', 'premium-addons-for-elementor' ),
|
365 |
-
'event' => 'createLiveTemp',
|
366 |
-
'condition' => array(
|
367 |
-
'premium_modal_box_content_type' => 'template',
|
368 |
-
),
|
369 |
-
)
|
370 |
-
);
|
371 |
-
|
372 |
-
$this->add_control(
|
373 |
-
'premium_modal_box_content_temp',
|
374 |
-
array(
|
375 |
-
'label' => __( 'OR Select Existing Template', 'premium-addons-for-elementor' ),
|
376 |
-
'type' => Controls_Manager::SELECT2,
|
377 |
-
'label_block' => true,
|
378 |
-
'classes' => 'premium-live-temp-label',
|
379 |
-
'options' => $this->getTemplateInstance()->get_elementor_page_list(),
|
380 |
-
'condition' => array(
|
381 |
-
'premium_modal_box_content_type' => 'template',
|
382 |
-
),
|
383 |
-
)
|
384 |
-
);
|
385 |
-
|
386 |
-
$this->add_control(
|
387 |
-
'premium_modal_box_content',
|
388 |
-
array(
|
389 |
-
'type' => Controls_Manager::WYSIWYG,
|
390 |
-
'default' => 'Modal Box Content',
|
391 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-body',
|
392 |
-
'dynamic' => array( 'active' => true ),
|
393 |
-
'condition' => array(
|
394 |
-
'premium_modal_box_content_type' => 'editor',
|
395 |
-
),
|
396 |
-
'show_label' => false,
|
397 |
-
)
|
398 |
-
);
|
399 |
-
|
400 |
-
$this->add_control(
|
401 |
-
'premium_modal_box_upper_close',
|
402 |
-
array(
|
403 |
-
'label' => __( 'Upper Close Button', 'premium-addons-for-elementor' ),
|
404 |
-
'type' => Controls_Manager::SWITCHER,
|
405 |
-
'separator' => 'before',
|
406 |
-
'default' => 'yes',
|
407 |
-
'condition' => array(
|
408 |
-
'premium_modal_box_header_switcher' => 'yes',
|
409 |
-
),
|
410 |
-
)
|
411 |
-
);
|
412 |
-
|
413 |
-
$this->add_control(
|
414 |
-
'premium_modal_box_lower_close',
|
415 |
-
array(
|
416 |
-
'label' => __( 'Lower Close Button', 'premium-addons-for-elementor' ),
|
417 |
-
'type' => Controls_Manager::SWITCHER,
|
418 |
-
'default' => 'yes',
|
419 |
-
)
|
420 |
-
);
|
421 |
-
|
422 |
-
$this->add_control(
|
423 |
-
'premium_modal_close_text',
|
424 |
-
array(
|
425 |
-
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
426 |
-
'default' => __( 'Close', 'premium-addons-for-elementor' ),
|
427 |
-
'type' => Controls_Manager::TEXT,
|
428 |
-
'dynamic' => array( 'active' => true ),
|
429 |
-
'label_block' => true,
|
430 |
-
'condition' => array(
|
431 |
-
'premium_modal_box_lower_close' => 'yes',
|
432 |
-
),
|
433 |
-
)
|
434 |
-
);
|
435 |
-
|
436 |
-
$this->add_control(
|
437 |
-
'premium_modal_box_animation',
|
438 |
-
array(
|
439 |
-
'label' => __( 'Entrance Animation', 'premium-addons-for-elementor' ),
|
440 |
-
'type' => Controls_Manager::ANIMATION,
|
441 |
-
'default' => 'fadeInDown',
|
442 |
-
'label_block' => true,
|
443 |
-
'frontend_available' => true,
|
444 |
-
'render_type' => 'template',
|
445 |
-
|
446 |
-
)
|
447 |
-
);
|
448 |
-
|
449 |
-
$this->add_control(
|
450 |
-
'premium_modal_box_animation_duration',
|
451 |
-
array(
|
452 |
-
'label' => __( 'Animation Duration', 'premium-addons-for-elementor' ),
|
453 |
-
'type' => Controls_Manager::SELECT,
|
454 |
-
'default' => 'fast',
|
455 |
-
'options' => array(
|
456 |
-
'slow' => __( 'Slow', 'premium-addons-for-elementor' ),
|
457 |
-
'' => __( 'Normal', 'premium-addons-for-elementor' ),
|
458 |
-
'fast' => __( 'Fast', 'premium-addons-for-elementor' ),
|
459 |
-
),
|
460 |
-
'condition' => array(
|
461 |
-
'premium_modal_box_animation!' => '',
|
462 |
-
),
|
463 |
-
)
|
464 |
-
);
|
465 |
-
|
466 |
-
$this->add_control(
|
467 |
-
'premium_modal_box_animation_delay',
|
468 |
-
array(
|
469 |
-
'label' => __( 'Animation Delay', 'premium-addons-for-elementor' ) . ' (s)',
|
470 |
-
'type' => Controls_Manager::NUMBER,
|
471 |
-
'default' => '',
|
472 |
-
'step' => 0.1,
|
473 |
-
'condition' => array(
|
474 |
-
'premium_modal_box_animation!' => '',
|
475 |
-
),
|
476 |
-
'frontend_available' => true,
|
477 |
-
)
|
478 |
-
);
|
479 |
-
|
480 |
-
$this->end_controls_section();
|
481 |
-
|
482 |
-
$this->start_controls_section(
|
483 |
-
'premium_modal_box_content_section',
|
484 |
-
array(
|
485 |
-
'label' => __( 'Trigger Options', 'premium-addons-for-elementor' ),
|
486 |
-
)
|
487 |
-
);
|
488 |
-
|
489 |
-
$this->add_control(
|
490 |
-
'premium_modal_box_display_on',
|
491 |
-
array(
|
492 |
-
'label' => __( 'Trigger', 'premium-addons-for-elementor' ),
|
493 |
-
'type' => Controls_Manager::SELECT,
|
494 |
-
'description' => __( 'Choose where would you like the modal box appear on', 'premium-addons-for-elementor' ),
|
495 |
-
'options' => array(
|
496 |
-
'button' => __( 'Button', 'premium-addons-for-elementor' ),
|
497 |
-
'image' => __( 'Image', 'premium-addons-for-elementor' ),
|
498 |
-
'text' => __( 'Text', 'premium-addons-for-elementor' ),
|
499 |
-
'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
|
500 |
-
'pageload' => __( 'On Page Load', 'premium-addons-for-elementor' ),
|
501 |
-
),
|
502 |
-
'label_block' => true,
|
503 |
-
'default' => 'button',
|
504 |
-
)
|
505 |
-
);
|
506 |
-
|
507 |
-
$this->add_control(
|
508 |
-
'premium_modal_box_button_text',
|
509 |
-
array(
|
510 |
-
'label' => __( 'Button Text', 'premium-addons-for-elementor' ),
|
511 |
-
'default' => __( 'Premium Addons', 'premium-addons-for-elementor' ),
|
512 |
-
'type' => Controls_Manager::TEXT,
|
513 |
-
'dynamic' => array( 'active' => true ),
|
514 |
-
'label_block' => true,
|
515 |
-
'condition' => array(
|
516 |
-
'premium_modal_box_display_on' => 'button',
|
517 |
-
),
|
518 |
-
)
|
519 |
-
);
|
520 |
-
|
521 |
-
$this->add_control(
|
522 |
-
'premium_modal_box_icon_switcher',
|
523 |
-
array(
|
524 |
-
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
525 |
-
'type' => Controls_Manager::SWITCHER,
|
526 |
-
'condition' => array(
|
527 |
-
'premium_modal_box_display_on' => 'button',
|
528 |
-
),
|
529 |
-
'description' => __( 'Enable or disable button icon', 'premium-addons-for-elementor' ),
|
530 |
-
)
|
531 |
-
);
|
532 |
-
|
533 |
-
$this->add_control(
|
534 |
-
'icon_type',
|
535 |
-
array(
|
536 |
-
'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
|
537 |
-
'type' => Controls_Manager::SELECT,
|
538 |
-
'options' => array(
|
539 |
-
'icon' => __( 'Font Awesome Icon', 'premium-addons-for-elementor' ),
|
540 |
-
'svg' => __( 'SVG Code', 'premium-addons-for-elementor' ),
|
541 |
-
),
|
542 |
-
'default' => 'icon',
|
543 |
-
'condition' => array(
|
544 |
-
'premium_modal_box_display_on' => 'button',
|
545 |
-
),
|
546 |
-
)
|
547 |
-
);
|
548 |
-
|
549 |
-
$this->add_control(
|
550 |
-
'premium_modal_box_button_icon_selection_updated',
|
551 |
-
array(
|
552 |
-
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
553 |
-
'type' => Controls_Manager::ICONS,
|
554 |
-
'fa4compatibility' => 'premium_modal_box_button_icon_selection',
|
555 |
-
'default' => array(
|
556 |
-
'value' => 'fas fa-star',
|
557 |
-
'library' => 'fa-solid',
|
558 |
-
),
|
559 |
-
'label_block' => true,
|
560 |
-
'condition' => array(
|
561 |
-
'premium_modal_box_display_on' => 'button',
|
562 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
563 |
-
'icon_type' => 'icon',
|
564 |
-
),
|
565 |
-
)
|
566 |
-
);
|
567 |
-
|
568 |
-
$this->add_control(
|
569 |
-
'custom_svg',
|
570 |
-
array(
|
571 |
-
'label' => __( 'SVG Code', 'premium-addons-for-elementor' ),
|
572 |
-
'type' => Controls_Manager::TEXTAREA,
|
573 |
-
'description' => 'You can use these sites to create SVGs: <a href="https://danmarshall.github.io/google-font-to-svg-path/" target="_blank">Google Fonts</a> and <a href="https://boxy-svg.com/" target="_blank">Boxy SVG</a>',
|
574 |
-
'condition' => array(
|
575 |
-
'premium_modal_box_display_on' => 'button',
|
576 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
577 |
-
'icon_type' => 'svg',
|
578 |
-
),
|
579 |
-
)
|
580 |
-
);
|
581 |
-
|
582 |
-
$common_conditions = array(
|
583 |
-
'premium_modal_box_display_on' => 'button',
|
584 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
585 |
-
);
|
586 |
-
|
587 |
-
$this->add_control(
|
588 |
-
'draw_svg',
|
589 |
-
array(
|
590 |
-
'label' => __( 'Draw Icon', 'premium-addons-for-elementor' ),
|
591 |
-
'type' => Controls_Manager::SWITCHER,
|
592 |
-
'classes' => $draw_icon ? '' : 'editor-pa-control-disabled',
|
593 |
-
'condition' => array_merge(
|
594 |
-
$common_conditions,
|
595 |
-
array(
|
596 |
-
'icon_type' => array( 'icon', 'svg' ),
|
597 |
-
'premium_modal_box_button_icon_selection_updated[library]!' => 'svg',
|
598 |
-
)
|
599 |
-
),
|
600 |
-
)
|
601 |
-
);
|
602 |
-
|
603 |
-
if ( $draw_icon ) {
|
604 |
-
$this->add_control(
|
605 |
-
'path_width',
|
606 |
-
array(
|
607 |
-
'label' => __( 'Path Thickness', 'premium-addons-for-elementor' ),
|
608 |
-
'type' => Controls_Manager::SLIDER,
|
609 |
-
'range' => array(
|
610 |
-
'px' => array(
|
611 |
-
'min' => 0,
|
612 |
-
'max' => 50,
|
613 |
-
'step' => 0.1,
|
614 |
-
),
|
615 |
-
),
|
616 |
-
'condition' => array_merge(
|
617 |
-
$common_conditions,
|
618 |
-
array(
|
619 |
-
'icon_type' => array( 'icon', 'svg' ),
|
620 |
-
)
|
621 |
-
),
|
622 |
-
'selectors' => array(
|
623 |
-
'{{WRAPPER}} .premium-modal-trigger-btn svg *' => 'stroke-width: {{SIZE}}',
|
624 |
-
),
|
625 |
-
)
|
626 |
-
);
|
627 |
-
|
628 |
-
$this->add_control(
|
629 |
-
'svg_sync',
|
630 |
-
array(
|
631 |
-
'label' => __( 'Draw All Paths Together', 'premium-addons-for-elementor' ),
|
632 |
-
'type' => Controls_Manager::SWITCHER,
|
633 |
-
'condition' => array_merge(
|
634 |
-
$common_conditions,
|
635 |
-
array(
|
636 |
-
'icon_type' => array( 'icon', 'svg' ),
|
637 |
-
'draw_svg' => 'yes',
|
638 |
-
)
|
639 |
-
),
|
640 |
-
)
|
641 |
-
);
|
642 |
-
|
643 |
-
$this->add_control(
|
644 |
-
'frames',
|
645 |
-
array(
|
646 |
-
'label' => __( 'Speed', 'premium-addons-for-elementor' ),
|
647 |
-
'type' => Controls_Manager::NUMBER,
|
648 |
-
'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ),
|
649 |
-
'default' => 5,
|
650 |
-
'min' => 1,
|
651 |
-
'max' => 100,
|
652 |
-
'condition' => array_merge(
|
653 |
-
$common_conditions,
|
654 |
-
array(
|
655 |
-
'icon_type' => array( 'icon', 'svg' ),
|
656 |
-
'draw_svg' => 'yes',
|
657 |
-
)
|
658 |
-
),
|
659 |
-
)
|
660 |
-
);
|
661 |
-
|
662 |
-
$this->add_control(
|
663 |
-
'svg_loop',
|
664 |
-
array(
|
665 |
-
'label' => __( 'Loop', 'premium-addons-for-elementor' ),
|
666 |
-
'type' => Controls_Manager::SWITCHER,
|
667 |
-
'return_value' => 'true',
|
668 |
-
'default' => 'true',
|
669 |
-
'condition' => array_merge(
|
670 |
-
$common_conditions,
|
671 |
-
array(
|
672 |
-
'icon_type' => array( 'icon', 'svg' ),
|
673 |
-
'draw_svg' => 'yes',
|
674 |
-
)
|
675 |
-
),
|
676 |
-
)
|
677 |
-
);
|
678 |
-
|
679 |
-
$this->add_control(
|
680 |
-
'svg_reverse',
|
681 |
-
array(
|
682 |
-
'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
|
683 |
-
'type' => Controls_Manager::SWITCHER,
|
684 |
-
'return_value' => 'true',
|
685 |
-
'condition' => array_merge(
|
686 |
-
$common_conditions,
|
687 |
-
array(
|
688 |
-
'icon_type' => array( 'icon', 'svg' ),
|
689 |
-
'draw_svg' => 'yes',
|
690 |
-
)
|
691 |
-
),
|
692 |
-
)
|
693 |
-
);
|
694 |
-
|
695 |
-
$this->add_control(
|
696 |
-
'start_point',
|
697 |
-
array(
|
698 |
-
'label' => __( 'Start Point (%)', 'premium-addons-for-elementor' ),
|
699 |
-
'type' => Controls_Manager::SLIDER,
|
700 |
-
'description' => __( 'Set the point that the SVG should start from.', 'premium-addons-for-elementor' ),
|
701 |
-
'default' => array(
|
702 |
-
'unit' => '%',
|
703 |
-
'size' => 0,
|
704 |
-
),
|
705 |
-
'condition' => array_merge(
|
706 |
-
$common_conditions,
|
707 |
-
array(
|
708 |
-
'icon_type' => array( 'icon', 'svg' ),
|
709 |
-
'draw_svg' => 'yes',
|
710 |
-
'svg_reverse!' => 'true',
|
711 |
-
)
|
712 |
-
),
|
713 |
-
)
|
714 |
-
);
|
715 |
-
|
716 |
-
$this->add_control(
|
717 |
-
'end_point',
|
718 |
-
array(
|
719 |
-
'label' => __( 'End Point (%)', 'premium-addons-for-elementor' ),
|
720 |
-
'type' => Controls_Manager::SLIDER,
|
721 |
-
'description' => __( 'Set the point that the SVG should end at.', 'premium-addons-for-elementor' ),
|
722 |
-
'default' => array(
|
723 |
-
'unit' => '%',
|
724 |
-
'size' => 0,
|
725 |
-
),
|
726 |
-
'condition' => array_merge(
|
727 |
-
$common_conditions,
|
728 |
-
array(
|
729 |
-
'icon_type' => array( 'icon', 'svg' ),
|
730 |
-
'draw_svg' => 'yes',
|
731 |
-
'svg_reverse' => 'true',
|
732 |
-
)
|
733 |
-
),
|
734 |
-
|
735 |
-
)
|
736 |
-
);
|
737 |
-
|
738 |
-
$this->add_control(
|
739 |
-
'svg_hover',
|
740 |
-
array(
|
741 |
-
'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
|
742 |
-
'type' => Controls_Manager::SWITCHER,
|
743 |
-
'return_value' => 'true',
|
744 |
-
'condition' => array_merge(
|
745 |
-
$common_conditions,
|
746 |
-
array(
|
747 |
-
'icon_type' => array( 'icon', 'svg' ),
|
748 |
-
'draw_svg' => 'yes',
|
749 |
-
)
|
750 |
-
),
|
751 |
-
)
|
752 |
-
);
|
753 |
-
|
754 |
-
$this->add_control(
|
755 |
-
'svg_yoyo',
|
756 |
-
array(
|
757 |
-
'label' => __( 'Yoyo Effect', 'premium-addons-for-elementor' ),
|
758 |
-
'type' => Controls_Manager::SWITCHER,
|
759 |
-
'condition' => array_merge(
|
760 |
-
$common_conditions,
|
761 |
-
array(
|
762 |
-
'icon_type' => array( 'icon', 'svg' ),
|
763 |
-
'draw_svg' => 'yes',
|
764 |
-
'svg_loop' => 'true',
|
765 |
-
)
|
766 |
-
),
|
767 |
-
)
|
768 |
-
);
|
769 |
-
} else {
|
770 |
-
|
771 |
-
Helper_Functions::get_draw_svg_notice(
|
772 |
-
$this,
|
773 |
-
'modal',
|
774 |
-
array_merge(
|
775 |
-
$common_conditions,
|
776 |
-
array(
|
777 |
-
'icon_type' => array( 'icon', 'svg' ),
|
778 |
-
'premium_modal_box_button_icon_selection_updated[library]!' => 'svg',
|
779 |
-
)
|
780 |
-
)
|
781 |
-
);
|
782 |
-
|
783 |
-
}
|
784 |
-
|
785 |
-
$this->add_control(
|
786 |
-
'premium_modal_box_icon_position',
|
787 |
-
array(
|
788 |
-
'label' => __( 'Icon Position', 'premium-addons-for-elementor' ),
|
789 |
-
'type' => Controls_Manager::SELECT,
|
790 |
-
'default' => 'before',
|
791 |
-
'options' => array(
|
792 |
-
'before' => __( 'Before', 'premium-addons-for-elementor' ),
|
793 |
-
'after' => __( 'After', 'premium-addons-for-elementor' ),
|
794 |
-
),
|
795 |
-
'label_block' => true,
|
796 |
-
'condition' => array(
|
797 |
-
'premium_modal_box_display_on' => 'button',
|
798 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
799 |
-
),
|
800 |
-
)
|
801 |
-
);
|
802 |
-
|
803 |
-
$this->add_control(
|
804 |
-
'premium_modal_box_icon_before_size',
|
805 |
-
array(
|
806 |
-
'label' => __( 'Icon Size', 'premium-addons-for-elementor' ),
|
807 |
-
'type' => Controls_Manager::SLIDER,
|
808 |
-
'selectors' => array(
|
809 |
-
'{{WRAPPER}} .premium-modal-trigger-btn i' => 'font-size: {{SIZE}}px',
|
810 |
-
'{{WRAPPER}} .premium-modal-trigger-btn svg' => 'width: {{SIZE}}px !important; height: {{SIZE}}px !important',
|
811 |
-
),
|
812 |
-
'condition' => array(
|
813 |
-
'premium_modal_box_display_on' => 'button',
|
814 |
-
'icon_type' => 'icon',
|
815 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
816 |
-
),
|
817 |
-
)
|
818 |
-
);
|
819 |
-
|
820 |
-
$this->add_responsive_control(
|
821 |
-
'svg_icon_width',
|
822 |
-
array(
|
823 |
-
'label' => __( 'Icon Width', 'premium-addons-for-elementor' ),
|
824 |
-
'type' => Controls_Manager::SLIDER,
|
825 |
-
'size_units' => array( 'px', 'em', '%' ),
|
826 |
-
'range' => array(
|
827 |
-
'px' => array(
|
828 |
-
'min' => 1,
|
829 |
-
'max' => 600,
|
830 |
-
),
|
831 |
-
'em' => array(
|
832 |
-
'min' => 1,
|
833 |
-
'max' => 30,
|
834 |
-
),
|
835 |
-
),
|
836 |
-
'default' => array(
|
837 |
-
'size' => 100,
|
838 |
-
'unit' => 'px',
|
839 |
-
),
|
840 |
-
'condition' => array(
|
841 |
-
'premium_modal_box_display_on' => 'button',
|
842 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
843 |
-
'icon_type' => 'svg',
|
844 |
-
),
|
845 |
-
'selectors' => array(
|
846 |
-
'{{WRAPPER}} .premium-modal-trigger-btn svg' => 'width: {{SIZE}}{{UNIT}};',
|
847 |
-
),
|
848 |
-
)
|
849 |
-
);
|
850 |
-
|
851 |
-
$this->add_responsive_control(
|
852 |
-
'svg_icon_height',
|
853 |
-
array(
|
854 |
-
'label' => __( 'Icon Height', 'premium-addons-for-elementor' ),
|
855 |
-
'type' => Controls_Manager::SLIDER,
|
856 |
-
'size_units' => array( 'px', 'em' ),
|
857 |
-
'range' => array(
|
858 |
-
'px' => array(
|
859 |
-
'min' => 1,
|
860 |
-
'max' => 300,
|
861 |
-
),
|
862 |
-
'em' => array(
|
863 |
-
'min' => 1,
|
864 |
-
'max' => 30,
|
865 |
-
),
|
866 |
-
),
|
867 |
-
'condition' => array(
|
868 |
-
'premium_modal_box_display_on' => 'button',
|
869 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
870 |
-
'icon_type' => 'svg',
|
871 |
-
),
|
872 |
-
'selectors' => array(
|
873 |
-
'{{WRAPPER}} .premium-modal-trigger-btn svg' => 'height: {{SIZE}}{{UNIT}}',
|
874 |
-
),
|
875 |
-
)
|
876 |
-
);
|
877 |
-
|
878 |
-
if ( ! $this->check_rtl() ) {
|
879 |
-
$this->add_control(
|
880 |
-
'premium_modal_box_icon_before_spacing',
|
881 |
-
array(
|
882 |
-
'label' => __( 'Icon Spacing', 'premium-addons-for-elementor' ),
|
883 |
-
'type' => Controls_Manager::SLIDER,
|
884 |
-
'condition' => array(
|
885 |
-
'premium_modal_box_display_on' => 'button',
|
886 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
887 |
-
'premium_modal_box_icon_position' => 'before',
|
888 |
-
),
|
889 |
-
'default' => array(
|
890 |
-
'size' => 15,
|
891 |
-
),
|
892 |
-
'selectors' => array(
|
893 |
-
'{{WRAPPER}} .premium-modal-trigger-btn i, {{WRAPPER}} .premium-modal-trigger-btn svg' => 'margin-right: {{SIZE}}px',
|
894 |
-
),
|
895 |
-
'separator' => 'after',
|
896 |
-
)
|
897 |
-
);
|
898 |
-
|
899 |
-
$this->add_control(
|
900 |
-
'premium_modal_box_icon_after_spacing',
|
901 |
-
array(
|
902 |
-
'label' => __( 'Icon Spacing', 'premium-addons-for-elementor' ),
|
903 |
-
'type' => Controls_Manager::SLIDER,
|
904 |
-
'default' => array(
|
905 |
-
'size' => 15,
|
906 |
-
),
|
907 |
-
'selectors' => array(
|
908 |
-
'{{WRAPPER}} .premium-modal-trigger-btn i, {{WRAPPER}} .premium-modal-trigger-btn svg' => 'margin-left: {{SIZE}}px',
|
909 |
-
),
|
910 |
-
'separator' => 'after',
|
911 |
-
'condition' => array(
|
912 |
-
'premium_modal_box_display_on' => 'button',
|
913 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
914 |
-
'premium_modal_box_icon_position' => 'after',
|
915 |
-
),
|
916 |
-
)
|
917 |
-
);
|
918 |
-
}
|
919 |
-
|
920 |
-
if ( $this->check_rtl() ) {
|
921 |
-
$this->add_control(
|
922 |
-
'premium_modal_box_icon_rtl_before_spacing',
|
923 |
-
array(
|
924 |
-
'label' => __( 'Icon Spacing', 'premium-addons-for-elementor' ),
|
925 |
-
'type' => Controls_Manager::SLIDER,
|
926 |
-
'condition' => array(
|
927 |
-
'premium_modal_box_display_on' => 'button',
|
928 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
929 |
-
'premium_modal_box_icon_position' => 'before',
|
930 |
-
),
|
931 |
-
'default' => array(
|
932 |
-
'size' => 15,
|
933 |
-
),
|
934 |
-
'selectors' => array(
|
935 |
-
'{{WRAPPER}} .premium-modal-trigger-btn i, {{WRAPPER}} .premium-modal-trigger-btn svg' => 'margin-left: {{SIZE}}px',
|
936 |
-
),
|
937 |
-
'separator' => 'after',
|
938 |
-
)
|
939 |
-
);
|
940 |
-
|
941 |
-
$this->add_control(
|
942 |
-
'premium_modal_box_icon_rtl_after_spacing',
|
943 |
-
array(
|
944 |
-
'label' => __( 'Icon Spacing', 'premium-addons-for-elementor' ),
|
945 |
-
'type' => Controls_Manager::SLIDER,
|
946 |
-
'default' => array(
|
947 |
-
'size' => 15,
|
948 |
-
),
|
949 |
-
'selectors' => array(
|
950 |
-
'{{WRAPPER}} .premium-modal-trigger-btn i, {{WRAPPER}} .premium-modal-trigger-btn svg' => 'margin-right: {{SIZE}}px',
|
951 |
-
),
|
952 |
-
'separator' => 'after',
|
953 |
-
'condition' => array(
|
954 |
-
'premium_modal_box_display_on' => 'button',
|
955 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
956 |
-
'premium_modal_box_icon_position' => 'after',
|
957 |
-
),
|
958 |
-
)
|
959 |
-
);
|
960 |
-
}
|
961 |
-
|
962 |
-
$this->add_control(
|
963 |
-
'premium_modal_box_button_size',
|
964 |
-
array(
|
965 |
-
'label' => __( 'Button Size', 'premium-addons-for-elementor' ),
|
966 |
-
'type' => Controls_Manager::SELECT,
|
967 |
-
'options' => array(
|
968 |
-
'sm' => __( 'Small', 'premium-addons-for-elementor' ),
|
969 |
-
'md' => __( 'Medium', 'premium-addons-for-elementor' ),
|
970 |
-
'lg' => __( 'Large', 'premium-addons-for-elementor' ),
|
971 |
-
'block' => __( 'Block', 'premium-addons-for-elementor' ),
|
972 |
-
),
|
973 |
-
'label_block' => true,
|
974 |
-
'default' => 'lg',
|
975 |
-
'condition' => array(
|
976 |
-
'premium_modal_box_display_on' => 'button',
|
977 |
-
),
|
978 |
-
)
|
979 |
-
);
|
980 |
-
|
981 |
-
$this->add_control(
|
982 |
-
'premium_modal_box_image_src',
|
983 |
-
array(
|
984 |
-
'label' => __( 'Image', 'premium-addons-for-elementor' ),
|
985 |
-
'type' => Controls_Manager::MEDIA,
|
986 |
-
'dynamic' => array( 'active' => true ),
|
987 |
-
'default' => array(
|
988 |
-
'url' => Utils::get_placeholder_image_src(),
|
989 |
-
),
|
990 |
-
'label_block' => true,
|
991 |
-
'condition' => array(
|
992 |
-
'premium_modal_box_display_on' => 'image',
|
993 |
-
),
|
994 |
-
)
|
995 |
-
);
|
996 |
-
|
997 |
-
$this->add_control(
|
998 |
-
'premium_modal_box_selector_text',
|
999 |
-
array(
|
1000 |
-
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
1001 |
-
'type' => Controls_Manager::TEXT,
|
1002 |
-
'dynamic' => array( 'active' => true ),
|
1003 |
-
'label_block' => true,
|
1004 |
-
'default' => __( 'Premium Addons', 'premium-addons-for-elementor' ),
|
1005 |
-
'condition' => array(
|
1006 |
-
'premium_modal_box_display_on' => 'text',
|
1007 |
-
),
|
1008 |
-
)
|
1009 |
-
);
|
1010 |
-
|
1011 |
-
$this->add_control(
|
1012 |
-
'lottie_url',
|
1013 |
-
array(
|
1014 |
-
'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
|
1015 |
-
'type' => Controls_Manager::TEXT,
|
1016 |
-
'dynamic' => array( 'active' => true ),
|
1017 |
-
'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
|
1018 |
-
'label_block' => true,
|
1019 |
-
'condition' => array(
|
1020 |
-
'premium_modal_box_display_on' => 'animation',
|
1021 |
-
),
|
1022 |
-
)
|
1023 |
-
);
|
1024 |
-
|
1025 |
-
$this->add_control(
|
1026 |
-
'lottie_loop',
|
1027 |
-
array(
|
1028 |
-
'label' => __( 'Loop', 'premium-addons-for-elementor' ),
|
1029 |
-
'type' => Controls_Manager::SWITCHER,
|
1030 |
-
'return_value' => 'true',
|
1031 |
-
'default' => 'true',
|
1032 |
-
'condition' => array(
|
1033 |
-
'premium_modal_box_display_on' => 'animation',
|
1034 |
-
),
|
1035 |
-
)
|
1036 |
-
);
|
1037 |
-
|
1038 |
-
$this->add_control(
|
1039 |
-
'lottie_reverse',
|
1040 |
-
array(
|
1041 |
-
'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
|
1042 |
-
'type' => Controls_Manager::SWITCHER,
|
1043 |
-
'return_value' => 'true',
|
1044 |
-
'condition' => array(
|
1045 |
-
'premium_modal_box_display_on' => 'animation',
|
1046 |
-
),
|
1047 |
-
)
|
1048 |
-
);
|
1049 |
-
|
1050 |
-
$this->add_control(
|
1051 |
-
'lottie_hover',
|
1052 |
-
array(
|
1053 |
-
'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
|
1054 |
-
'type' => Controls_Manager::SWITCHER,
|
1055 |
-
'return_value' => 'true',
|
1056 |
-
'condition' => array(
|
1057 |
-
'premium_modal_box_display_on' => 'animation',
|
1058 |
-
),
|
1059 |
-
)
|
1060 |
-
);
|
1061 |
-
|
1062 |
-
$this->add_responsive_control(
|
1063 |
-
'trigger_image_animation_size',
|
1064 |
-
array(
|
1065 |
-
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
1066 |
-
'type' => Controls_Manager::SLIDER,
|
1067 |
-
'size_units' => array( 'px', 'em', '%' ),
|
1068 |
-
'range' => array(
|
1069 |
-
'px' => array(
|
1070 |
-
'min' => 1,
|
1071 |
-
'max' => 800,
|
1072 |
-
),
|
1073 |
-
'em' => array(
|
1074 |
-
'min' => 1,
|
1075 |
-
'max' => 30,
|
1076 |
-
),
|
1077 |
-
),
|
1078 |
-
'selectors' => array(
|
1079 |
-
'{{WRAPPER}} .premium-modal-trigger-img, {{WRAPPER}} .premium-modal-trigger-animation' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
|
1080 |
-
),
|
1081 |
-
'condition' => array(
|
1082 |
-
'premium_modal_box_display_on' => array( 'image', 'animation' ),
|
1083 |
-
),
|
1084 |
-
)
|
1085 |
-
);
|
1086 |
-
|
1087 |
-
$this->add_control(
|
1088 |
-
'premium_modal_box_popup_delay',
|
1089 |
-
array(
|
1090 |
-
'label' => __( 'Delay in Popup Display (Sec)', 'premium-addons-for-elementor' ),
|
1091 |
-
'type' => Controls_Manager::NUMBER,
|
1092 |
-
'description' => __( 'When should the popup appear during page load? The value are counted in seconds', 'premium-addons-for-elementor' ),
|
1093 |
-
'default' => 1,
|
1094 |
-
'condition' => array(
|
1095 |
-
'premium_modal_box_display_on' => 'pageload',
|
1096 |
-
),
|
1097 |
-
)
|
1098 |
-
);
|
1099 |
-
|
1100 |
-
$this->add_responsive_control(
|
1101 |
-
'premium_modal_box_selector_align',
|
1102 |
-
array(
|
1103 |
-
'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
|
1104 |
-
'type' => Controls_Manager::CHOOSE,
|
1105 |
-
'options' => array(
|
1106 |
-
'left' => array(
|
1107 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1108 |
-
'icon' => 'eicon-text-align-left',
|
1109 |
-
),
|
1110 |
-
'center' => array(
|
1111 |
-
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1112 |
-
'icon' => 'eicon-text-align-center',
|
1113 |
-
),
|
1114 |
-
'right' => array(
|
1115 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1116 |
-
'icon' => 'eicon-text-align-right',
|
1117 |
-
),
|
1118 |
-
),
|
1119 |
-
'toggle' => false,
|
1120 |
-
'default' => 'center',
|
1121 |
-
'selectors' => array(
|
1122 |
-
'{{WRAPPER}} .premium-modal-trigger-container' => 'text-align: {{VALUE}};',
|
1123 |
-
),
|
1124 |
-
'conditions' => array(
|
1125 |
-
'relation' => 'or',
|
1126 |
-
'terms' => array(
|
1127 |
-
array(
|
1128 |
-
'terms' => array(
|
1129 |
-
array(
|
1130 |
-
'name' => 'premium_modal_box_display_on',
|
1131 |
-
'operator' => '!=',
|
1132 |
-
'value' => 'button',
|
1133 |
-
),
|
1134 |
-
array(
|
1135 |
-
'name' => 'premium_modal_box_display_on',
|
1136 |
-
'operator' => '!=',
|
1137 |
-
'value' => 'pageload',
|
1138 |
-
),
|
1139 |
-
),
|
1140 |
-
),
|
1141 |
-
array(
|
1142 |
-
'relation' => 'and',
|
1143 |
-
'terms' => array(
|
1144 |
-
array(
|
1145 |
-
'name' => 'premium_modal_box_display_on',
|
1146 |
-
'value' => 'button',
|
1147 |
-
),
|
1148 |
-
array(
|
1149 |
-
'name' => 'premium_modal_box_button_size',
|
1150 |
-
'operator' => '!=',
|
1151 |
-
'value' => 'block',
|
1152 |
-
),
|
1153 |
-
),
|
1154 |
-
),
|
1155 |
-
),
|
1156 |
-
),
|
1157 |
-
)
|
1158 |
-
);
|
1159 |
-
|
1160 |
-
$this->end_controls_section();
|
1161 |
-
|
1162 |
-
$this->start_controls_section(
|
1163 |
-
'section_pa_docs',
|
1164 |
-
array(
|
1165 |
-
'label' => __( 'Helpful Documentations', 'premium-addons-for-elementor' ),
|
1166 |
-
)
|
1167 |
-
);
|
1168 |
-
|
1169 |
-
$docs = array(
|
1170 |
-
'https://premiumaddons.com/docs/modal-box-widget-tutorial/' => __( 'Getting started »', 'premium-addons-for-elementor' ),
|
1171 |
-
'https://premiumaddons.com/docs/how-to-create-elementor-template-to-be-used-with-premium-addons' => __( 'How to create an Elementor template to be used in Modal Box widget »', 'premium-addons-for-elementor' ),
|
1172 |
-
'https://premiumaddons.com/docs/how-can-i-insert-a-video-box-inside-premium-modal-box-widget/' => __( 'How Can I Insert a Video Box inside Premium Modal Box Widget »', 'premium-addons-for-elementor' ),
|
1173 |
-
);
|
1174 |
-
|
1175 |
-
$doc_index = 1;
|
1176 |
-
foreach ( $docs as $url => $title ) {
|
1177 |
-
|
1178 |
-
$doc_url = Helper_Functions::get_campaign_link( $url, 'editor-page', 'wp-editor', 'get-support' );
|
1179 |
-
|
1180 |
-
$this->add_control(
|
1181 |
-
'doc_' . $doc_index,
|
1182 |
-
array(
|
1183 |
-
'type' => Controls_Manager::RAW_HTML,
|
1184 |
-
'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc_url, $title ),
|
1185 |
-
'content_classes' => 'editor-pa-doc',
|
1186 |
-
)
|
1187 |
-
);
|
1188 |
-
|
1189 |
-
$doc_index++;
|
1190 |
-
|
1191 |
-
}
|
1192 |
-
|
1193 |
-
$this->end_controls_section();
|
1194 |
-
|
1195 |
-
$this->start_controls_section(
|
1196 |
-
'premium_modal_box_selector_style_section',
|
1197 |
-
array(
|
1198 |
-
'label' => __( 'Trigger', 'premium-addons-for-elementor' ),
|
1199 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
1200 |
-
'condition' => array(
|
1201 |
-
'premium_modal_box_display_on!' => 'pageload',
|
1202 |
-
),
|
1203 |
-
)
|
1204 |
-
);
|
1205 |
-
|
1206 |
-
$this->add_group_control(
|
1207 |
-
Group_Control_Css_Filter::get_type(),
|
1208 |
-
array(
|
1209 |
-
'name' => 'trigger_css_filters',
|
1210 |
-
'selector' => '{{WRAPPER}} .premium-modal-trigger-animation',
|
1211 |
-
'condition' => array(
|
1212 |
-
'premium_modal_box_display_on' => 'animation',
|
1213 |
-
),
|
1214 |
-
)
|
1215 |
-
);
|
1216 |
-
|
1217 |
-
$this->add_group_control(
|
1218 |
-
Group_Control_Css_Filter::get_type(),
|
1219 |
-
array(
|
1220 |
-
'name' => 'trigger_hover_css_filters',
|
1221 |
-
'label' => __( 'Hover CSS Filters', 'premium-addons-for-elementor' ),
|
1222 |
-
'selector' => '{{WRAPPER}} .premium-modal-trigger-animation:hover',
|
1223 |
-
'condition' => array(
|
1224 |
-
'premium_modal_box_display_on' => 'animation',
|
1225 |
-
),
|
1226 |
-
)
|
1227 |
-
);
|
1228 |
-
|
1229 |
-
$this->add_group_control(
|
1230 |
-
Group_Control_Typography::get_type(),
|
1231 |
-
array(
|
1232 |
-
'name' => 'selectortext',
|
1233 |
-
'global' => array(
|
1234 |
-
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
|
1235 |
-
),
|
1236 |
-
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-text',
|
1237 |
-
'condition' => array(
|
1238 |
-
'premium_modal_box_display_on' => array( 'button', 'text' ),
|
1239 |
-
),
|
1240 |
-
)
|
1241 |
-
);
|
1242 |
-
|
1243 |
-
$this->add_control(
|
1244 |
-
'svg_color',
|
1245 |
-
array(
|
1246 |
-
'label' => __( 'After Draw Fill Color', 'premium-addons-for-elementor' ),
|
1247 |
-
'type' => Controls_Manager::COLOR,
|
1248 |
-
'global' => false,
|
1249 |
-
'separator' => 'after',
|
1250 |
-
'condition' => array(
|
1251 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
1252 |
-
'premium_modal_box_display_on' => 'button',
|
1253 |
-
'icon_type' => array( 'icon', 'svg' ),
|
1254 |
-
'draw_svg' => 'yes',
|
1255 |
-
),
|
1256 |
-
)
|
1257 |
-
);
|
1258 |
-
|
1259 |
-
$this->start_controls_tabs( 'premium_modal_box_button_style' );
|
1260 |
-
|
1261 |
-
$this->start_controls_tab(
|
1262 |
-
'premium_modal_box_tab_selector_normal',
|
1263 |
-
array(
|
1264 |
-
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
1265 |
-
'condition' => array(
|
1266 |
-
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1267 |
-
),
|
1268 |
-
)
|
1269 |
-
);
|
1270 |
-
|
1271 |
-
$this->add_control(
|
1272 |
-
'premium_modal_box_button_text_color',
|
1273 |
-
array(
|
1274 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1275 |
-
'type' => Controls_Manager::COLOR,
|
1276 |
-
'global' => array(
|
1277 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
1278 |
-
),
|
1279 |
-
'selectors' => array(
|
1280 |
-
'{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-text' => 'color:{{VALUE}};',
|
1281 |
-
),
|
1282 |
-
'condition' => array(
|
1283 |
-
'premium_modal_box_display_on' => array( 'button', 'text' ),
|
1284 |
-
),
|
1285 |
-
)
|
1286 |
-
);
|
1287 |
-
|
1288 |
-
$this->add_control(
|
1289 |
-
'premium_modal_box_button_icon_color',
|
1290 |
-
array(
|
1291 |
-
'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
|
1292 |
-
'type' => Controls_Manager::COLOR,
|
1293 |
-
'global' => array(
|
1294 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
1295 |
-
),
|
1296 |
-
'selectors' => array(
|
1297 |
-
'{{WRAPPER}} .premium-modal-trigger-btn i' => 'color:{{VALUE}}',
|
1298 |
-
'{{WRAPPER}} .premium-modal-trigger-btn svg, {{WRAPPER}} .premium-modal-trigger-btn svg *' => 'fill: {{VALUE}};',
|
1299 |
-
),
|
1300 |
-
'condition' => array(
|
1301 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
1302 |
-
'premium_modal_box_display_on' => 'button',
|
1303 |
-
),
|
1304 |
-
)
|
1305 |
-
);
|
1306 |
-
|
1307 |
-
if ( $draw_icon ) {
|
1308 |
-
$this->add_control(
|
1309 |
-
'stroke_color',
|
1310 |
-
array(
|
1311 |
-
'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
|
1312 |
-
'type' => Controls_Manager::COLOR,
|
1313 |
-
'global' => array(
|
1314 |
-
'default' => Global_Colors::COLOR_ACCENT,
|
1315 |
-
),
|
1316 |
-
'condition' => array(
|
1317 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
1318 |
-
'premium_modal_box_display_on' => 'button',
|
1319 |
-
'icon_type' => array( 'icon', 'svg' ),
|
1320 |
-
),
|
1321 |
-
'selectors' => array(
|
1322 |
-
'{{WRAPPER}} .premium-modal-trigger-btn svg *' => 'stroke: {{VALUE}};',
|
1323 |
-
),
|
1324 |
-
)
|
1325 |
-
);
|
1326 |
-
}
|
1327 |
-
|
1328 |
-
$this->add_control(
|
1329 |
-
'premium_modal_box_selector_background',
|
1330 |
-
array(
|
1331 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1332 |
-
'type' => Controls_Manager::COLOR,
|
1333 |
-
'global' => array(
|
1334 |
-
'default' => Global_Colors::COLOR_PRIMARY,
|
1335 |
-
),
|
1336 |
-
'selectors' => array(
|
1337 |
-
'{{WRAPPER}} .premium-modal-trigger-btn' => 'background-color: {{VALUE}};',
|
1338 |
-
),
|
1339 |
-
'condition' => array(
|
1340 |
-
'premium_modal_box_display_on' => 'button',
|
1341 |
-
),
|
1342 |
-
)
|
1343 |
-
);
|
1344 |
-
|
1345 |
-
$this->add_group_control(
|
1346 |
-
Group_Control_Border::get_type(),
|
1347 |
-
array(
|
1348 |
-
'name' => 'selector_border',
|
1349 |
-
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn,{{WRAPPER}} .premium-modal-trigger-text, {{WRAPPER}} .premium-modal-trigger-img',
|
1350 |
-
'condition' => array(
|
1351 |
-
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1352 |
-
),
|
1353 |
-
)
|
1354 |
-
);
|
1355 |
-
|
1356 |
-
$this->add_control(
|
1357 |
-
'premium_modal_box_selector_border_radius',
|
1358 |
-
array(
|
1359 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1360 |
-
'type' => Controls_Manager::SLIDER,
|
1361 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1362 |
-
'default' => array(
|
1363 |
-
'size' => 0,
|
1364 |
-
),
|
1365 |
-
'selectors' => array(
|
1366 |
-
'{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-text, {{WRAPPER}} .premium-modal-trigger-img' => 'border-radius:{{SIZE}}{{UNIT}};',
|
1367 |
-
),
|
1368 |
-
'condition' => array(
|
1369 |
-
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1370 |
-
),
|
1371 |
-
)
|
1372 |
-
);
|
1373 |
-
|
1374 |
-
$this->add_group_control(
|
1375 |
-
Group_Control_Box_Shadow::get_type(),
|
1376 |
-
array(
|
1377 |
-
'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
|
1378 |
-
'name' => 'premium_modal_box_selector_box_shadow',
|
1379 |
-
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-img',
|
1380 |
-
'condition' => array(
|
1381 |
-
'premium_modal_box_display_on' => array( 'button', 'image' ),
|
1382 |
-
),
|
1383 |
-
)
|
1384 |
-
);
|
1385 |
-
|
1386 |
-
$this->add_group_control(
|
1387 |
-
Group_Control_Text_Shadow::get_type(),
|
1388 |
-
array(
|
1389 |
-
'name' => 'premium_modal_box_selector_text_shadow',
|
1390 |
-
'selector' => '{{WRAPPER}} .premium-modal-trigger-text',
|
1391 |
-
'condition' => array(
|
1392 |
-
'premium_modal_box_display_on' => 'text',
|
1393 |
-
),
|
1394 |
-
)
|
1395 |
-
);
|
1396 |
-
|
1397 |
-
$this->end_controls_tab();
|
1398 |
-
|
1399 |
-
$this->start_controls_tab(
|
1400 |
-
'premium_modal_box_tab_selector_hover',
|
1401 |
-
array(
|
1402 |
-
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1403 |
-
'condition' => array(
|
1404 |
-
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1405 |
-
),
|
1406 |
-
)
|
1407 |
-
);
|
1408 |
-
|
1409 |
-
$this->add_control(
|
1410 |
-
'premium_modal_box_button_text_color_hover',
|
1411 |
-
array(
|
1412 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1413 |
-
'type' => Controls_Manager::COLOR,
|
1414 |
-
'global' => array(
|
1415 |
-
'default' => Global_Colors::COLOR_PRIMARY,
|
1416 |
-
),
|
1417 |
-
'selectors' => array(
|
1418 |
-
'{{WRAPPER}} .premium-modal-trigger-btn:hover, {{WRAPPER}} .premium-modal-trigger-text:hover' => 'color:{{VALUE}};',
|
1419 |
-
),
|
1420 |
-
'condition' => array(
|
1421 |
-
'premium_modal_box_display_on' => array( 'button', 'text' ),
|
1422 |
-
),
|
1423 |
-
)
|
1424 |
-
);
|
1425 |
-
|
1426 |
-
$this->add_control(
|
1427 |
-
'premium_modal_box_button_icon_hover_color',
|
1428 |
-
array(
|
1429 |
-
'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
|
1430 |
-
'type' => Controls_Manager::COLOR,
|
1431 |
-
'global' => array(
|
1432 |
-
'default' => Global_Colors::COLOR_PRIMARY,
|
1433 |
-
),
|
1434 |
-
'selectors' => array(
|
1435 |
-
'{{WRAPPER}} .premium-modal-trigger-btn:hover i' => 'color: {{VALUE}}',
|
1436 |
-
'{{WRAPPER}} .premium-modal-trigger-btn:hover svg, {{WRAPPER}} .premium-modal-trigger-btn:hover svg *' => 'fill: {{VALUE}};',
|
1437 |
-
),
|
1438 |
-
'condition' => array(
|
1439 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
1440 |
-
'premium_modal_box_display_on' => 'button',
|
1441 |
-
),
|
1442 |
-
)
|
1443 |
-
);
|
1444 |
-
|
1445 |
-
if ( $draw_icon ) {
|
1446 |
-
$this->add_control(
|
1447 |
-
'stroke_color_hover',
|
1448 |
-
array(
|
1449 |
-
'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
|
1450 |
-
'type' => Controls_Manager::COLOR,
|
1451 |
-
'global' => array(
|
1452 |
-
'default' => Global_Colors::COLOR_ACCENT,
|
1453 |
-
),
|
1454 |
-
'condition' => array(
|
1455 |
-
'premium_modal_box_icon_switcher' => 'yes',
|
1456 |
-
'premium_modal_box_display_on' => 'button',
|
1457 |
-
'icon_type' => array( 'icon', 'svg' ),
|
1458 |
-
),
|
1459 |
-
'selectors' => array(
|
1460 |
-
'{{WRAPPER}} .premium-modal-trigger-btn:hover svg *' => 'stroke: {{VALUE}};',
|
1461 |
-
),
|
1462 |
-
)
|
1463 |
-
);
|
1464 |
-
}
|
1465 |
-
|
1466 |
-
$this->add_control(
|
1467 |
-
'premium_modal_box_selector_hover_background',
|
1468 |
-
array(
|
1469 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1470 |
-
'type' => Controls_Manager::COLOR,
|
1471 |
-
'global' => array(
|
1472 |
-
'default' => Global_Colors::COLOR_TEXT,
|
1473 |
-
),
|
1474 |
-
'selectors' => array(
|
1475 |
-
'{{WRAPPER}} .premium-modal-trigger-btn:hover' => 'background: {{VALUE}};',
|
1476 |
-
),
|
1477 |
-
'condition' => array(
|
1478 |
-
'premium_modal_box_display_on' => 'button',
|
1479 |
-
),
|
1480 |
-
)
|
1481 |
-
);
|
1482 |
-
|
1483 |
-
$this->add_group_control(
|
1484 |
-
Group_Control_Border::get_type(),
|
1485 |
-
array(
|
1486 |
-
'name' => 'selector_border_hover',
|
1487 |
-
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn:hover,
|
1488 |
-
{{WRAPPER}} .premium-modal-trigger-text:hover, {{WRAPPER}} .premium-modal-trigger-img:hover',
|
1489 |
-
'condition' => array(
|
1490 |
-
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1491 |
-
),
|
1492 |
-
)
|
1493 |
-
);
|
1494 |
-
|
1495 |
-
$this->add_control(
|
1496 |
-
'premium_modal_box_selector_border_radius_hover',
|
1497 |
-
array(
|
1498 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1499 |
-
'type' => Controls_Manager::SLIDER,
|
1500 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1501 |
-
'selectors' => array(
|
1502 |
-
'{{WRAPPER}} .premium-modal-trigger-btn:hover,{{WRAPPER}} .premium-modal-trigger-text:hover, {{WRAPPER}} .premium-modal-trigger-img:hover' => 'border-radius:{{SIZE}}{{UNIT}};',
|
1503 |
-
),
|
1504 |
-
'condition' => array(
|
1505 |
-
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1506 |
-
),
|
1507 |
-
)
|
1508 |
-
);
|
1509 |
-
|
1510 |
-
$this->add_group_control(
|
1511 |
-
Group_Control_Box_Shadow::get_type(),
|
1512 |
-
array(
|
1513 |
-
'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
|
1514 |
-
'name' => 'premium_modal_box_selector_box_shadow_hover',
|
1515 |
-
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn:hover, {{WRAPPER}} .premium-modal-trigger-text:hover, {{WRAPPER}} .premium-modal-trigger-img:hover',
|
1516 |
-
'condition' => array(
|
1517 |
-
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1518 |
-
),
|
1519 |
-
)
|
1520 |
-
);
|
1521 |
-
|
1522 |
-
$this->end_controls_tab();
|
1523 |
-
|
1524 |
-
$this->end_controls_tabs();
|
1525 |
-
|
1526 |
-
$this->add_responsive_control(
|
1527 |
-
'premium_modal_box_selector_padding',
|
1528 |
-
array(
|
1529 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
1530 |
-
'type' => Controls_Manager::DIMENSIONS,
|
1531 |
-
'size_units' => array( 'px', 'em', '%' ),
|
1532 |
-
'separator' => 'before',
|
1533 |
-
'selectors' => array(
|
1534 |
-
'{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
1535 |
-
),
|
1536 |
-
'condition' => array(
|
1537 |
-
'premium_modal_box_display_on' => array( 'button', 'text' ),
|
1538 |
-
),
|
1539 |
-
)
|
1540 |
-
);
|
1541 |
-
|
1542 |
-
$this->end_controls_section();
|
1543 |
-
|
1544 |
-
$this->start_controls_section(
|
1545 |
-
'premium_modal_box_header_settings',
|
1546 |
-
array(
|
1547 |
-
'label' => __( 'Header', 'premium-addons-for-elementor' ),
|
1548 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
1549 |
-
'condition' => array(
|
1550 |
-
'premium_modal_box_header_switcher' => 'yes',
|
1551 |
-
),
|
1552 |
-
)
|
1553 |
-
);
|
1554 |
-
|
1555 |
-
$this->add_control(
|
1556 |
-
'premium_modal_box_header_text_color',
|
1557 |
-
array(
|
1558 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1559 |
-
'type' => Controls_Manager::COLOR,
|
1560 |
-
'selectors' => array(
|
1561 |
-
'{{WRAPPER}} .premium-modal-box-modal-title' => 'color: {{VALUE}}',
|
1562 |
-
'{{WRAPPER}} .premium-modal-box-modal-title svg' => 'fill: {{VALUE}}',
|
1563 |
-
),
|
1564 |
-
)
|
1565 |
-
);
|
1566 |
-
|
1567 |
-
$this->add_group_control(
|
1568 |
-
Group_Control_Typography::get_type(),
|
1569 |
-
array(
|
1570 |
-
'name' => 'headertext',
|
1571 |
-
'global' => array(
|
1572 |
-
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
|
1573 |
-
),
|
1574 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-title',
|
1575 |
-
)
|
1576 |
-
);
|
1577 |
-
|
1578 |
-
$this->add_control(
|
1579 |
-
'premium_modal_box_header_background',
|
1580 |
-
array(
|
1581 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1582 |
-
'type' => Controls_Manager::COLOR,
|
1583 |
-
'selectors' => array(
|
1584 |
-
'{{WRAPPER}} .premium-modal-box-modal-header' => 'background: {{VALUE}};',
|
1585 |
-
),
|
1586 |
-
)
|
1587 |
-
);
|
1588 |
-
|
1589 |
-
$this->add_group_control(
|
1590 |
-
Group_Control_Border::get_type(),
|
1591 |
-
array(
|
1592 |
-
'name' => 'premium_modal_header_border',
|
1593 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-header',
|
1594 |
-
)
|
1595 |
-
);
|
1596 |
-
|
1597 |
-
$this->end_controls_section();
|
1598 |
-
|
1599 |
-
$this->start_controls_section(
|
1600 |
-
'premium_modal_box_upper_close_button_section',
|
1601 |
-
array(
|
1602 |
-
'label' => __( 'Upper Close Button', 'premium-addons-for-elementor' ),
|
1603 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
1604 |
-
'condition' => array(
|
1605 |
-
'premium_modal_box_upper_close' => 'yes',
|
1606 |
-
'premium_modal_box_header_switcher' => 'yes',
|
1607 |
-
),
|
1608 |
-
)
|
1609 |
-
);
|
1610 |
-
|
1611 |
-
$this->add_responsive_control(
|
1612 |
-
'premium_modal_box_upper_close_button_size',
|
1613 |
-
array(
|
1614 |
-
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
1615 |
-
'type' => Controls_Manager::SLIDER,
|
1616 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1617 |
-
'selectors' => array(
|
1618 |
-
'{{WRAPPER}} .premium-modal-box-modal-header button' => 'font-size: {{SIZE}}{{UNIT}};',
|
1619 |
-
),
|
1620 |
-
)
|
1621 |
-
);
|
1622 |
-
|
1623 |
-
$this->start_controls_tabs( 'premium_modal_box_upper_close_button_style' );
|
1624 |
-
|
1625 |
-
$this->start_controls_tab(
|
1626 |
-
'premium_modal_box_upper_close_button_normal',
|
1627 |
-
array(
|
1628 |
-
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
1629 |
-
)
|
1630 |
-
);
|
1631 |
-
|
1632 |
-
$this->add_control(
|
1633 |
-
'premium_modal_box_upper_close_button_normal_color',
|
1634 |
-
array(
|
1635 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1636 |
-
'type' => Controls_Manager::COLOR,
|
1637 |
-
'selectors' => array(
|
1638 |
-
'{{WRAPPER}} .premium-modal-box-modal-close' => 'color: {{VALUE}};',
|
1639 |
-
),
|
1640 |
-
)
|
1641 |
-
);
|
1642 |
-
|
1643 |
-
$this->add_control(
|
1644 |
-
'premium_modal_box_upper_close_button_background_color',
|
1645 |
-
array(
|
1646 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1647 |
-
'type' => Controls_Manager::COLOR,
|
1648 |
-
'selectors' => array(
|
1649 |
-
'{{WRAPPER}} .premium-modal-box-modal-close' => 'background:{{VALUE}};',
|
1650 |
-
),
|
1651 |
-
)
|
1652 |
-
);
|
1653 |
-
|
1654 |
-
$this->add_group_control(
|
1655 |
-
Group_Control_Border::get_type(),
|
1656 |
-
array(
|
1657 |
-
'name' => 'premium_modal_upper_border',
|
1658 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-close',
|
1659 |
-
)
|
1660 |
-
);
|
1661 |
-
|
1662 |
-
$this->add_control(
|
1663 |
-
'premium_modal_upper_border_radius',
|
1664 |
-
array(
|
1665 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1666 |
-
'type' => Controls_Manager::SLIDER,
|
1667 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1668 |
-
'selectors' => array(
|
1669 |
-
'{{WRAPPER}} .premium-modal-box-modal-close' => 'border-radius:{{SIZE}}{{UNIT}};',
|
1670 |
-
),
|
1671 |
-
'separator' => 'after',
|
1672 |
-
)
|
1673 |
-
);
|
1674 |
-
|
1675 |
-
$this->end_controls_tab();
|
1676 |
-
|
1677 |
-
$this->start_controls_tab(
|
1678 |
-
'premium_modal_box_upper_close_button_hover',
|
1679 |
-
array(
|
1680 |
-
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1681 |
-
)
|
1682 |
-
);
|
1683 |
-
|
1684 |
-
$this->add_control(
|
1685 |
-
'premium_modal_box_upper_close_button_hover_color',
|
1686 |
-
array(
|
1687 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1688 |
-
'type' => Controls_Manager::COLOR,
|
1689 |
-
'selectors' => array(
|
1690 |
-
'{{WRAPPER}} .premium-modal-box-modal-close:hover' => 'color: {{VALUE}};',
|
1691 |
-
),
|
1692 |
-
)
|
1693 |
-
);
|
1694 |
-
|
1695 |
-
$this->add_control(
|
1696 |
-
'premium_modal_box_upper_close_button_background_color_hover',
|
1697 |
-
array(
|
1698 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1699 |
-
'type' => Controls_Manager::COLOR,
|
1700 |
-
'selectors' => array(
|
1701 |
-
'{{WRAPPER}} .premium-modal-box-modal-close:hover' => 'background:{{VALUE}};',
|
1702 |
-
),
|
1703 |
-
)
|
1704 |
-
);
|
1705 |
-
|
1706 |
-
$this->add_group_control(
|
1707 |
-
Group_Control_Border::get_type(),
|
1708 |
-
array(
|
1709 |
-
'name' => 'premium_modal_upper_border_hover',
|
1710 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-close:hover',
|
1711 |
-
)
|
1712 |
-
);
|
1713 |
-
|
1714 |
-
$this->add_control(
|
1715 |
-
'premium_modal_upper_border_radius_hover',
|
1716 |
-
array(
|
1717 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1718 |
-
'type' => Controls_Manager::SLIDER,
|
1719 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1720 |
-
'selectors' => array(
|
1721 |
-
'{{WRAPPER}} .premium-modal-box-modal-close:hover' => 'border-radius:{{SIZE}}{{UNIT}};',
|
1722 |
-
),
|
1723 |
-
'separator' => 'after',
|
1724 |
-
)
|
1725 |
-
);
|
1726 |
-
|
1727 |
-
$this->end_controls_tab();
|
1728 |
-
|
1729 |
-
$this->end_controls_tabs();
|
1730 |
-
|
1731 |
-
$this->add_responsive_control(
|
1732 |
-
'premium_modal_box_upper_close_button_padding',
|
1733 |
-
array(
|
1734 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
1735 |
-
'type' => Controls_Manager::DIMENSIONS,
|
1736 |
-
'size_units' => array( 'px', 'em', '%' ),
|
1737 |
-
'selectors' => array(
|
1738 |
-
'{{WRAPPER}} .premium-modal-box-modal-close' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
1739 |
-
),
|
1740 |
-
)
|
1741 |
-
);
|
1742 |
-
|
1743 |
-
$this->end_controls_section();
|
1744 |
-
|
1745 |
-
$this->start_controls_section(
|
1746 |
-
'premium_modal_box_lower_close_button_section',
|
1747 |
-
array(
|
1748 |
-
'label' => __( 'Lower Close Button', 'premium-addons-for-elementor' ),
|
1749 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
1750 |
-
'condition' => array(
|
1751 |
-
'premium_modal_box_lower_close' => 'yes',
|
1752 |
-
),
|
1753 |
-
)
|
1754 |
-
);
|
1755 |
-
|
1756 |
-
$this->add_group_control(
|
1757 |
-
Group_Control_Typography::get_type(),
|
1758 |
-
array(
|
1759 |
-
'name' => 'lowerclose',
|
1760 |
-
'global' => array(
|
1761 |
-
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
|
1762 |
-
),
|
1763 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-lower-close',
|
1764 |
-
)
|
1765 |
-
);
|
1766 |
-
|
1767 |
-
$this->add_responsive_control(
|
1768 |
-
'premium_modal_box_lower_close_button_width',
|
1769 |
-
array(
|
1770 |
-
'label' => __( 'Width', 'premium-addons-for-elementor' ),
|
1771 |
-
'type' => Controls_Manager::SLIDER,
|
1772 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1773 |
-
'range' => array(
|
1774 |
-
'px' => array(
|
1775 |
-
'min' => 1,
|
1776 |
-
'max' => 500,
|
1777 |
-
),
|
1778 |
-
'em' => array(
|
1779 |
-
'min' => 1,
|
1780 |
-
'max' => 30,
|
1781 |
-
),
|
1782 |
-
),
|
1783 |
-
'selectors' => array(
|
1784 |
-
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'min-width: {{SIZE}}{{UNIT}};',
|
1785 |
-
),
|
1786 |
-
)
|
1787 |
-
);
|
1788 |
-
|
1789 |
-
$this->start_controls_tabs( 'premium_modal_box_lower_close_button_style' );
|
1790 |
-
|
1791 |
-
$this->start_controls_tab(
|
1792 |
-
'premium_modal_box_lower_close_button_normal',
|
1793 |
-
array(
|
1794 |
-
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
1795 |
-
)
|
1796 |
-
);
|
1797 |
-
|
1798 |
-
$this->add_control(
|
1799 |
-
'premium_modal_box_lower_close_button_normal_color',
|
1800 |
-
array(
|
1801 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1802 |
-
'type' => Controls_Manager::COLOR,
|
1803 |
-
'global' => array(
|
1804 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
1805 |
-
),
|
1806 |
-
'selectors' => array(
|
1807 |
-
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'color: {{VALUE}};',
|
1808 |
-
),
|
1809 |
-
)
|
1810 |
-
);
|
1811 |
-
|
1812 |
-
$this->add_control(
|
1813 |
-
'premium_modal_box_lower_close_button_background_normal_color',
|
1814 |
-
array(
|
1815 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1816 |
-
'type' => Controls_Manager::COLOR,
|
1817 |
-
'global' => array(
|
1818 |
-
'default' => Global_Colors::COLOR_PRIMARY,
|
1819 |
-
),
|
1820 |
-
'selectors' => array(
|
1821 |
-
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'background-color: {{VALUE}};',
|
1822 |
-
),
|
1823 |
-
)
|
1824 |
-
);
|
1825 |
-
|
1826 |
-
$this->add_group_control(
|
1827 |
-
Group_Control_Border::get_type(),
|
1828 |
-
array(
|
1829 |
-
'name' => 'premium_modal_box_lower_close_border',
|
1830 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-lower-close',
|
1831 |
-
)
|
1832 |
-
);
|
1833 |
-
|
1834 |
-
$this->add_control(
|
1835 |
-
'premium_modal_box_lower_close_border_radius',
|
1836 |
-
array(
|
1837 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1838 |
-
'type' => Controls_Manager::SLIDER,
|
1839 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1840 |
-
'selectors' => array(
|
1841 |
-
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'border-radius: {{SIZE}}{{UNIT}};',
|
1842 |
-
),
|
1843 |
-
'separator' => 'after',
|
1844 |
-
)
|
1845 |
-
);
|
1846 |
-
|
1847 |
-
$this->end_controls_tab();
|
1848 |
-
|
1849 |
-
$this->start_controls_tab(
|
1850 |
-
'premium_modal_box_lower_close_button_hover',
|
1851 |
-
array(
|
1852 |
-
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1853 |
-
)
|
1854 |
-
);
|
1855 |
-
|
1856 |
-
$this->add_control(
|
1857 |
-
'premium_modal_box_lower_close_button_hover_color',
|
1858 |
-
array(
|
1859 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1860 |
-
'type' => Controls_Manager::COLOR,
|
1861 |
-
'global' => array(
|
1862 |
-
'default' => Global_Colors::COLOR_PRIMARY,
|
1863 |
-
),
|
1864 |
-
'selectors' => array(
|
1865 |
-
'{{WRAPPER}} .premium-modal-box-modal-lower-close:hover' => 'color: {{VALUE}};',
|
1866 |
-
),
|
1867 |
-
)
|
1868 |
-
);
|
1869 |
-
|
1870 |
-
$this->add_control(
|
1871 |
-
'premium_modal_box_lower_close_button_background_hover_color',
|
1872 |
-
array(
|
1873 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1874 |
-
'type' => Controls_Manager::COLOR,
|
1875 |
-
'global' => array(
|
1876 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
1877 |
-
),
|
1878 |
-
'selectors' => array(
|
1879 |
-
'{{WRAPPER}} .premium-modal-box-modal-lower-close:hover' => 'background-color: {{VALUE}};',
|
1880 |
-
),
|
1881 |
-
)
|
1882 |
-
);
|
1883 |
-
|
1884 |
-
$this->add_group_control(
|
1885 |
-
Group_Control_Border::get_type(),
|
1886 |
-
array(
|
1887 |
-
'name' => 'premium_modal_box_lower_close_border_hover',
|
1888 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-lower-close:hover',
|
1889 |
-
)
|
1890 |
-
);
|
1891 |
-
|
1892 |
-
$this->add_control(
|
1893 |
-
'premium_modal_box_lower_close_border_radius_hover',
|
1894 |
-
array(
|
1895 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1896 |
-
'type' => Controls_Manager::SLIDER,
|
1897 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1898 |
-
'selectors' => array(
|
1899 |
-
'{{WRAPPER}} .premium-modal-box-modal-lower-close:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
|
1900 |
-
),
|
1901 |
-
'separator' => 'after',
|
1902 |
-
)
|
1903 |
-
);
|
1904 |
-
|
1905 |
-
$this->end_controls_tab();
|
1906 |
-
|
1907 |
-
$this->end_controls_tabs();
|
1908 |
-
|
1909 |
-
$this->add_responsive_control(
|
1910 |
-
'premium_modal_box_lower_close_button_padding',
|
1911 |
-
array(
|
1912 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
1913 |
-
'type' => Controls_Manager::DIMENSIONS,
|
1914 |
-
'size_units' => array( 'px', 'em', '%' ),
|
1915 |
-
'selectors' => array(
|
1916 |
-
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
1917 |
-
),
|
1918 |
-
)
|
1919 |
-
);
|
1920 |
-
|
1921 |
-
$this->end_controls_section();
|
1922 |
-
|
1923 |
-
$this->start_controls_section(
|
1924 |
-
'premium_modal_box_style',
|
1925 |
-
array(
|
1926 |
-
'label' => __( 'Modal Box', 'premium-addons-for-elementor' ),
|
1927 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
1928 |
-
)
|
1929 |
-
);
|
1930 |
-
|
1931 |
-
$this->add_control(
|
1932 |
-
'text_content_color',
|
1933 |
-
array(
|
1934 |
-
'label' => __( 'Text Color', 'premium-addons-for-elementor' ),
|
1935 |
-
'type' => Controls_Manager::COLOR,
|
1936 |
-
'selectors' => array(
|
1937 |
-
'{{WRAPPER}} .premium-modal-box-modal-body' => 'color: {{VALUE}}',
|
1938 |
-
),
|
1939 |
-
'condition' => array(
|
1940 |
-
'premium_modal_box_content_type' => 'editor',
|
1941 |
-
),
|
1942 |
-
)
|
1943 |
-
);
|
1944 |
-
|
1945 |
-
$this->add_group_control(
|
1946 |
-
Group_Control_Typography::get_type(),
|
1947 |
-
array(
|
1948 |
-
'name' => 'content_typography',
|
1949 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-body',
|
1950 |
-
'condition' => array(
|
1951 |
-
'premium_modal_box_content_type' => 'editor',
|
1952 |
-
),
|
1953 |
-
)
|
1954 |
-
);
|
1955 |
-
|
1956 |
-
$this->add_control(
|
1957 |
-
'premium_modal_box_content_background',
|
1958 |
-
array(
|
1959 |
-
'label' => __( 'Content Background Color', 'premium-addons-for-elementor' ),
|
1960 |
-
'type' => Controls_Manager::COLOR,
|
1961 |
-
'selectors' => array(
|
1962 |
-
'{{WRAPPER}} .premium-modal-box-modal-body' => 'background: {{VALUE}};',
|
1963 |
-
),
|
1964 |
-
)
|
1965 |
-
);
|
1966 |
-
|
1967 |
-
$this->add_responsive_control(
|
1968 |
-
'premium_modal_box_modal_size',
|
1969 |
-
array(
|
1970 |
-
'label' => __( 'Width', 'premium-addons-for-elementor' ),
|
1971 |
-
'type' => Controls_Manager::SLIDER,
|
1972 |
-
'size_units' => array( 'px', '%', 'em' ),
|
1973 |
-
'range' => array(
|
1974 |
-
'px' => array(
|
1975 |
-
'min' => 50,
|
1976 |
-
'max' => 1500,
|
1977 |
-
),
|
1978 |
-
'em' => array(
|
1979 |
-
'min' => 1,
|
1980 |
-
'max' => 50,
|
1981 |
-
),
|
1982 |
-
),
|
1983 |
-
'separator' => 'before',
|
1984 |
-
'label_block' => true,
|
1985 |
-
'selectors' => array(
|
1986 |
-
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'width: {{SIZE}}{{UNIT}};',
|
1987 |
-
),
|
1988 |
-
)
|
1989 |
-
);
|
1990 |
-
|
1991 |
-
$this->add_responsive_control(
|
1992 |
-
'premium_modal_box_modal_max_height',
|
1993 |
-
array(
|
1994 |
-
'label' => __( 'Max Height', 'premium-addons-for-elementor' ),
|
1995 |
-
'type' => Controls_Manager::SLIDER,
|
1996 |
-
'size_units' => array( 'px', 'em' ),
|
1997 |
-
'range' => array(
|
1998 |
-
'px' => array(
|
1999 |
-
'min' => 50,
|
2000 |
-
'max' => 1500,
|
2001 |
-
),
|
2002 |
-
'em' => array(
|
2003 |
-
'min' => 1,
|
2004 |
-
'max' => 50,
|
2005 |
-
),
|
2006 |
-
),
|
2007 |
-
'label_block' => true,
|
2008 |
-
'selectors' => array(
|
2009 |
-
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'max-height: {{SIZE}}{{UNIT}};',
|
2010 |
-
),
|
2011 |
-
)
|
2012 |
-
);
|
2013 |
-
|
2014 |
-
$this->add_responsive_control(
|
2015 |
-
'content_overflow',
|
2016 |
-
array(
|
2017 |
-
'label' => __( 'Overflow', 'premium-addons-for-elementor' ),
|
2018 |
-
'type' => Controls_Manager::SELECT,
|
2019 |
-
'options' => array(
|
2020 |
-
'auto' => __( 'Auto', 'premium-addons-for-elementor' ),
|
2021 |
-
'visible' => __( 'Visible', 'premium-addons-for-elementor' ),
|
2022 |
-
'hidden' => __( 'Hidden', 'premium-addons-for-elementor' ),
|
2023 |
-
'scroll' => __( 'Scroll', 'premium-addons-for-elementor' ),
|
2024 |
-
),
|
2025 |
-
'default' => 'auto',
|
2026 |
-
'selectors' => array(
|
2027 |
-
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'overflow: {{VALUE}}',
|
2028 |
-
),
|
2029 |
-
)
|
2030 |
-
);
|
2031 |
-
|
2032 |
-
$this->add_group_control(
|
2033 |
-
Group_Control_Background::get_type(),
|
2034 |
-
array(
|
2035 |
-
'name' => 'premium_modal_box_modal_background',
|
2036 |
-
'types' => array( 'classic', 'gradient' ),
|
2037 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal',
|
2038 |
-
)
|
2039 |
-
);
|
2040 |
-
|
2041 |
-
$this->add_control(
|
2042 |
-
'premium_modal_box_footer_background',
|
2043 |
-
array(
|
2044 |
-
'label' => __( 'Footer Background Color', 'premium-addons-for-elementor' ),
|
2045 |
-
'type' => Controls_Manager::COLOR,
|
2046 |
-
'selectors' => array(
|
2047 |
-
'{{WRAPPER}} .premium-modal-box-modal-footer' => 'background: {{VALUE}};',
|
2048 |
-
),
|
2049 |
-
)
|
2050 |
-
);
|
2051 |
-
|
2052 |
-
$this->add_group_control(
|
2053 |
-
Group_Control_Border::get_type(),
|
2054 |
-
array(
|
2055 |
-
'name' => 'contentborder',
|
2056 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-dialog',
|
2057 |
-
)
|
2058 |
-
);
|
2059 |
-
|
2060 |
-
$this->add_control(
|
2061 |
-
'premium_modal_box_border_radius',
|
2062 |
-
array(
|
2063 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2064 |
-
'type' => Controls_Manager::SLIDER,
|
2065 |
-
'size_units' => array( 'px', '%', 'em' ),
|
2066 |
-
'selectors' => array(
|
2067 |
-
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'border-radius: {{SIZE}}{{UNIT}};',
|
2068 |
-
),
|
2069 |
-
)
|
2070 |
-
);
|
2071 |
-
|
2072 |
-
$this->add_group_control(
|
2073 |
-
Group_Control_Box_Shadow::get_type(),
|
2074 |
-
array(
|
2075 |
-
'name' => 'premium_modal_box_shadow',
|
2076 |
-
'selector' => '{{WRAPPER}} .premium-modal-box-modal-dialog',
|
2077 |
-
)
|
2078 |
-
);
|
2079 |
-
|
2080 |
-
$this->add_responsive_control(
|
2081 |
-
'premium_modal_box_margin',
|
2082 |
-
array(
|
2083 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2084 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2085 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2086 |
-
'selectors' => array(
|
2087 |
-
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2088 |
-
),
|
2089 |
-
)
|
2090 |
-
);
|
2091 |
-
|
2092 |
-
$this->add_responsive_control(
|
2093 |
-
'premium_modal_box_padding',
|
2094 |
-
array(
|
2095 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2096 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2097 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2098 |
-
'selectors' => array(
|
2099 |
-
'{{WRAPPER}} .premium-modal-box-modal-body' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2100 |
-
),
|
2101 |
-
)
|
2102 |
-
);
|
2103 |
-
|
2104 |
-
$this->end_controls_section();
|
2105 |
-
}
|
2106 |
-
|
2107 |
-
|
2108 |
-
/**
|
2109 |
-
* Render Header Icon
|
2110 |
-
*
|
2111 |
-
* Render HTML markup for modal header icon.
|
2112 |
-
*
|
2113 |
-
* @since 1.0.0
|
2114 |
-
* @access public
|
2115 |
-
*
|
2116 |
-
* @param boolean $new new icon.
|
2117 |
-
* @param boolean $migrate icon migrated.
|
2118 |
-
*/
|
2119 |
-
protected function render_header_icon( $new, $migrate ) {
|
2120 |
-
|
2121 |
-
$settings = $this->get_settings_for_display();
|
2122 |
-
|
2123 |
-
$header_icon = $settings['premium_modal_box_icon_selection'];
|
2124 |
-
|
2125 |
-
if ( 'fonticon' === $header_icon ) {
|
2126 |
-
if ( $new || $migrate ) :
|
2127 |
-
Icons_Manager::render_icon( $settings['premium_modal_box_font_icon_updated'], array( 'aria-hidden' => 'true' ) );
|
2128 |
-
else : ?>
|
2129 |
-
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_icon' ) ); ?>></i>
|
2130 |
-
<?php
|
2131 |
-
endif;
|
2132 |
-
} elseif ( 'image' === $header_icon ) {
|
2133 |
-
?>
|
2134 |
-
<img <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_icon' ) ); ?>>
|
2135 |
-
<?php
|
2136 |
-
} elseif ( 'animation' === $header_icon ) {
|
2137 |
-
$this->add_render_attribute(
|
2138 |
-
'header_lottie',
|
2139 |
-
array(
|
2140 |
-
'class' => array(
|
2141 |
-
'premium-modal-header-lottie',
|
2142 |
-
'premium-lottie-animation',
|
2143 |
-
),
|
2144 |
-
'data-lottie-url' => $settings['header_lottie_url'],
|
2145 |
-
'data-lottie-loop' => $settings['header_lottie_loop'],
|
2146 |
-
'data-lottie-reverse' => $settings['header_lottie_reverse'],
|
2147 |
-
)
|
2148 |
-
);
|
2149 |
-
?>
|
2150 |
-
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'header_lottie' ) ); ?>></div>
|
2151 |
-
<?php
|
2152 |
-
}
|
2153 |
-
}
|
2154 |
-
|
2155 |
-
/**
|
2156 |
-
* Render Modal Box widget output on the frontend.
|
2157 |
-
*
|
2158 |
-
* Written in PHP and used to generate the final HTML.
|
2159 |
-
*
|
2160 |
-
* @since 1.0.0
|
2161 |
-
* @access protected
|
2162 |
-
*/
|
2163 |
-
protected function render() {
|
2164 |
-
|
2165 |
-
$settings = $this->get_settings_for_display();
|
2166 |
-
|
2167 |
-
$trigger = $settings['premium_modal_box_display_on'];
|
2168 |
-
|
2169 |
-
$this->add_inline_editing_attributes( 'premium_modal_box_selector_text' );
|
2170 |
-
|
2171 |
-
$this->add_render_attribute(
|
2172 |
-
'trigger',
|
2173 |
-
array(
|
2174 |
-
'data-toggle' => 'premium-modal',
|
2175 |
-
'data-target' => '#premium-modal-' . $this->get_id(),
|
2176 |
-
)
|
2177 |
-
);
|
2178 |
-
|
2179 |
-
if ( 'button' === $trigger ) {
|
2180 |
-
|
2181 |
-
$icon_type = $settings['icon_type'];
|
2182 |
-
|
2183 |
-
if ( 'icon' === $icon_type ) {
|
2184 |
-
|
2185 |
-
if ( ! empty( $settings['premium_modal_box_button_icon_selection'] ) ) {
|
2186 |
-
$this->add_render_attribute(
|
2187 |
-
'icon',
|
2188 |
-
array(
|
2189 |
-
'class' => $settings['premium_modal_box_button_icon_selection'],
|
2190 |
-
'aria-hidden' => 'true',
|
2191 |
-
)
|
2192 |
-
);
|
2193 |
-
}
|
2194 |
-
|
2195 |
-
$migrated = isset( $settings['__fa4_migrated']['premium_modal_box_button_icon_selection_updated'] );
|
2196 |
-
$is_new = empty( $settings['premium_modal_box_button_icon_selection'] ) && Icons_Manager::is_migration_allowed();
|
2197 |
-
|
2198 |
-
}
|
2199 |
-
|
2200 |
-
if ( 'yes' === $settings['draw_svg'] ) {
|
2201 |
-
|
2202 |
-
$this->add_render_attribute(
|
2203 |
-
'modal',
|
2204 |
-
'class',
|
2205 |
-
array(
|
2206 |
-
'elementor-invisible',
|
2207 |
-
'premium-drawer-hover',
|
2208 |
-
)
|
2209 |
-
);
|
2210 |
-
|
2211 |
-
if ( 'icon' === $icon_type ) {
|
2212 |
-
|
2213 |
-
$this->add_render_attribute( 'icon', 'class', $settings['premium_modal_box_button_icon_selection_updated']['value'] );
|
2214 |
-
|
2215 |
-
}
|
2216 |
-
|
2217 |
-
$this->add_render_attribute(
|
2218 |
-
'icon',
|
2219 |
-
array(
|
2220 |
-
'class' => 'premium-svg-drawer',
|
2221 |
-
'data-svg-reverse' => $settings['svg_reverse'],
|
2222 |
-
'data-svg-loop' => $settings['svg_loop'],
|
2223 |
-
'data-svg-sync' => $settings['svg_sync'],
|
2224 |
-
'data-svg-hover' => $settings['svg_hover'],
|
2225 |
-
'data-svg-fill' => $settings['svg_color'],
|
2226 |
-
'data-svg-frames' => $settings['frames'],
|
2227 |
-
'data-svg-yoyo' => $settings['svg_yoyo'],
|
2228 |
-
'data-svg-point' => $settings['svg_reverse'] ? $settings['end_point']['size'] : $settings['start_point']['size'],
|
2229 |
-
)
|
2230 |
-
);
|
2231 |
-
|
2232 |
-
} else {
|
2233 |
-
$this->add_render_attribute( 'icon', 'class', 'premium-svg-nodraw' );
|
2234 |
-
}
|
2235 |
-
|
2236 |
-
$this->add_render_attribute(
|
2237 |
-
'trigger',
|
2238 |
-
array(
|
2239 |
-
'type' => 'button',
|
2240 |
-
'class' => array(
|
2241 |
-
'premium-modal-trigger-btn',
|
2242 |
-
'premium-btn-' . $settings['premium_modal_box_button_size'],
|
2243 |
-
),
|
2244 |
-
)
|
2245 |
-
);
|
2246 |
-
|
2247 |
-
} elseif ( 'image' === $trigger ) {
|
2248 |
-
|
2249 |
-
$alt = Control_Media::get_image_alt( $settings['premium_modal_box_image_src'] );
|
2250 |
-
|
2251 |
-
$this->add_render_attribute(
|
2252 |
-
'trigger',
|
2253 |
-
array(
|
2254 |
-
'class' => 'premium-modal-trigger-img',
|
2255 |
-
'src' => $settings['premium_modal_box_image_src']['url'],
|
2256 |
-
'alt' => $alt,
|
2257 |
-
)
|
2258 |
-
);
|
2259 |
-
|
2260 |
-
} elseif ( 'text' === $trigger ) {
|
2261 |
-
$this->add_render_attribute( 'trigger', 'class', 'premium-modal-trigger-text' );
|
2262 |
-
} elseif ( 'animation' === $trigger ) {
|
2263 |
-
|
2264 |
-
$this->add_render_attribute(
|
2265 |
-
'trigger',
|
2266 |
-
array(
|
2267 |
-
'class' => array(
|
2268 |
-
'premium-modal-trigger-animation',
|
2269 |
-
'premium-lottie-animation',
|
2270 |
-
),
|
2271 |
-
'data-lottie-url' => $settings['lottie_url'],
|
2272 |
-
'data-lottie-loop' => $settings['lottie_loop'],
|
2273 |
-
'data-lottie-reverse' => $settings['lottie_reverse'],
|
2274 |
-
'data-lottie-hover' => $settings['lottie_hover'],
|
2275 |
-
)
|
2276 |
-
);
|
2277 |
-
|
2278 |
-
}
|
2279 |
-
|
2280 |
-
if ( 'template' === $settings['premium_modal_box_content_type'] ) {
|
2281 |
-
$template = empty( $settings['premium_modal_box_content_temp'] ) ? $settings['live_temp_content'] : $settings['premium_modal_box_content_temp'];
|
2282 |
-
}
|
2283 |
-
|
2284 |
-
if ( 'yes' === $settings['premium_modal_box_header_switcher'] ) {
|
2285 |
-
|
2286 |
-
$header_icon = $settings['premium_modal_box_icon_selection'];
|
2287 |
-
|
2288 |
-
$header_migrated = false;
|
2289 |
-
$header_new = false;
|
2290 |
-
|
2291 |
-
if ( 'fonticon' === $header_icon ) {
|
2292 |
-
|
2293 |
-
if ( ! empty( $settings['premium_modal_box_font_icon'] ) ) {
|
2294 |
-
$this->add_render_attribute(
|
2295 |
-
'title_icon',
|
2296 |
-
array(
|
2297 |
-
'class' => $settings['premium_modal_box_font_icon'],
|
2298 |
-
'aria-hidden' => 'true',
|
2299 |
-
)
|
2300 |
-
);
|
2301 |
-
}
|
2302 |
-
|
2303 |
-
$header_migrated = isset( $settings['__fa4_migrated']['premium_modal_box_font_icon_updated'] );
|
2304 |
-
$header_new = empty( $settings['premium_modal_box_font_icon'] ) && Icons_Manager::is_migration_allowed();
|
2305 |
-
} elseif ( 'image' === $header_icon ) {
|
2306 |
-
|
2307 |
-
$alt = Control_Media::get_image_alt( $settings['premium_modal_box_image_icon'] );
|
2308 |
-
|
2309 |
-
$this->add_render_attribute(
|
2310 |
-
'title_icon',
|
2311 |
-
array(
|
2312 |
-
'src' => $settings['premium_modal_box_image_icon']['url'],
|
2313 |
-
'alt' => $alt,
|
2314 |
-
)
|
2315 |
-
);
|
2316 |
-
|
2317 |
-
}
|
2318 |
-
}
|
2319 |
-
|
2320 |
-
$modal_settings = array(
|
2321 |
-
'trigger' => $trigger,
|
2322 |
-
);
|
2323 |
-
|
2324 |
-
if ( 'pageload' === $trigger ) {
|
2325 |
-
$modal_settings['delay'] = $settings['premium_modal_box_popup_delay'];
|
2326 |
-
}
|
2327 |
-
|
2328 |
-
$this->add_render_attribute(
|
2329 |
-
'modal',
|
2330 |
-
array(
|
2331 |
-
'class' => 'premium-modal-box-container',
|
2332 |
-
'data-settings' => wp_json_encode( $modal_settings ),
|
2333 |
-
)
|
2334 |
-
);
|
2335 |
-
|
2336 |
-
$animation_class = $settings['premium_modal_box_animation'];
|
2337 |
-
if ( '' !== $settings['premium_modal_box_animation_duration'] ) {
|
2338 |
-
$animation_dur = 'animated-' . $settings['premium_modal_box_animation_duration'];
|
2339 |
-
} else {
|
2340 |
-
$animation_dur = 'animated-';
|
2341 |
-
}
|
2342 |
-
|
2343 |
-
$this->add_render_attribute(
|
2344 |
-
'dialog',
|
2345 |
-
array(
|
2346 |
-
'class' => 'premium-modal-box-modal-dialog',
|
2347 |
-
'data-delay-animation' => $settings['premium_modal_box_animation_delay'],
|
2348 |
-
'data-modal-animation' => array(
|
2349 |
-
$animation_class,
|
2350 |
-
$animation_dur,
|
2351 |
-
),
|
2352 |
-
)
|
2353 |
-
);
|
2354 |
-
|
2355 |
-
?>
|
2356 |
-
|
2357 |
-
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'modal' ) ); ?>>
|
2358 |
-
<div class="premium-modal-trigger-container">
|
2359 |
-
<?php
|
2360 |
-
if ( 'button' === $trigger ) :
|
2361 |
-
?>
|
2362 |
-
<button <?php echo wp_kses_post( $this->get_render_attribute_string( 'trigger' ) ); ?>>
|
2363 |
-
<?php
|
2364 |
-
if ( 'yes' === $settings['premium_modal_box_icon_switcher'] && 'before' === $settings['premium_modal_box_icon_position'] ) :
|
2365 |
-
if ( 'icon' === $icon_type ) :
|
2366 |
-
if ( ( $is_new || $migrated ) && 'yes' !== $settings['draw_svg'] ) :
|
2367 |
-
Icons_Manager::render_icon(
|
2368 |
-
$settings['premium_modal_box_button_icon_selection_updated'],
|
2369 |
-
array(
|
2370 |
-
'class' => 'premium-svg-nodraw',
|
2371 |
-
'aria-hidden' => 'true',
|
2372 |
-
)
|
2373 |
-
);
|
2374 |
-
else :
|
2375 |
-
?>
|
2376 |
-
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>></i>
|
2377 |
-
<?php
|
2378 |
-
endif;
|
2379 |
-
else :
|
2380 |
-
?>
|
2381 |
-
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>>
|
2382 |
-
<?php $this->print_unescaped_setting( 'custom_svg' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
2383 |
-
</div>
|
2384 |
-
<?php
|
2385 |
-
endif;
|
2386 |
-
endif;
|
2387 |
-
?>
|
2388 |
-
<span><?php echo wp_kses_post( $settings['premium_modal_box_button_text'] ); ?></span>
|
2389 |
-
<?php
|
2390 |
-
if ( 'yes' === $settings['premium_modal_box_icon_switcher'] && 'after' === $settings['premium_modal_box_icon_position'] ) :
|
2391 |
-
if ( 'icon' === $icon_type ) :
|
2392 |
-
if ( ( $is_new || $migrated ) && 'yes' !== $settings['draw_svg'] ) :
|
2393 |
-
Icons_Manager::render_icon(
|
2394 |
-
$settings['premium_modal_box_button_icon_selection_updated'],
|
2395 |
-
array(
|
2396 |
-
'class' => 'premium-svg-nodraw',
|
2397 |
-
'aria-hidden' => 'true',
|
2398 |
-
)
|
2399 |
-
);
|
2400 |
-
else :
|
2401 |
-
?>
|
2402 |
-
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>></i>
|
2403 |
-
<?php
|
2404 |
-
endif;
|
2405 |
-
else :
|
2406 |
-
?>
|
2407 |
-
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>>
|
2408 |
-
<?php $this->print_unescaped_setting( 'custom_svg' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
2409 |
-
</div>
|
2410 |
-
<?php
|
2411 |
-
endif;
|
2412 |
-
endif;
|
2413 |
-
?>
|
2414 |
-
</button>
|
2415 |
-
<?php elseif ( 'image' === $trigger ) : ?>
|
2416 |
-
<img <?php echo wp_kses_post( $this->get_render_attribute_string( 'trigger' ) ); ?>>
|
2417 |
-
<?php elseif ( 'text' === $trigger ) : ?>
|
2418 |
-
<span <?php echo wp_kses_post( $this->get_render_attribute_string( 'trigger' ) ); ?>>
|
2419 |
-
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_modal_box_selector_text' ) ); ?>>
|
2420 |
-
<?php echo wp_kses_post( $settings['premium_modal_box_selector_text'] ); ?>
|
2421 |
-
</div>
|
2422 |
-
</span>
|
2423 |
-
<?php elseif ( 'animation' === $trigger ) : ?>
|
2424 |
-
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'trigger' ) ); ?>></div>
|
2425 |
-
<?php endif; ?>
|
2426 |
-
</div>
|
2427 |
-
|
2428 |
-
<div id="premium-modal-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-modal-box-modal" role="dialog" style="display: none">
|
2429 |
-
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'dialog' ) ); ?>>
|
2430 |
-
<?php if ( 'yes' === $settings['premium_modal_box_header_switcher'] ) : ?>
|
2431 |
-
<div class="premium-modal-box-modal-header">
|
2432 |
-
<?php if ( ! empty( $settings['premium_modal_box_title'] ) ) : ?>
|
2433 |
-
<h3 class="premium-modal-box-modal-title">
|
2434 |
-
<?php
|
2435 |
-
$this->render_header_icon( $header_new, $header_migrated );
|
2436 |
-
echo wp_kses_post( $settings['premium_modal_box_title'] );
|
2437 |
-
?>
|
2438 |
-
</h3>
|
2439 |
-
<?php endif; ?>
|
2440 |
-
<?php if ( 'yes' === $settings['premium_modal_box_upper_close'] ) : ?>
|
2441 |
-
<div class="premium-modal-box-close-button-container">
|
2442 |
-
<button type="button" class="premium-modal-box-modal-close" data-dismiss="premium-modal">×</button>
|
2443 |
-
</div>
|
2444 |
-
<?php endif; ?>
|
2445 |
-
</div>
|
2446 |
-
<?php endif; ?>
|
2447 |
-
<div class="premium-modal-box-modal-body">
|
2448 |
-
<?php
|
2449 |
-
if ( 'editor' === $settings['premium_modal_box_content_type'] ) :
|
2450 |
-
echo $this->parse_text_editor( $settings['premium_modal_box_content'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
2451 |
-
else :
|
2452 |
-
echo $this->getTemplateInstance()->get_template_content( $template ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
2453 |
-
endif;
|
2454 |
-
?>
|
2455 |
-
</div>
|
2456 |
-
<?php if ( 'yes' === $settings['premium_modal_box_lower_close'] ) : ?>
|
2457 |
-
<div class="premium-modal-box-modal-footer">
|
2458 |
-
<button type="button" class="premium-modal-box-modal-lower-close" data-dismiss="premium-modal">
|
2459 |
-
<?php echo wp_kses_post( $settings['premium_modal_close_text'] ); ?>
|
2460 |
-
</button>
|
2461 |
-
</div>
|
2462 |
-
<?php endif; ?>
|
2463 |
-
</div>
|
2464 |
-
</div>
|
2465 |
-
</div>
|
2466 |
-
|
2467 |
-
<?php
|
2468 |
-
}
|
2469 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Premium Modal Box.
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace PremiumAddons\Widgets;
|
7 |
+
|
8 |
+
// Elementor Classes.
|
9 |
+
use Elementor\Icons_Manager;
|
10 |
+
use Elementor\Widget_Base;
|
11 |
+
use Elementor\Utils;
|
12 |
+
use Elementor\Control_Media;
|
13 |
+
use Elementor\Controls_Manager;
|
14 |
+
use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
|
15 |
+
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
|
16 |
+
use Elementor\Group_Control_Border;
|
17 |
+
use Elementor\Group_Control_Css_Filter;
|
18 |
+
use Elementor\Group_Control_Typography;
|
19 |
+
use Elementor\Group_Control_Text_Shadow;
|
20 |
+
use Elementor\Group_Control_Box_Shadow;
|
21 |
+
use Elementor\Group_Control_Background;
|
22 |
+
|
23 |
+
// PremiumAddons Classes.
|
24 |
+
use PremiumAddons\Admin\Includes\Admin_Helper;
|
25 |
+
use PremiumAddons\Includes\Helper_Functions;
|
26 |
+
use PremiumAddons\Includes\Premium_Template_Tags;
|
27 |
+
|
28 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
29 |
+
exit; // If this file is called directly, abort.
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Class Premium_Modalbox
|
34 |
+
*/
|
35 |
+
class Premium_Modalbox extends Widget_Base {
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Check Icon Draw Option.
|
39 |
+
*
|
40 |
+
* @since 4.9.26
|
41 |
+
* @access public
|
42 |
+
*/
|
43 |
+
public function check_icon_draw() {
|
44 |
+
$is_enabled = Admin_Helper::check_svg_draw( 'premium-modalbox' );
|
45 |
+
return $is_enabled;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Get Elementor Helper Instance.
|
50 |
+
*
|
51 |
+
* @since 1.0.0
|
52 |
+
* @access public
|
53 |
+
*/
|
54 |
+
public function getTemplateInstance() {
|
55 |
+
$this->template_instance = Premium_Template_Tags::getInstance();
|
56 |
+
return $this->template_instance;
|
57 |
+
}
|
58 |
+
|
59 |
+
/**
|
60 |
+
* Retrieve Widget Name.
|
61 |
+
*
|
62 |
+
* @since 1.0.0
|
63 |
+
* @access public
|
64 |
+
*/
|
65 |
+
public function get_name() {
|
66 |
+
return 'premium-addon-modal-box';
|
67 |
+
}
|
68 |
+
|
69 |
+
/**
|
70 |
+
* Check RTL
|
71 |
+
*
|
72 |
+
* @since 1.0.0
|
73 |
+
* @access public
|
74 |
+
*/
|
75 |
+
public function check_rtl() {
|
76 |
+
return is_rtl();
|
77 |
+
}
|
78 |
+
|
79 |
+
/**
|
80 |
+
* Retrieve Widget Title.
|
81 |
+
*
|
82 |
+
* @since 1.0.0
|
83 |
+
* @access public
|
84 |
+
*/
|
85 |
+
public function get_title() {
|
86 |
+
return __( 'Modal Box', 'premium-addons-for-elementor' );
|
87 |
+
}
|
88 |
+
|
89 |
+
/**
|
90 |
+
* Retrieve Widget Icon.
|
91 |
+
*
|
92 |
+
* @since 1.0.0
|
93 |
+
* @access public
|
94 |
+
*
|
95 |
+
* @return string widget icon.
|
96 |
+
*/
|
97 |
+
public function get_icon() {
|
98 |
+
return 'pa-modal-box';
|
99 |
+
}
|
100 |
+
|
101 |
+
/**
|
102 |
+
* Retrieve Widget Dependent CSS.
|
103 |
+
*
|
104 |
+
* @since 1.0.0
|
105 |
+
* @access public
|
106 |
+
*
|
107 |
+
* @return array CSS style handles.
|
108 |
+
*/
|
109 |
+
public function get_style_depends() {
|
110 |
+
return array(
|
111 |
+
'premium-addons',
|
112 |
+
);
|
113 |
+
}
|
114 |
+
|
115 |
+
/**
|
116 |
+
* Retrieve Widget Dependent JS.
|
117 |
+
*
|
118 |
+
* @since 1.0.0
|
119 |
+
* @access public
|
120 |
+
*
|
121 |
+
* @return array JS script handles.
|
122 |
+
*/
|
123 |
+
public function get_script_depends() {
|
124 |
+
|
125 |
+
$draw_scripts = $this->check_icon_draw() ? array(
|
126 |
+
'pa-fontawesome-all',
|
127 |
+
'pa-tweenmax',
|
128 |
+
'pa-motionpath',
|
129 |
+
) : array();
|
130 |
+
|
131 |
+
return array_merge(
|
132 |
+
$draw_scripts,
|
133 |
+
array(
|
134 |
+
'pa-modal',
|
135 |
+
'lottie-js',
|
136 |
+
'premium-addons',
|
137 |
+
)
|
138 |
+
);
|
139 |
+
}
|
140 |
+
|
141 |
+
/**
|
142 |
+
* Retrieve Widget Keywords.
|
143 |
+
*
|
144 |
+
* @since 1.0.0
|
145 |
+
* @access public
|
146 |
+
*
|
147 |
+
* @return string Widget keywords.
|
148 |
+
*/
|
149 |
+
public function get_keywords() {
|
150 |
+
return array( 'pa', 'premium', 'popup', 'lightbox', 'advanced', 'embed' );
|
151 |
+
}
|
152 |
+
|
153 |
+
/**
|
154 |
+
* Retrieve Widget Categories.
|
155 |
+
*
|
156 |
+
* @since 1.5.1
|
157 |
+
* @access public
|
158 |
+
*
|
159 |
+
* @return array Widget categories.
|
160 |
+
*/
|
161 |
+
public function get_categories() {
|
162 |
+
return array( 'premium-elements' );
|
163 |
+
}
|
164 |
+
|
165 |
+
/**
|
166 |
+
* Retrieve Widget Support URL.
|
167 |
+
*
|
168 |
+
* @access public
|
169 |
+
*
|
170 |
+
* @return string support URL.
|
171 |
+
*/
|
172 |
+
public function get_custom_help_url() {
|
173 |
+
return 'https://premiumaddons.com/support/';
|
174 |
+
}
|
175 |
+
|
176 |
+
/**
|
177 |
+
* Register Modal Box controls.
|
178 |
+
*
|
179 |
+
* @since 1.0.0
|
180 |
+
* @access protected
|
181 |
+
*/
|
182 |
+
protected function register_controls() { // phpcs:ignore PSR2.Methods.MethodDeclaration.Underscore
|
183 |
+
|
184 |
+
$draw_icon = $this->check_icon_draw();
|
185 |
+
|
186 |
+
$this->start_controls_section(
|
187 |
+
'premium_modal_box_selector_content_section',
|
188 |
+
array(
|
189 |
+
'label' => __( 'Content', 'premium-addons-for-elementor' ),
|
190 |
+
)
|
191 |
+
);
|
192 |
+
|
193 |
+
$this->add_control(
|
194 |
+
'premium_modal_box_header_switcher',
|
195 |
+
array(
|
196 |
+
'label' => __( 'Header', 'premium-addons-for-elementor' ),
|
197 |
+
'type' => Controls_Manager::SWITCHER,
|
198 |
+
'label_on' => 'show',
|
199 |
+
'label_off' => 'hide',
|
200 |
+
'default' => 'yes',
|
201 |
+
'description' => __( 'Enable or disable modal header', 'premium-addons-for-elementor' ),
|
202 |
+
)
|
203 |
+
);
|
204 |
+
|
205 |
+
$this->add_control(
|
206 |
+
'premium_modal_box_icon_selection',
|
207 |
+
array(
|
208 |
+
'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
|
209 |
+
'type' => Controls_Manager::SELECT,
|
210 |
+
'options' => array(
|
211 |
+
'noicon' => __( 'None', 'premium-addons-for-elementor' ),
|
212 |
+
'fonticon' => __( 'Icon', 'premium-addons-for-elementor' ),
|
213 |
+
'image' => __( 'Custom Image', 'premium-addons-for-elementor' ),
|
214 |
+
'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
|
215 |
+
),
|
216 |
+
'default' => 'noicon',
|
217 |
+
'condition' => array(
|
218 |
+
'premium_modal_box_header_switcher' => 'yes',
|
219 |
+
),
|
220 |
+
'label_block' => true,
|
221 |
+
)
|
222 |
+
);
|
223 |
+
|
224 |
+
$this->add_control(
|
225 |
+
'premium_modal_box_font_icon_updated',
|
226 |
+
array(
|
227 |
+
'label' => __( 'Select Icon', 'premium-addons-for-elementor' ),
|
228 |
+
'type' => Controls_Manager::ICONS,
|
229 |
+
'fa4compatibility' => 'premium_modal_box_font_icon',
|
230 |
+
'condition' => array(
|
231 |
+
'premium_modal_box_icon_selection' => 'fonticon',
|
232 |
+
'premium_modal_box_header_switcher' => 'yes',
|
233 |
+
),
|
234 |
+
'label_block' => true,
|
235 |
+
)
|
236 |
+
);
|
237 |
+
|
238 |
+
$this->add_control(
|
239 |
+
'premium_modal_box_image_icon',
|
240 |
+
array(
|
241 |
+
'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),
|
242 |
+
'type' => Controls_Manager::MEDIA,
|
243 |
+
'dynamic' => array( 'active' => true ),
|
244 |
+
'default' => array(
|
245 |
+
'url' => Utils::get_placeholder_image_src(),
|
246 |
+
),
|
247 |
+
'condition' => array(
|
248 |
+
'premium_modal_box_icon_selection' => 'image',
|
249 |
+
'premium_modal_box_header_switcher' => 'yes',
|
250 |
+
),
|
251 |
+
'label_block' => true,
|
252 |
+
)
|
253 |
+
);
|
254 |
+
|
255 |
+
$this->add_control(
|
256 |
+
'header_lottie_url',
|
257 |
+
array(
|
258 |
+
'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
|
259 |
+
'type' => Controls_Manager::TEXT,
|
260 |
+
'dynamic' => array( 'active' => true ),
|
261 |
+
'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
|
262 |
+
'label_block' => true,
|
263 |
+
'condition' => array(
|
264 |
+
'premium_modal_box_icon_selection' => 'animation',
|
265 |
+
'premium_modal_box_header_switcher' => 'yes',
|
266 |
+
),
|
267 |
+
)
|
268 |
+
);
|
269 |
+
|
270 |
+
$this->add_control(
|
271 |
+
'header_lottie_loop',
|
272 |
+
array(
|
273 |
+
'label' => __( 'Loop', 'premium-addons-for-elementor' ),
|
274 |
+
'type' => Controls_Manager::SWITCHER,
|
275 |
+
'return_value' => 'true',
|
276 |
+
'default' => 'true',
|
277 |
+
'condition' => array(
|
278 |
+
'premium_modal_box_icon_selection' => 'animation',
|
279 |
+
'premium_modal_box_header_switcher' => 'yes',
|
280 |
+
),
|
281 |
+
)
|
282 |
+
);
|
283 |
+
|
284 |
+
$this->add_control(
|
285 |
+
'header_lottie_reverse',
|
286 |
+
array(
|
287 |
+
'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
|
288 |
+
'type' => Controls_Manager::SWITCHER,
|
289 |
+
'return_value' => 'true',
|
290 |
+
'condition' => array(
|
291 |
+
'premium_modal_box_icon_selection' => 'animation',
|
292 |
+
'premium_modal_box_header_switcher' => 'yes',
|
293 |
+
),
|
294 |
+
)
|
295 |
+
);
|
296 |
+
|
297 |
+
$this->add_responsive_control(
|
298 |
+
'premium_modal_box_font_icon_size',
|
299 |
+
array(
|
300 |
+
'label' => __( 'Icon Size', 'premium-addons-for-elementor' ),
|
301 |
+
'type' => Controls_Manager::SLIDER,
|
302 |
+
'size_units' => array( 'px', 'em' ),
|
303 |
+
'selectors' => array(
|
304 |
+
'{{WRAPPER}} .premium-modal-box-modal-title i' => 'font-size: {{SIZE}}{{UNIT}}',
|
305 |
+
'{{WRAPPER}} .premium-modal-box-modal-title img' => 'width: {{SIZE}}{{UNIT}}',
|
306 |
+
'{{WRAPPER}} .premium-modal-box-modal-title svg' => 'width: {{SIZE}}{{UNIT}} !important; height: {{SIZE}}{{UNIT}} !important',
|
307 |
+
),
|
308 |
+
'condition' => array(
|
309 |
+
'premium_modal_box_icon_selection!' => 'noicon',
|
310 |
+
'premium_modal_box_header_switcher' => 'yes',
|
311 |
+
),
|
312 |
+
)
|
313 |
+
);
|
314 |
+
|
315 |
+
$this->add_control(
|
316 |
+
'premium_modal_box_title',
|
317 |
+
array(
|
318 |
+
'label' => __( 'Title', 'premium-addons-for-elementor' ),
|
319 |
+
'type' => Controls_Manager::TEXT,
|
320 |
+
'dynamic' => array( 'active' => true ),
|
321 |
+
'description' => __( 'Add a title for the modal box', 'premium-addons-for-elementor' ),
|
322 |
+
'default' => 'Modal Box Title',
|
323 |
+
'condition' => array(
|
324 |
+
'premium_modal_box_header_switcher' => 'yes',
|
325 |
+
),
|
326 |
+
'label_block' => true,
|
327 |
+
)
|
328 |
+
);
|
329 |
+
|
330 |
+
$this->add_control(
|
331 |
+
'premium_modal_box_content_type',
|
332 |
+
array(
|
333 |
+
'label' => __( 'Content to Show', 'premium-addons-for-elementor' ),
|
334 |
+
'type' => Controls_Manager::SELECT,
|
335 |
+
'options' => array(
|
336 |
+
'editor' => __( 'Text Editor', 'premium-addons-for-elementor' ),
|
337 |
+
'template' => __( 'Elementor Template', 'premium-addons-for-elementor' ),
|
338 |
+
),
|
339 |
+
'default' => 'editor',
|
340 |
+
'separator' => 'before',
|
341 |
+
'label_block' => true,
|
342 |
+
)
|
343 |
+
);
|
344 |
+
|
345 |
+
$this->add_control(
|
346 |
+
'live_temp_content',
|
347 |
+
array(
|
348 |
+
'label' => __( 'Template Title', 'premium-addons-for-elementor' ),
|
349 |
+
'type' => Controls_Manager::TEXT,
|
350 |
+
'classes' => 'premium-live-temp-title control-hidden',
|
351 |
+
'label_block' => true,
|
352 |
+
'condition' => array(
|
353 |
+
'premium_modal_box_content_type' => 'template',
|
354 |
+
),
|
355 |
+
)
|
356 |
+
);
|
357 |
+
|
358 |
+
$this->add_control(
|
359 |
+
'modal_temp_live_btn',
|
360 |
+
array(
|
361 |
+
'type' => Controls_Manager::BUTTON,
|
362 |
+
'label_block' => true,
|
363 |
+
'button_type' => 'default papro-btn-block',
|
364 |
+
'text' => __( 'Create / Edit Template', 'premium-addons-for-elementor' ),
|
365 |
+
'event' => 'createLiveTemp',
|
366 |
+
'condition' => array(
|
367 |
+
'premium_modal_box_content_type' => 'template',
|
368 |
+
),
|
369 |
+
)
|
370 |
+
);
|
371 |
+
|
372 |
+
$this->add_control(
|
373 |
+
'premium_modal_box_content_temp',
|
374 |
+
array(
|
375 |
+
'label' => __( 'OR Select Existing Template', 'premium-addons-for-elementor' ),
|
376 |
+
'type' => Controls_Manager::SELECT2,
|
377 |
+
'label_block' => true,
|
378 |
+
'classes' => 'premium-live-temp-label',
|
379 |
+
'options' => $this->getTemplateInstance()->get_elementor_page_list(),
|
380 |
+
'condition' => array(
|
381 |
+
'premium_modal_box_content_type' => 'template',
|
382 |
+
),
|
383 |
+
)
|
384 |
+
);
|
385 |
+
|
386 |
+
$this->add_control(
|
387 |
+
'premium_modal_box_content',
|
388 |
+
array(
|
389 |
+
'type' => Controls_Manager::WYSIWYG,
|
390 |
+
'default' => 'Modal Box Content',
|
391 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-body',
|
392 |
+
'dynamic' => array( 'active' => true ),
|
393 |
+
'condition' => array(
|
394 |
+
'premium_modal_box_content_type' => 'editor',
|
395 |
+
),
|
396 |
+
'show_label' => false,
|
397 |
+
)
|
398 |
+
);
|
399 |
+
|
400 |
+
$this->add_control(
|
401 |
+
'premium_modal_box_upper_close',
|
402 |
+
array(
|
403 |
+
'label' => __( 'Upper Close Button', 'premium-addons-for-elementor' ),
|
404 |
+
'type' => Controls_Manager::SWITCHER,
|
405 |
+
'separator' => 'before',
|
406 |
+
'default' => 'yes',
|
407 |
+
'condition' => array(
|
408 |
+
'premium_modal_box_header_switcher' => 'yes',
|
409 |
+
),
|
410 |
+
)
|
411 |
+
);
|
412 |
+
|
413 |
+
$this->add_control(
|
414 |
+
'premium_modal_box_lower_close',
|
415 |
+
array(
|
416 |
+
'label' => __( 'Lower Close Button', 'premium-addons-for-elementor' ),
|
417 |
+
'type' => Controls_Manager::SWITCHER,
|
418 |
+
'default' => 'yes',
|
419 |
+
)
|
420 |
+
);
|
421 |
+
|
422 |
+
$this->add_control(
|
423 |
+
'premium_modal_close_text',
|
424 |
+
array(
|
425 |
+
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
426 |
+
'default' => __( 'Close', 'premium-addons-for-elementor' ),
|
427 |
+
'type' => Controls_Manager::TEXT,
|
428 |
+
'dynamic' => array( 'active' => true ),
|
429 |
+
'label_block' => true,
|
430 |
+
'condition' => array(
|
431 |
+
'premium_modal_box_lower_close' => 'yes',
|
432 |
+
),
|
433 |
+
)
|
434 |
+
);
|
435 |
+
|
436 |
+
$this->add_control(
|
437 |
+
'premium_modal_box_animation',
|
438 |
+
array(
|
439 |
+
'label' => __( 'Entrance Animation', 'premium-addons-for-elementor' ),
|
440 |
+
'type' => Controls_Manager::ANIMATION,
|
441 |
+
'default' => 'fadeInDown',
|
442 |
+
'label_block' => true,
|
443 |
+
'frontend_available' => true,
|
444 |
+
'render_type' => 'template',
|
445 |
+
|
446 |
+
)
|
447 |
+
);
|
448 |
+
|
449 |
+
$this->add_control(
|
450 |
+
'premium_modal_box_animation_duration',
|
451 |
+
array(
|
452 |
+
'label' => __( 'Animation Duration', 'premium-addons-for-elementor' ),
|
453 |
+
'type' => Controls_Manager::SELECT,
|
454 |
+
'default' => 'fast',
|
455 |
+
'options' => array(
|
456 |
+
'slow' => __( 'Slow', 'premium-addons-for-elementor' ),
|
457 |
+
'' => __( 'Normal', 'premium-addons-for-elementor' ),
|
458 |
+
'fast' => __( 'Fast', 'premium-addons-for-elementor' ),
|
459 |
+
),
|
460 |
+
'condition' => array(
|
461 |
+
'premium_modal_box_animation!' => '',
|
462 |
+
),
|
463 |
+
)
|
464 |
+
);
|
465 |
+
|
466 |
+
$this->add_control(
|
467 |
+
'premium_modal_box_animation_delay',
|
468 |
+
array(
|
469 |
+
'label' => __( 'Animation Delay', 'premium-addons-for-elementor' ) . ' (s)',
|
470 |
+
'type' => Controls_Manager::NUMBER,
|
471 |
+
'default' => '',
|
472 |
+
'step' => 0.1,
|
473 |
+
'condition' => array(
|
474 |
+
'premium_modal_box_animation!' => '',
|
475 |
+
),
|
476 |
+
'frontend_available' => true,
|
477 |
+
)
|
478 |
+
);
|
479 |
+
|
480 |
+
$this->end_controls_section();
|
481 |
+
|
482 |
+
$this->start_controls_section(
|
483 |
+
'premium_modal_box_content_section',
|
484 |
+
array(
|
485 |
+
'label' => __( 'Trigger Options', 'premium-addons-for-elementor' ),
|
486 |
+
)
|
487 |
+
);
|
488 |
+
|
489 |
+
$this->add_control(
|
490 |
+
'premium_modal_box_display_on',
|
491 |
+
array(
|
492 |
+
'label' => __( 'Trigger', 'premium-addons-for-elementor' ),
|
493 |
+
'type' => Controls_Manager::SELECT,
|
494 |
+
'description' => __( 'Choose where would you like the modal box appear on', 'premium-addons-for-elementor' ),
|
495 |
+
'options' => array(
|
496 |
+
'button' => __( 'Button', 'premium-addons-for-elementor' ),
|
497 |
+
'image' => __( 'Image', 'premium-addons-for-elementor' ),
|
498 |
+
'text' => __( 'Text', 'premium-addons-for-elementor' ),
|
499 |
+
'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
|
500 |
+
'pageload' => __( 'On Page Load', 'premium-addons-for-elementor' ),
|
501 |
+
),
|
502 |
+
'label_block' => true,
|
503 |
+
'default' => 'button',
|
504 |
+
)
|
505 |
+
);
|
506 |
+
|
507 |
+
$this->add_control(
|
508 |
+
'premium_modal_box_button_text',
|
509 |
+
array(
|
510 |
+
'label' => __( 'Button Text', 'premium-addons-for-elementor' ),
|
511 |
+
'default' => __( 'Premium Addons', 'premium-addons-for-elementor' ),
|
512 |
+
'type' => Controls_Manager::TEXT,
|
513 |
+
'dynamic' => array( 'active' => true ),
|
514 |
+
'label_block' => true,
|
515 |
+
'condition' => array(
|
516 |
+
'premium_modal_box_display_on' => 'button',
|
517 |
+
),
|
518 |
+
)
|
519 |
+
);
|
520 |
+
|
521 |
+
$this->add_control(
|
522 |
+
'premium_modal_box_icon_switcher',
|
523 |
+
array(
|
524 |
+
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
525 |
+
'type' => Controls_Manager::SWITCHER,
|
526 |
+
'condition' => array(
|
527 |
+
'premium_modal_box_display_on' => 'button',
|
528 |
+
),
|
529 |
+
'description' => __( 'Enable or disable button icon', 'premium-addons-for-elementor' ),
|
530 |
+
)
|
531 |
+
);
|
532 |
+
|
533 |
+
$this->add_control(
|
534 |
+
'icon_type',
|
535 |
+
array(
|
536 |
+
'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
|
537 |
+
'type' => Controls_Manager::SELECT,
|
538 |
+
'options' => array(
|
539 |
+
'icon' => __( 'Font Awesome Icon', 'premium-addons-for-elementor' ),
|
540 |
+
'svg' => __( 'SVG Code', 'premium-addons-for-elementor' ),
|
541 |
+
),
|
542 |
+
'default' => 'icon',
|
543 |
+
'condition' => array(
|
544 |
+
'premium_modal_box_display_on' => 'button',
|
545 |
+
),
|
546 |
+
)
|
547 |
+
);
|
548 |
+
|
549 |
+
$this->add_control(
|
550 |
+
'premium_modal_box_button_icon_selection_updated',
|
551 |
+
array(
|
552 |
+
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
553 |
+
'type' => Controls_Manager::ICONS,
|
554 |
+
'fa4compatibility' => 'premium_modal_box_button_icon_selection',
|
555 |
+
'default' => array(
|
556 |
+
'value' => 'fas fa-star',
|
557 |
+
'library' => 'fa-solid',
|
558 |
+
),
|
559 |
+
'label_block' => true,
|
560 |
+
'condition' => array(
|
561 |
+
'premium_modal_box_display_on' => 'button',
|
562 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
563 |
+
'icon_type' => 'icon',
|
564 |
+
),
|
565 |
+
)
|
566 |
+
);
|
567 |
+
|
568 |
+
$this->add_control(
|
569 |
+
'custom_svg',
|
570 |
+
array(
|
571 |
+
'label' => __( 'SVG Code', 'premium-addons-for-elementor' ),
|
572 |
+
'type' => Controls_Manager::TEXTAREA,
|
573 |
+
'description' => 'You can use these sites to create SVGs: <a href="https://danmarshall.github.io/google-font-to-svg-path/" target="_blank">Google Fonts</a> and <a href="https://boxy-svg.com/" target="_blank">Boxy SVG</a>',
|
574 |
+
'condition' => array(
|
575 |
+
'premium_modal_box_display_on' => 'button',
|
576 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
577 |
+
'icon_type' => 'svg',
|
578 |
+
),
|
579 |
+
)
|
580 |
+
);
|
581 |
+
|
582 |
+
$common_conditions = array(
|
583 |
+
'premium_modal_box_display_on' => 'button',
|
584 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
585 |
+
);
|
586 |
+
|
587 |
+
$this->add_control(
|
588 |
+
'draw_svg',
|
589 |
+
array(
|
590 |
+
'label' => __( 'Draw Icon', 'premium-addons-for-elementor' ),
|
591 |
+
'type' => Controls_Manager::SWITCHER,
|
592 |
+
'classes' => $draw_icon ? '' : 'editor-pa-control-disabled',
|
593 |
+
'condition' => array_merge(
|
594 |
+
$common_conditions,
|
595 |
+
array(
|
596 |
+
'icon_type' => array( 'icon', 'svg' ),
|
597 |
+
'premium_modal_box_button_icon_selection_updated[library]!' => 'svg',
|
598 |
+
)
|
599 |
+
),
|
600 |
+
)
|
601 |
+
);
|
602 |
+
|
603 |
+
if ( $draw_icon ) {
|
604 |
+
$this->add_control(
|
605 |
+
'path_width',
|
606 |
+
array(
|
607 |
+
'label' => __( 'Path Thickness', 'premium-addons-for-elementor' ),
|
608 |
+
'type' => Controls_Manager::SLIDER,
|
609 |
+
'range' => array(
|
610 |
+
'px' => array(
|
611 |
+
'min' => 0,
|
612 |
+
'max' => 50,
|
613 |
+
'step' => 0.1,
|
614 |
+
),
|
615 |
+
),
|
616 |
+
'condition' => array_merge(
|
617 |
+
$common_conditions,
|
618 |
+
array(
|
619 |
+
'icon_type' => array( 'icon', 'svg' ),
|
620 |
+
)
|
621 |
+
),
|
622 |
+
'selectors' => array(
|
623 |
+
'{{WRAPPER}} .premium-modal-trigger-btn svg *' => 'stroke-width: {{SIZE}}',
|
624 |
+
),
|
625 |
+
)
|
626 |
+
);
|
627 |
+
|
628 |
+
$this->add_control(
|
629 |
+
'svg_sync',
|
630 |
+
array(
|
631 |
+
'label' => __( 'Draw All Paths Together', 'premium-addons-for-elementor' ),
|
632 |
+
'type' => Controls_Manager::SWITCHER,
|
633 |
+
'condition' => array_merge(
|
634 |
+
$common_conditions,
|
635 |
+
array(
|
636 |
+
'icon_type' => array( 'icon', 'svg' ),
|
637 |
+
'draw_svg' => 'yes',
|
638 |
+
)
|
639 |
+
),
|
640 |
+
)
|
641 |
+
);
|
642 |
+
|
643 |
+
$this->add_control(
|
644 |
+
'frames',
|
645 |
+
array(
|
646 |
+
'label' => __( 'Speed', 'premium-addons-for-elementor' ),
|
647 |
+
'type' => Controls_Manager::NUMBER,
|
648 |
+
'description' => __( 'Larger value means longer animation duration.', 'premium-addons-for-elementor' ),
|
649 |
+
'default' => 5,
|
650 |
+
'min' => 1,
|
651 |
+
'max' => 100,
|
652 |
+
'condition' => array_merge(
|
653 |
+
$common_conditions,
|
654 |
+
array(
|
655 |
+
'icon_type' => array( 'icon', 'svg' ),
|
656 |
+
'draw_svg' => 'yes',
|
657 |
+
)
|
658 |
+
),
|
659 |
+
)
|
660 |
+
);
|
661 |
+
|
662 |
+
$this->add_control(
|
663 |
+
'svg_loop',
|
664 |
+
array(
|
665 |
+
'label' => __( 'Loop', 'premium-addons-for-elementor' ),
|
666 |
+
'type' => Controls_Manager::SWITCHER,
|
667 |
+
'return_value' => 'true',
|
668 |
+
'default' => 'true',
|
669 |
+
'condition' => array_merge(
|
670 |
+
$common_conditions,
|
671 |
+
array(
|
672 |
+
'icon_type' => array( 'icon', 'svg' ),
|
673 |
+
'draw_svg' => 'yes',
|
674 |
+
)
|
675 |
+
),
|
676 |
+
)
|
677 |
+
);
|
678 |
+
|
679 |
+
$this->add_control(
|
680 |
+
'svg_reverse',
|
681 |
+
array(
|
682 |
+
'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
|
683 |
+
'type' => Controls_Manager::SWITCHER,
|
684 |
+
'return_value' => 'true',
|
685 |
+
'condition' => array_merge(
|
686 |
+
$common_conditions,
|
687 |
+
array(
|
688 |
+
'icon_type' => array( 'icon', 'svg' ),
|
689 |
+
'draw_svg' => 'yes',
|
690 |
+
)
|
691 |
+
),
|
692 |
+
)
|
693 |
+
);
|
694 |
+
|
695 |
+
$this->add_control(
|
696 |
+
'start_point',
|
697 |
+
array(
|
698 |
+
'label' => __( 'Start Point (%)', 'premium-addons-for-elementor' ),
|
699 |
+
'type' => Controls_Manager::SLIDER,
|
700 |
+
'description' => __( 'Set the point that the SVG should start from.', 'premium-addons-for-elementor' ),
|
701 |
+
'default' => array(
|
702 |
+
'unit' => '%',
|
703 |
+
'size' => 0,
|
704 |
+
),
|
705 |
+
'condition' => array_merge(
|
706 |
+
$common_conditions,
|
707 |
+
array(
|
708 |
+
'icon_type' => array( 'icon', 'svg' ),
|
709 |
+
'draw_svg' => 'yes',
|
710 |
+
'svg_reverse!' => 'true',
|
711 |
+
)
|
712 |
+
),
|
713 |
+
)
|
714 |
+
);
|
715 |
+
|
716 |
+
$this->add_control(
|
717 |
+
'end_point',
|
718 |
+
array(
|
719 |
+
'label' => __( 'End Point (%)', 'premium-addons-for-elementor' ),
|
720 |
+
'type' => Controls_Manager::SLIDER,
|
721 |
+
'description' => __( 'Set the point that the SVG should end at.', 'premium-addons-for-elementor' ),
|
722 |
+
'default' => array(
|
723 |
+
'unit' => '%',
|
724 |
+
'size' => 0,
|
725 |
+
),
|
726 |
+
'condition' => array_merge(
|
727 |
+
$common_conditions,
|
728 |
+
array(
|
729 |
+
'icon_type' => array( 'icon', 'svg' ),
|
730 |
+
'draw_svg' => 'yes',
|
731 |
+
'svg_reverse' => 'true',
|
732 |
+
)
|
733 |
+
),
|
734 |
+
|
735 |
+
)
|
736 |
+
);
|
737 |
+
|
738 |
+
$this->add_control(
|
739 |
+
'svg_hover',
|
740 |
+
array(
|
741 |
+
'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
|
742 |
+
'type' => Controls_Manager::SWITCHER,
|
743 |
+
'return_value' => 'true',
|
744 |
+
'condition' => array_merge(
|
745 |
+
$common_conditions,
|
746 |
+
array(
|
747 |
+
'icon_type' => array( 'icon', 'svg' ),
|
748 |
+
'draw_svg' => 'yes',
|
749 |
+
)
|
750 |
+
),
|
751 |
+
)
|
752 |
+
);
|
753 |
+
|
754 |
+
$this->add_control(
|
755 |
+
'svg_yoyo',
|
756 |
+
array(
|
757 |
+
'label' => __( 'Yoyo Effect', 'premium-addons-for-elementor' ),
|
758 |
+
'type' => Controls_Manager::SWITCHER,
|
759 |
+
'condition' => array_merge(
|
760 |
+
$common_conditions,
|
761 |
+
array(
|
762 |
+
'icon_type' => array( 'icon', 'svg' ),
|
763 |
+
'draw_svg' => 'yes',
|
764 |
+
'svg_loop' => 'true',
|
765 |
+
)
|
766 |
+
),
|
767 |
+
)
|
768 |
+
);
|
769 |
+
} else {
|
770 |
+
|
771 |
+
Helper_Functions::get_draw_svg_notice(
|
772 |
+
$this,
|
773 |
+
'modal',
|
774 |
+
array_merge(
|
775 |
+
$common_conditions,
|
776 |
+
array(
|
777 |
+
'icon_type' => array( 'icon', 'svg' ),
|
778 |
+
'premium_modal_box_button_icon_selection_updated[library]!' => 'svg',
|
779 |
+
)
|
780 |
+
)
|
781 |
+
);
|
782 |
+
|
783 |
+
}
|
784 |
+
|
785 |
+
$this->add_control(
|
786 |
+
'premium_modal_box_icon_position',
|
787 |
+
array(
|
788 |
+
'label' => __( 'Icon Position', 'premium-addons-for-elementor' ),
|
789 |
+
'type' => Controls_Manager::SELECT,
|
790 |
+
'default' => 'before',
|
791 |
+
'options' => array(
|
792 |
+
'before' => __( 'Before', 'premium-addons-for-elementor' ),
|
793 |
+
'after' => __( 'After', 'premium-addons-for-elementor' ),
|
794 |
+
),
|
795 |
+
'label_block' => true,
|
796 |
+
'condition' => array(
|
797 |
+
'premium_modal_box_display_on' => 'button',
|
798 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
799 |
+
),
|
800 |
+
)
|
801 |
+
);
|
802 |
+
|
803 |
+
$this->add_control(
|
804 |
+
'premium_modal_box_icon_before_size',
|
805 |
+
array(
|
806 |
+
'label' => __( 'Icon Size', 'premium-addons-for-elementor' ),
|
807 |
+
'type' => Controls_Manager::SLIDER,
|
808 |
+
'selectors' => array(
|
809 |
+
'{{WRAPPER}} .premium-modal-trigger-btn i' => 'font-size: {{SIZE}}px',
|
810 |
+
'{{WRAPPER}} .premium-modal-trigger-btn svg' => 'width: {{SIZE}}px !important; height: {{SIZE}}px !important',
|
811 |
+
),
|
812 |
+
'condition' => array(
|
813 |
+
'premium_modal_box_display_on' => 'button',
|
814 |
+
'icon_type' => 'icon',
|
815 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
816 |
+
),
|
817 |
+
)
|
818 |
+
);
|
819 |
+
|
820 |
+
$this->add_responsive_control(
|
821 |
+
'svg_icon_width',
|
822 |
+
array(
|
823 |
+
'label' => __( 'Icon Width', 'premium-addons-for-elementor' ),
|
824 |
+
'type' => Controls_Manager::SLIDER,
|
825 |
+
'size_units' => array( 'px', 'em', '%' ),
|
826 |
+
'range' => array(
|
827 |
+
'px' => array(
|
828 |
+
'min' => 1,
|
829 |
+
'max' => 600,
|
830 |
+
),
|
831 |
+
'em' => array(
|
832 |
+
'min' => 1,
|
833 |
+
'max' => 30,
|
834 |
+
),
|
835 |
+
),
|
836 |
+
'default' => array(
|
837 |
+
'size' => 100,
|
838 |
+
'unit' => 'px',
|
839 |
+
),
|
840 |
+
'condition' => array(
|
841 |
+
'premium_modal_box_display_on' => 'button',
|
842 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
843 |
+
'icon_type' => 'svg',
|
844 |
+
),
|
845 |
+
'selectors' => array(
|
846 |
+
'{{WRAPPER}} .premium-modal-trigger-btn svg' => 'width: {{SIZE}}{{UNIT}};',
|
847 |
+
),
|
848 |
+
)
|
849 |
+
);
|
850 |
+
|
851 |
+
$this->add_responsive_control(
|
852 |
+
'svg_icon_height',
|
853 |
+
array(
|
854 |
+
'label' => __( 'Icon Height', 'premium-addons-for-elementor' ),
|
855 |
+
'type' => Controls_Manager::SLIDER,
|
856 |
+
'size_units' => array( 'px', 'em' ),
|
857 |
+
'range' => array(
|
858 |
+
'px' => array(
|
859 |
+
'min' => 1,
|
860 |
+
'max' => 300,
|
861 |
+
),
|
862 |
+
'em' => array(
|
863 |
+
'min' => 1,
|
864 |
+
'max' => 30,
|
865 |
+
),
|
866 |
+
),
|
867 |
+
'condition' => array(
|
868 |
+
'premium_modal_box_display_on' => 'button',
|
869 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
870 |
+
'icon_type' => 'svg',
|
871 |
+
),
|
872 |
+
'selectors' => array(
|
873 |
+
'{{WRAPPER}} .premium-modal-trigger-btn svg' => 'height: {{SIZE}}{{UNIT}}',
|
874 |
+
),
|
875 |
+
)
|
876 |
+
);
|
877 |
+
|
878 |
+
if ( ! $this->check_rtl() ) {
|
879 |
+
$this->add_control(
|
880 |
+
'premium_modal_box_icon_before_spacing',
|
881 |
+
array(
|
882 |
+
'label' => __( 'Icon Spacing', 'premium-addons-for-elementor' ),
|
883 |
+
'type' => Controls_Manager::SLIDER,
|
884 |
+
'condition' => array(
|
885 |
+
'premium_modal_box_display_on' => 'button',
|
886 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
887 |
+
'premium_modal_box_icon_position' => 'before',
|
888 |
+
),
|
889 |
+
'default' => array(
|
890 |
+
'size' => 15,
|
891 |
+
),
|
892 |
+
'selectors' => array(
|
893 |
+
'{{WRAPPER}} .premium-modal-trigger-btn i, {{WRAPPER}} .premium-modal-trigger-btn svg' => 'margin-right: {{SIZE}}px',
|
894 |
+
),
|
895 |
+
'separator' => 'after',
|
896 |
+
)
|
897 |
+
);
|
898 |
+
|
899 |
+
$this->add_control(
|
900 |
+
'premium_modal_box_icon_after_spacing',
|
901 |
+
array(
|
902 |
+
'label' => __( 'Icon Spacing', 'premium-addons-for-elementor' ),
|
903 |
+
'type' => Controls_Manager::SLIDER,
|
904 |
+
'default' => array(
|
905 |
+
'size' => 15,
|
906 |
+
),
|
907 |
+
'selectors' => array(
|
908 |
+
'{{WRAPPER}} .premium-modal-trigger-btn i, {{WRAPPER}} .premium-modal-trigger-btn svg' => 'margin-left: {{SIZE}}px',
|
909 |
+
),
|
910 |
+
'separator' => 'after',
|
911 |
+
'condition' => array(
|
912 |
+
'premium_modal_box_display_on' => 'button',
|
913 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
914 |
+
'premium_modal_box_icon_position' => 'after',
|
915 |
+
),
|
916 |
+
)
|
917 |
+
);
|
918 |
+
}
|
919 |
+
|
920 |
+
if ( $this->check_rtl() ) {
|
921 |
+
$this->add_control(
|
922 |
+
'premium_modal_box_icon_rtl_before_spacing',
|
923 |
+
array(
|
924 |
+
'label' => __( 'Icon Spacing', 'premium-addons-for-elementor' ),
|
925 |
+
'type' => Controls_Manager::SLIDER,
|
926 |
+
'condition' => array(
|
927 |
+
'premium_modal_box_display_on' => 'button',
|
928 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
929 |
+
'premium_modal_box_icon_position' => 'before',
|
930 |
+
),
|
931 |
+
'default' => array(
|
932 |
+
'size' => 15,
|
933 |
+
),
|
934 |
+
'selectors' => array(
|
935 |
+
'{{WRAPPER}} .premium-modal-trigger-btn i, {{WRAPPER}} .premium-modal-trigger-btn svg' => 'margin-left: {{SIZE}}px',
|
936 |
+
),
|
937 |
+
'separator' => 'after',
|
938 |
+
)
|
939 |
+
);
|
940 |
+
|
941 |
+
$this->add_control(
|
942 |
+
'premium_modal_box_icon_rtl_after_spacing',
|
943 |
+
array(
|
944 |
+
'label' => __( 'Icon Spacing', 'premium-addons-for-elementor' ),
|
945 |
+
'type' => Controls_Manager::SLIDER,
|
946 |
+
'default' => array(
|
947 |
+
'size' => 15,
|
948 |
+
),
|
949 |
+
'selectors' => array(
|
950 |
+
'{{WRAPPER}} .premium-modal-trigger-btn i, {{WRAPPER}} .premium-modal-trigger-btn svg' => 'margin-right: {{SIZE}}px',
|
951 |
+
),
|
952 |
+
'separator' => 'after',
|
953 |
+
'condition' => array(
|
954 |
+
'premium_modal_box_display_on' => 'button',
|
955 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
956 |
+
'premium_modal_box_icon_position' => 'after',
|
957 |
+
),
|
958 |
+
)
|
959 |
+
);
|
960 |
+
}
|
961 |
+
|
962 |
+
$this->add_control(
|
963 |
+
'premium_modal_box_button_size',
|
964 |
+
array(
|
965 |
+
'label' => __( 'Button Size', 'premium-addons-for-elementor' ),
|
966 |
+
'type' => Controls_Manager::SELECT,
|
967 |
+
'options' => array(
|
968 |
+
'sm' => __( 'Small', 'premium-addons-for-elementor' ),
|
969 |
+
'md' => __( 'Medium', 'premium-addons-for-elementor' ),
|
970 |
+
'lg' => __( 'Large', 'premium-addons-for-elementor' ),
|
971 |
+
'block' => __( 'Block', 'premium-addons-for-elementor' ),
|
972 |
+
),
|
973 |
+
'label_block' => true,
|
974 |
+
'default' => 'lg',
|
975 |
+
'condition' => array(
|
976 |
+
'premium_modal_box_display_on' => 'button',
|
977 |
+
),
|
978 |
+
)
|
979 |
+
);
|
980 |
+
|
981 |
+
$this->add_control(
|
982 |
+
'premium_modal_box_image_src',
|
983 |
+
array(
|
984 |
+
'label' => __( 'Image', 'premium-addons-for-elementor' ),
|
985 |
+
'type' => Controls_Manager::MEDIA,
|
986 |
+
'dynamic' => array( 'active' => true ),
|
987 |
+
'default' => array(
|
988 |
+
'url' => Utils::get_placeholder_image_src(),
|
989 |
+
),
|
990 |
+
'label_block' => true,
|
991 |
+
'condition' => array(
|
992 |
+
'premium_modal_box_display_on' => 'image',
|
993 |
+
),
|
994 |
+
)
|
995 |
+
);
|
996 |
+
|
997 |
+
$this->add_control(
|
998 |
+
'premium_modal_box_selector_text',
|
999 |
+
array(
|
1000 |
+
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
1001 |
+
'type' => Controls_Manager::TEXT,
|
1002 |
+
'dynamic' => array( 'active' => true ),
|
1003 |
+
'label_block' => true,
|
1004 |
+
'default' => __( 'Premium Addons', 'premium-addons-for-elementor' ),
|
1005 |
+
'condition' => array(
|
1006 |
+
'premium_modal_box_display_on' => 'text',
|
1007 |
+
),
|
1008 |
+
)
|
1009 |
+
);
|
1010 |
+
|
1011 |
+
$this->add_control(
|
1012 |
+
'lottie_url',
|
1013 |
+
array(
|
1014 |
+
'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
|
1015 |
+
'type' => Controls_Manager::TEXT,
|
1016 |
+
'dynamic' => array( 'active' => true ),
|
1017 |
+
'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
|
1018 |
+
'label_block' => true,
|
1019 |
+
'condition' => array(
|
1020 |
+
'premium_modal_box_display_on' => 'animation',
|
1021 |
+
),
|
1022 |
+
)
|
1023 |
+
);
|
1024 |
+
|
1025 |
+
$this->add_control(
|
1026 |
+
'lottie_loop',
|
1027 |
+
array(
|
1028 |
+
'label' => __( 'Loop', 'premium-addons-for-elementor' ),
|
1029 |
+
'type' => Controls_Manager::SWITCHER,
|
1030 |
+
'return_value' => 'true',
|
1031 |
+
'default' => 'true',
|
1032 |
+
'condition' => array(
|
1033 |
+
'premium_modal_box_display_on' => 'animation',
|
1034 |
+
),
|
1035 |
+
)
|
1036 |
+
);
|
1037 |
+
|
1038 |
+
$this->add_control(
|
1039 |
+
'lottie_reverse',
|
1040 |
+
array(
|
1041 |
+
'label' => __( 'Reverse', 'premium-addons-for-elementor' ),
|
1042 |
+
'type' => Controls_Manager::SWITCHER,
|
1043 |
+
'return_value' => 'true',
|
1044 |
+
'condition' => array(
|
1045 |
+
'premium_modal_box_display_on' => 'animation',
|
1046 |
+
),
|
1047 |
+
)
|
1048 |
+
);
|
1049 |
+
|
1050 |
+
$this->add_control(
|
1051 |
+
'lottie_hover',
|
1052 |
+
array(
|
1053 |
+
'label' => __( 'Only Play on Hover', 'premium-addons-for-elementor' ),
|
1054 |
+
'type' => Controls_Manager::SWITCHER,
|
1055 |
+
'return_value' => 'true',
|
1056 |
+
'condition' => array(
|
1057 |
+
'premium_modal_box_display_on' => 'animation',
|
1058 |
+
),
|
1059 |
+
)
|
1060 |
+
);
|
1061 |
+
|
1062 |
+
$this->add_responsive_control(
|
1063 |
+
'trigger_image_animation_size',
|
1064 |
+
array(
|
1065 |
+
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
1066 |
+
'type' => Controls_Manager::SLIDER,
|
1067 |
+
'size_units' => array( 'px', 'em', '%' ),
|
1068 |
+
'range' => array(
|
1069 |
+
'px' => array(
|
1070 |
+
'min' => 1,
|
1071 |
+
'max' => 800,
|
1072 |
+
),
|
1073 |
+
'em' => array(
|
1074 |
+
'min' => 1,
|
1075 |
+
'max' => 30,
|
1076 |
+
),
|
1077 |
+
),
|
1078 |
+
'selectors' => array(
|
1079 |
+
'{{WRAPPER}} .premium-modal-trigger-img, {{WRAPPER}} .premium-modal-trigger-animation' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
|
1080 |
+
),
|
1081 |
+
'condition' => array(
|
1082 |
+
'premium_modal_box_display_on' => array( 'image', 'animation' ),
|
1083 |
+
),
|
1084 |
+
)
|
1085 |
+
);
|
1086 |
+
|
1087 |
+
$this->add_control(
|
1088 |
+
'premium_modal_box_popup_delay',
|
1089 |
+
array(
|
1090 |
+
'label' => __( 'Delay in Popup Display (Sec)', 'premium-addons-for-elementor' ),
|
1091 |
+
'type' => Controls_Manager::NUMBER,
|
1092 |
+
'description' => __( 'When should the popup appear during page load? The value are counted in seconds', 'premium-addons-for-elementor' ),
|
1093 |
+
'default' => 1,
|
1094 |
+
'condition' => array(
|
1095 |
+
'premium_modal_box_display_on' => 'pageload',
|
1096 |
+
),
|
1097 |
+
)
|
1098 |
+
);
|
1099 |
+
|
1100 |
+
$this->add_responsive_control(
|
1101 |
+
'premium_modal_box_selector_align',
|
1102 |
+
array(
|
1103 |
+
'label' => __( 'Alignment', 'premium-addons-for-elementor' ),
|
1104 |
+
'type' => Controls_Manager::CHOOSE,
|
1105 |
+
'options' => array(
|
1106 |
+
'left' => array(
|
1107 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1108 |
+
'icon' => 'eicon-text-align-left',
|
1109 |
+
),
|
1110 |
+
'center' => array(
|
1111 |
+
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1112 |
+
'icon' => 'eicon-text-align-center',
|
1113 |
+
),
|
1114 |
+
'right' => array(
|
1115 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1116 |
+
'icon' => 'eicon-text-align-right',
|
1117 |
+
),
|
1118 |
+
),
|
1119 |
+
'toggle' => false,
|
1120 |
+
'default' => 'center',
|
1121 |
+
'selectors' => array(
|
1122 |
+
'{{WRAPPER}} .premium-modal-trigger-container' => 'text-align: {{VALUE}};',
|
1123 |
+
),
|
1124 |
+
'conditions' => array(
|
1125 |
+
'relation' => 'or',
|
1126 |
+
'terms' => array(
|
1127 |
+
array(
|
1128 |
+
'terms' => array(
|
1129 |
+
array(
|
1130 |
+
'name' => 'premium_modal_box_display_on',
|
1131 |
+
'operator' => '!=',
|
1132 |
+
'value' => 'button',
|
1133 |
+
),
|
1134 |
+
array(
|
1135 |
+
'name' => 'premium_modal_box_display_on',
|
1136 |
+
'operator' => '!=',
|
1137 |
+
'value' => 'pageload',
|
1138 |
+
),
|
1139 |
+
),
|
1140 |
+
),
|
1141 |
+
array(
|
1142 |
+
'relation' => 'and',
|
1143 |
+
'terms' => array(
|
1144 |
+
array(
|
1145 |
+
'name' => 'premium_modal_box_display_on',
|
1146 |
+
'value' => 'button',
|
1147 |
+
),
|
1148 |
+
array(
|
1149 |
+
'name' => 'premium_modal_box_button_size',
|
1150 |
+
'operator' => '!=',
|
1151 |
+
'value' => 'block',
|
1152 |
+
),
|
1153 |
+
),
|
1154 |
+
),
|
1155 |
+
),
|
1156 |
+
),
|
1157 |
+
)
|
1158 |
+
);
|
1159 |
+
|
1160 |
+
$this->end_controls_section();
|
1161 |
+
|
1162 |
+
$this->start_controls_section(
|
1163 |
+
'section_pa_docs',
|
1164 |
+
array(
|
1165 |
+
'label' => __( 'Helpful Documentations', 'premium-addons-for-elementor' ),
|
1166 |
+
)
|
1167 |
+
);
|
1168 |
+
|
1169 |
+
$docs = array(
|
1170 |
+
'https://premiumaddons.com/docs/modal-box-widget-tutorial/' => __( 'Getting started »', 'premium-addons-for-elementor' ),
|
1171 |
+
'https://premiumaddons.com/docs/how-to-create-elementor-template-to-be-used-with-premium-addons' => __( 'How to create an Elementor template to be used in Modal Box widget »', 'premium-addons-for-elementor' ),
|
1172 |
+
'https://premiumaddons.com/docs/how-can-i-insert-a-video-box-inside-premium-modal-box-widget/' => __( 'How Can I Insert a Video Box inside Premium Modal Box Widget »', 'premium-addons-for-elementor' ),
|
1173 |
+
);
|
1174 |
+
|
1175 |
+
$doc_index = 1;
|
1176 |
+
foreach ( $docs as $url => $title ) {
|
1177 |
+
|
1178 |
+
$doc_url = Helper_Functions::get_campaign_link( $url, 'editor-page', 'wp-editor', 'get-support' );
|
1179 |
+
|
1180 |
+
$this->add_control(
|
1181 |
+
'doc_' . $doc_index,
|
1182 |
+
array(
|
1183 |
+
'type' => Controls_Manager::RAW_HTML,
|
1184 |
+
'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc_url, $title ),
|
1185 |
+
'content_classes' => 'editor-pa-doc',
|
1186 |
+
)
|
1187 |
+
);
|
1188 |
+
|
1189 |
+
$doc_index++;
|
1190 |
+
|
1191 |
+
}
|
1192 |
+
|
1193 |
+
$this->end_controls_section();
|
1194 |
+
|
1195 |
+
$this->start_controls_section(
|
1196 |
+
'premium_modal_box_selector_style_section',
|
1197 |
+
array(
|
1198 |
+
'label' => __( 'Trigger', 'premium-addons-for-elementor' ),
|
1199 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1200 |
+
'condition' => array(
|
1201 |
+
'premium_modal_box_display_on!' => 'pageload',
|
1202 |
+
),
|
1203 |
+
)
|
1204 |
+
);
|
1205 |
+
|
1206 |
+
$this->add_group_control(
|
1207 |
+
Group_Control_Css_Filter::get_type(),
|
1208 |
+
array(
|
1209 |
+
'name' => 'trigger_css_filters',
|
1210 |
+
'selector' => '{{WRAPPER}} .premium-modal-trigger-animation',
|
1211 |
+
'condition' => array(
|
1212 |
+
'premium_modal_box_display_on' => 'animation',
|
1213 |
+
),
|
1214 |
+
)
|
1215 |
+
);
|
1216 |
+
|
1217 |
+
$this->add_group_control(
|
1218 |
+
Group_Control_Css_Filter::get_type(),
|
1219 |
+
array(
|
1220 |
+
'name' => 'trigger_hover_css_filters',
|
1221 |
+
'label' => __( 'Hover CSS Filters', 'premium-addons-for-elementor' ),
|
1222 |
+
'selector' => '{{WRAPPER}} .premium-modal-trigger-animation:hover',
|
1223 |
+
'condition' => array(
|
1224 |
+
'premium_modal_box_display_on' => 'animation',
|
1225 |
+
),
|
1226 |
+
)
|
1227 |
+
);
|
1228 |
+
|
1229 |
+
$this->add_group_control(
|
1230 |
+
Group_Control_Typography::get_type(),
|
1231 |
+
array(
|
1232 |
+
'name' => 'selectortext',
|
1233 |
+
'global' => array(
|
1234 |
+
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
|
1235 |
+
),
|
1236 |
+
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-text',
|
1237 |
+
'condition' => array(
|
1238 |
+
'premium_modal_box_display_on' => array( 'button', 'text' ),
|
1239 |
+
),
|
1240 |
+
)
|
1241 |
+
);
|
1242 |
+
|
1243 |
+
$this->add_control(
|
1244 |
+
'svg_color',
|
1245 |
+
array(
|
1246 |
+
'label' => __( 'After Draw Fill Color', 'premium-addons-for-elementor' ),
|
1247 |
+
'type' => Controls_Manager::COLOR,
|
1248 |
+
'global' => false,
|
1249 |
+
'separator' => 'after',
|
1250 |
+
'condition' => array(
|
1251 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
1252 |
+
'premium_modal_box_display_on' => 'button',
|
1253 |
+
'icon_type' => array( 'icon', 'svg' ),
|
1254 |
+
'draw_svg' => 'yes',
|
1255 |
+
),
|
1256 |
+
)
|
1257 |
+
);
|
1258 |
+
|
1259 |
+
$this->start_controls_tabs( 'premium_modal_box_button_style' );
|
1260 |
+
|
1261 |
+
$this->start_controls_tab(
|
1262 |
+
'premium_modal_box_tab_selector_normal',
|
1263 |
+
array(
|
1264 |
+
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
1265 |
+
'condition' => array(
|
1266 |
+
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1267 |
+
),
|
1268 |
+
)
|
1269 |
+
);
|
1270 |
+
|
1271 |
+
$this->add_control(
|
1272 |
+
'premium_modal_box_button_text_color',
|
1273 |
+
array(
|
1274 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1275 |
+
'type' => Controls_Manager::COLOR,
|
1276 |
+
'global' => array(
|
1277 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
1278 |
+
),
|
1279 |
+
'selectors' => array(
|
1280 |
+
'{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-text' => 'color:{{VALUE}};',
|
1281 |
+
),
|
1282 |
+
'condition' => array(
|
1283 |
+
'premium_modal_box_display_on' => array( 'button', 'text' ),
|
1284 |
+
),
|
1285 |
+
)
|
1286 |
+
);
|
1287 |
+
|
1288 |
+
$this->add_control(
|
1289 |
+
'premium_modal_box_button_icon_color',
|
1290 |
+
array(
|
1291 |
+
'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
|
1292 |
+
'type' => Controls_Manager::COLOR,
|
1293 |
+
'global' => array(
|
1294 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
1295 |
+
),
|
1296 |
+
'selectors' => array(
|
1297 |
+
'{{WRAPPER}} .premium-modal-trigger-btn i' => 'color:{{VALUE}}',
|
1298 |
+
'{{WRAPPER}} .premium-modal-trigger-btn svg, {{WRAPPER}} .premium-modal-trigger-btn svg *' => 'fill: {{VALUE}};',
|
1299 |
+
),
|
1300 |
+
'condition' => array(
|
1301 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
1302 |
+
'premium_modal_box_display_on' => 'button',
|
1303 |
+
),
|
1304 |
+
)
|
1305 |
+
);
|
1306 |
+
|
1307 |
+
if ( $draw_icon ) {
|
1308 |
+
$this->add_control(
|
1309 |
+
'stroke_color',
|
1310 |
+
array(
|
1311 |
+
'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
|
1312 |
+
'type' => Controls_Manager::COLOR,
|
1313 |
+
'global' => array(
|
1314 |
+
'default' => Global_Colors::COLOR_ACCENT,
|
1315 |
+
),
|
1316 |
+
'condition' => array(
|
1317 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
1318 |
+
'premium_modal_box_display_on' => 'button',
|
1319 |
+
'icon_type' => array( 'icon', 'svg' ),
|
1320 |
+
),
|
1321 |
+
'selectors' => array(
|
1322 |
+
'{{WRAPPER}} .premium-modal-trigger-btn svg *' => 'stroke: {{VALUE}};',
|
1323 |
+
),
|
1324 |
+
)
|
1325 |
+
);
|
1326 |
+
}
|
1327 |
+
|
1328 |
+
$this->add_control(
|
1329 |
+
'premium_modal_box_selector_background',
|
1330 |
+
array(
|
1331 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1332 |
+
'type' => Controls_Manager::COLOR,
|
1333 |
+
'global' => array(
|
1334 |
+
'default' => Global_Colors::COLOR_PRIMARY,
|
1335 |
+
),
|
1336 |
+
'selectors' => array(
|
1337 |
+
'{{WRAPPER}} .premium-modal-trigger-btn' => 'background-color: {{VALUE}};',
|
1338 |
+
),
|
1339 |
+
'condition' => array(
|
1340 |
+
'premium_modal_box_display_on' => 'button',
|
1341 |
+
),
|
1342 |
+
)
|
1343 |
+
);
|
1344 |
+
|
1345 |
+
$this->add_group_control(
|
1346 |
+
Group_Control_Border::get_type(),
|
1347 |
+
array(
|
1348 |
+
'name' => 'selector_border',
|
1349 |
+
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn,{{WRAPPER}} .premium-modal-trigger-text, {{WRAPPER}} .premium-modal-trigger-img',
|
1350 |
+
'condition' => array(
|
1351 |
+
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1352 |
+
),
|
1353 |
+
)
|
1354 |
+
);
|
1355 |
+
|
1356 |
+
$this->add_control(
|
1357 |
+
'premium_modal_box_selector_border_radius',
|
1358 |
+
array(
|
1359 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1360 |
+
'type' => Controls_Manager::SLIDER,
|
1361 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1362 |
+
'default' => array(
|
1363 |
+
'size' => 0,
|
1364 |
+
),
|
1365 |
+
'selectors' => array(
|
1366 |
+
'{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-text, {{WRAPPER}} .premium-modal-trigger-img' => 'border-radius:{{SIZE}}{{UNIT}};',
|
1367 |
+
),
|
1368 |
+
'condition' => array(
|
1369 |
+
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1370 |
+
),
|
1371 |
+
)
|
1372 |
+
);
|
1373 |
+
|
1374 |
+
$this->add_group_control(
|
1375 |
+
Group_Control_Box_Shadow::get_type(),
|
1376 |
+
array(
|
1377 |
+
'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
|
1378 |
+
'name' => 'premium_modal_box_selector_box_shadow',
|
1379 |
+
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-img',
|
1380 |
+
'condition' => array(
|
1381 |
+
'premium_modal_box_display_on' => array( 'button', 'image' ),
|
1382 |
+
),
|
1383 |
+
)
|
1384 |
+
);
|
1385 |
+
|
1386 |
+
$this->add_group_control(
|
1387 |
+
Group_Control_Text_Shadow::get_type(),
|
1388 |
+
array(
|
1389 |
+
'name' => 'premium_modal_box_selector_text_shadow',
|
1390 |
+
'selector' => '{{WRAPPER}} .premium-modal-trigger-text',
|
1391 |
+
'condition' => array(
|
1392 |
+
'premium_modal_box_display_on' => 'text',
|
1393 |
+
),
|
1394 |
+
)
|
1395 |
+
);
|
1396 |
+
|
1397 |
+
$this->end_controls_tab();
|
1398 |
+
|
1399 |
+
$this->start_controls_tab(
|
1400 |
+
'premium_modal_box_tab_selector_hover',
|
1401 |
+
array(
|
1402 |
+
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1403 |
+
'condition' => array(
|
1404 |
+
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1405 |
+
),
|
1406 |
+
)
|
1407 |
+
);
|
1408 |
+
|
1409 |
+
$this->add_control(
|
1410 |
+
'premium_modal_box_button_text_color_hover',
|
1411 |
+
array(
|
1412 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1413 |
+
'type' => Controls_Manager::COLOR,
|
1414 |
+
'global' => array(
|
1415 |
+
'default' => Global_Colors::COLOR_PRIMARY,
|
1416 |
+
),
|
1417 |
+
'selectors' => array(
|
1418 |
+
'{{WRAPPER}} .premium-modal-trigger-btn:hover, {{WRAPPER}} .premium-modal-trigger-text:hover' => 'color:{{VALUE}};',
|
1419 |
+
),
|
1420 |
+
'condition' => array(
|
1421 |
+
'premium_modal_box_display_on' => array( 'button', 'text' ),
|
1422 |
+
),
|
1423 |
+
)
|
1424 |
+
);
|
1425 |
+
|
1426 |
+
$this->add_control(
|
1427 |
+
'premium_modal_box_button_icon_hover_color',
|
1428 |
+
array(
|
1429 |
+
'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
|
1430 |
+
'type' => Controls_Manager::COLOR,
|
1431 |
+
'global' => array(
|
1432 |
+
'default' => Global_Colors::COLOR_PRIMARY,
|
1433 |
+
),
|
1434 |
+
'selectors' => array(
|
1435 |
+
'{{WRAPPER}} .premium-modal-trigger-btn:hover i' => 'color: {{VALUE}}',
|
1436 |
+
'{{WRAPPER}} .premium-modal-trigger-btn:hover svg, {{WRAPPER}} .premium-modal-trigger-btn:hover svg *' => 'fill: {{VALUE}};',
|
1437 |
+
),
|
1438 |
+
'condition' => array(
|
1439 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
1440 |
+
'premium_modal_box_display_on' => 'button',
|
1441 |
+
),
|
1442 |
+
)
|
1443 |
+
);
|
1444 |
+
|
1445 |
+
if ( $draw_icon ) {
|
1446 |
+
$this->add_control(
|
1447 |
+
'stroke_color_hover',
|
1448 |
+
array(
|
1449 |
+
'label' => __( 'Stroke Color', 'premium-addons-for-elementor' ),
|
1450 |
+
'type' => Controls_Manager::COLOR,
|
1451 |
+
'global' => array(
|
1452 |
+
'default' => Global_Colors::COLOR_ACCENT,
|
1453 |
+
),
|
1454 |
+
'condition' => array(
|
1455 |
+
'premium_modal_box_icon_switcher' => 'yes',
|
1456 |
+
'premium_modal_box_display_on' => 'button',
|
1457 |
+
'icon_type' => array( 'icon', 'svg' ),
|
1458 |
+
),
|
1459 |
+
'selectors' => array(
|
1460 |
+
'{{WRAPPER}} .premium-modal-trigger-btn:hover svg *' => 'stroke: {{VALUE}};',
|
1461 |
+
),
|
1462 |
+
)
|
1463 |
+
);
|
1464 |
+
}
|
1465 |
+
|
1466 |
+
$this->add_control(
|
1467 |
+
'premium_modal_box_selector_hover_background',
|
1468 |
+
array(
|
1469 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1470 |
+
'type' => Controls_Manager::COLOR,
|
1471 |
+
'global' => array(
|
1472 |
+
'default' => Global_Colors::COLOR_TEXT,
|
1473 |
+
),
|
1474 |
+
'selectors' => array(
|
1475 |
+
'{{WRAPPER}} .premium-modal-trigger-btn:hover' => 'background: {{VALUE}};',
|
1476 |
+
),
|
1477 |
+
'condition' => array(
|
1478 |
+
'premium_modal_box_display_on' => 'button',
|
1479 |
+
),
|
1480 |
+
)
|
1481 |
+
);
|
1482 |
+
|
1483 |
+
$this->add_group_control(
|
1484 |
+
Group_Control_Border::get_type(),
|
1485 |
+
array(
|
1486 |
+
'name' => 'selector_border_hover',
|
1487 |
+
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn:hover,
|
1488 |
+
{{WRAPPER}} .premium-modal-trigger-text:hover, {{WRAPPER}} .premium-modal-trigger-img:hover',
|
1489 |
+
'condition' => array(
|
1490 |
+
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1491 |
+
),
|
1492 |
+
)
|
1493 |
+
);
|
1494 |
+
|
1495 |
+
$this->add_control(
|
1496 |
+
'premium_modal_box_selector_border_radius_hover',
|
1497 |
+
array(
|
1498 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1499 |
+
'type' => Controls_Manager::SLIDER,
|
1500 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1501 |
+
'selectors' => array(
|
1502 |
+
'{{WRAPPER}} .premium-modal-trigger-btn:hover,{{WRAPPER}} .premium-modal-trigger-text:hover, {{WRAPPER}} .premium-modal-trigger-img:hover' => 'border-radius:{{SIZE}}{{UNIT}};',
|
1503 |
+
),
|
1504 |
+
'condition' => array(
|
1505 |
+
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1506 |
+
),
|
1507 |
+
)
|
1508 |
+
);
|
1509 |
+
|
1510 |
+
$this->add_group_control(
|
1511 |
+
Group_Control_Box_Shadow::get_type(),
|
1512 |
+
array(
|
1513 |
+
'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
|
1514 |
+
'name' => 'premium_modal_box_selector_box_shadow_hover',
|
1515 |
+
'selector' => '{{WRAPPER}} .premium-modal-trigger-btn:hover, {{WRAPPER}} .premium-modal-trigger-text:hover, {{WRAPPER}} .premium-modal-trigger-img:hover',
|
1516 |
+
'condition' => array(
|
1517 |
+
'premium_modal_box_display_on' => array( 'button', 'text', 'image' ),
|
1518 |
+
),
|
1519 |
+
)
|
1520 |
+
);
|
1521 |
+
|
1522 |
+
$this->end_controls_tab();
|
1523 |
+
|
1524 |
+
$this->end_controls_tabs();
|
1525 |
+
|
1526 |
+
$this->add_responsive_control(
|
1527 |
+
'premium_modal_box_selector_padding',
|
1528 |
+
array(
|
1529 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
1530 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1531 |
+
'size_units' => array( 'px', 'em', '%' ),
|
1532 |
+
'separator' => 'before',
|
1533 |
+
'selectors' => array(
|
1534 |
+
'{{WRAPPER}} .premium-modal-trigger-btn, {{WRAPPER}} .premium-modal-trigger-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
1535 |
+
),
|
1536 |
+
'condition' => array(
|
1537 |
+
'premium_modal_box_display_on' => array( 'button', 'text' ),
|
1538 |
+
),
|
1539 |
+
)
|
1540 |
+
);
|
1541 |
+
|
1542 |
+
$this->end_controls_section();
|
1543 |
+
|
1544 |
+
$this->start_controls_section(
|
1545 |
+
'premium_modal_box_header_settings',
|
1546 |
+
array(
|
1547 |
+
'label' => __( 'Header', 'premium-addons-for-elementor' ),
|
1548 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1549 |
+
'condition' => array(
|
1550 |
+
'premium_modal_box_header_switcher' => 'yes',
|
1551 |
+
),
|
1552 |
+
)
|
1553 |
+
);
|
1554 |
+
|
1555 |
+
$this->add_control(
|
1556 |
+
'premium_modal_box_header_text_color',
|
1557 |
+
array(
|
1558 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1559 |
+
'type' => Controls_Manager::COLOR,
|
1560 |
+
'selectors' => array(
|
1561 |
+
'{{WRAPPER}} .premium-modal-box-modal-title' => 'color: {{VALUE}}',
|
1562 |
+
'{{WRAPPER}} .premium-modal-box-modal-title svg' => 'fill: {{VALUE}}',
|
1563 |
+
),
|
1564 |
+
)
|
1565 |
+
);
|
1566 |
+
|
1567 |
+
$this->add_group_control(
|
1568 |
+
Group_Control_Typography::get_type(),
|
1569 |
+
array(
|
1570 |
+
'name' => 'headertext',
|
1571 |
+
'global' => array(
|
1572 |
+
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
|
1573 |
+
),
|
1574 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-title',
|
1575 |
+
)
|
1576 |
+
);
|
1577 |
+
|
1578 |
+
$this->add_control(
|
1579 |
+
'premium_modal_box_header_background',
|
1580 |
+
array(
|
1581 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1582 |
+
'type' => Controls_Manager::COLOR,
|
1583 |
+
'selectors' => array(
|
1584 |
+
'{{WRAPPER}} .premium-modal-box-modal-header' => 'background: {{VALUE}};',
|
1585 |
+
),
|
1586 |
+
)
|
1587 |
+
);
|
1588 |
+
|
1589 |
+
$this->add_group_control(
|
1590 |
+
Group_Control_Border::get_type(),
|
1591 |
+
array(
|
1592 |
+
'name' => 'premium_modal_header_border',
|
1593 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-header',
|
1594 |
+
)
|
1595 |
+
);
|
1596 |
+
|
1597 |
+
$this->end_controls_section();
|
1598 |
+
|
1599 |
+
$this->start_controls_section(
|
1600 |
+
'premium_modal_box_upper_close_button_section',
|
1601 |
+
array(
|
1602 |
+
'label' => __( 'Upper Close Button', 'premium-addons-for-elementor' ),
|
1603 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1604 |
+
'condition' => array(
|
1605 |
+
'premium_modal_box_upper_close' => 'yes',
|
1606 |
+
'premium_modal_box_header_switcher' => 'yes',
|
1607 |
+
),
|
1608 |
+
)
|
1609 |
+
);
|
1610 |
+
|
1611 |
+
$this->add_responsive_control(
|
1612 |
+
'premium_modal_box_upper_close_button_size',
|
1613 |
+
array(
|
1614 |
+
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
1615 |
+
'type' => Controls_Manager::SLIDER,
|
1616 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1617 |
+
'selectors' => array(
|
1618 |
+
'{{WRAPPER}} .premium-modal-box-modal-header button' => 'font-size: {{SIZE}}{{UNIT}};',
|
1619 |
+
),
|
1620 |
+
)
|
1621 |
+
);
|
1622 |
+
|
1623 |
+
$this->start_controls_tabs( 'premium_modal_box_upper_close_button_style' );
|
1624 |
+
|
1625 |
+
$this->start_controls_tab(
|
1626 |
+
'premium_modal_box_upper_close_button_normal',
|
1627 |
+
array(
|
1628 |
+
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
1629 |
+
)
|
1630 |
+
);
|
1631 |
+
|
1632 |
+
$this->add_control(
|
1633 |
+
'premium_modal_box_upper_close_button_normal_color',
|
1634 |
+
array(
|
1635 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1636 |
+
'type' => Controls_Manager::COLOR,
|
1637 |
+
'selectors' => array(
|
1638 |
+
'{{WRAPPER}} .premium-modal-box-modal-close' => 'color: {{VALUE}};',
|
1639 |
+
),
|
1640 |
+
)
|
1641 |
+
);
|
1642 |
+
|
1643 |
+
$this->add_control(
|
1644 |
+
'premium_modal_box_upper_close_button_background_color',
|
1645 |
+
array(
|
1646 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1647 |
+
'type' => Controls_Manager::COLOR,
|
1648 |
+
'selectors' => array(
|
1649 |
+
'{{WRAPPER}} .premium-modal-box-modal-close' => 'background:{{VALUE}};',
|
1650 |
+
),
|
1651 |
+
)
|
1652 |
+
);
|
1653 |
+
|
1654 |
+
$this->add_group_control(
|
1655 |
+
Group_Control_Border::get_type(),
|
1656 |
+
array(
|
1657 |
+
'name' => 'premium_modal_upper_border',
|
1658 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-close',
|
1659 |
+
)
|
1660 |
+
);
|
1661 |
+
|
1662 |
+
$this->add_control(
|
1663 |
+
'premium_modal_upper_border_radius',
|
1664 |
+
array(
|
1665 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1666 |
+
'type' => Controls_Manager::SLIDER,
|
1667 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1668 |
+
'selectors' => array(
|
1669 |
+
'{{WRAPPER}} .premium-modal-box-modal-close' => 'border-radius:{{SIZE}}{{UNIT}};',
|
1670 |
+
),
|
1671 |
+
'separator' => 'after',
|
1672 |
+
)
|
1673 |
+
);
|
1674 |
+
|
1675 |
+
$this->end_controls_tab();
|
1676 |
+
|
1677 |
+
$this->start_controls_tab(
|
1678 |
+
'premium_modal_box_upper_close_button_hover',
|
1679 |
+
array(
|
1680 |
+
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1681 |
+
)
|
1682 |
+
);
|
1683 |
+
|
1684 |
+
$this->add_control(
|
1685 |
+
'premium_modal_box_upper_close_button_hover_color',
|
1686 |
+
array(
|
1687 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1688 |
+
'type' => Controls_Manager::COLOR,
|
1689 |
+
'selectors' => array(
|
1690 |
+
'{{WRAPPER}} .premium-modal-box-modal-close:hover' => 'color: {{VALUE}};',
|
1691 |
+
),
|
1692 |
+
)
|
1693 |
+
);
|
1694 |
+
|
1695 |
+
$this->add_control(
|
1696 |
+
'premium_modal_box_upper_close_button_background_color_hover',
|
1697 |
+
array(
|
1698 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1699 |
+
'type' => Controls_Manager::COLOR,
|
1700 |
+
'selectors' => array(
|
1701 |
+
'{{WRAPPER}} .premium-modal-box-modal-close:hover' => 'background:{{VALUE}};',
|
1702 |
+
),
|
1703 |
+
)
|
1704 |
+
);
|
1705 |
+
|
1706 |
+
$this->add_group_control(
|
1707 |
+
Group_Control_Border::get_type(),
|
1708 |
+
array(
|
1709 |
+
'name' => 'premium_modal_upper_border_hover',
|
1710 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-close:hover',
|
1711 |
+
)
|
1712 |
+
);
|
1713 |
+
|
1714 |
+
$this->add_control(
|
1715 |
+
'premium_modal_upper_border_radius_hover',
|
1716 |
+
array(
|
1717 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1718 |
+
'type' => Controls_Manager::SLIDER,
|
1719 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1720 |
+
'selectors' => array(
|
1721 |
+
'{{WRAPPER}} .premium-modal-box-modal-close:hover' => 'border-radius:{{SIZE}}{{UNIT}};',
|
1722 |
+
),
|
1723 |
+
'separator' => 'after',
|
1724 |
+
)
|
1725 |
+
);
|
1726 |
+
|
1727 |
+
$this->end_controls_tab();
|
1728 |
+
|
1729 |
+
$this->end_controls_tabs();
|
1730 |
+
|
1731 |
+
$this->add_responsive_control(
|
1732 |
+
'premium_modal_box_upper_close_button_padding',
|
1733 |
+
array(
|
1734 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
1735 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1736 |
+
'size_units' => array( 'px', 'em', '%' ),
|
1737 |
+
'selectors' => array(
|
1738 |
+
'{{WRAPPER}} .premium-modal-box-modal-close' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
1739 |
+
),
|
1740 |
+
)
|
1741 |
+
);
|
1742 |
+
|
1743 |
+
$this->end_controls_section();
|
1744 |
+
|
1745 |
+
$this->start_controls_section(
|
1746 |
+
'premium_modal_box_lower_close_button_section',
|
1747 |
+
array(
|
1748 |
+
'label' => __( 'Lower Close Button', 'premium-addons-for-elementor' ),
|
1749 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1750 |
+
'condition' => array(
|
1751 |
+
'premium_modal_box_lower_close' => 'yes',
|
1752 |
+
),
|
1753 |
+
)
|
1754 |
+
);
|
1755 |
+
|
1756 |
+
$this->add_group_control(
|
1757 |
+
Group_Control_Typography::get_type(),
|
1758 |
+
array(
|
1759 |
+
'name' => 'lowerclose',
|
1760 |
+
'global' => array(
|
1761 |
+
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
|
1762 |
+
),
|
1763 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-lower-close',
|
1764 |
+
)
|
1765 |
+
);
|
1766 |
+
|
1767 |
+
$this->add_responsive_control(
|
1768 |
+
'premium_modal_box_lower_close_button_width',
|
1769 |
+
array(
|
1770 |
+
'label' => __( 'Width', 'premium-addons-for-elementor' ),
|
1771 |
+
'type' => Controls_Manager::SLIDER,
|
1772 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1773 |
+
'range' => array(
|
1774 |
+
'px' => array(
|
1775 |
+
'min' => 1,
|
1776 |
+
'max' => 500,
|
1777 |
+
),
|
1778 |
+
'em' => array(
|
1779 |
+
'min' => 1,
|
1780 |
+
'max' => 30,
|
1781 |
+
),
|
1782 |
+
),
|
1783 |
+
'selectors' => array(
|
1784 |
+
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'min-width: {{SIZE}}{{UNIT}};',
|
1785 |
+
),
|
1786 |
+
)
|
1787 |
+
);
|
1788 |
+
|
1789 |
+
$this->start_controls_tabs( 'premium_modal_box_lower_close_button_style' );
|
1790 |
+
|
1791 |
+
$this->start_controls_tab(
|
1792 |
+
'premium_modal_box_lower_close_button_normal',
|
1793 |
+
array(
|
1794 |
+
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
1795 |
+
)
|
1796 |
+
);
|
1797 |
+
|
1798 |
+
$this->add_control(
|
1799 |
+
'premium_modal_box_lower_close_button_normal_color',
|
1800 |
+
array(
|
1801 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1802 |
+
'type' => Controls_Manager::COLOR,
|
1803 |
+
'global' => array(
|
1804 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
1805 |
+
),
|
1806 |
+
'selectors' => array(
|
1807 |
+
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'color: {{VALUE}};',
|
1808 |
+
),
|
1809 |
+
)
|
1810 |
+
);
|
1811 |
+
|
1812 |
+
$this->add_control(
|
1813 |
+
'premium_modal_box_lower_close_button_background_normal_color',
|
1814 |
+
array(
|
1815 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1816 |
+
'type' => Controls_Manager::COLOR,
|
1817 |
+
'global' => array(
|
1818 |
+
'default' => Global_Colors::COLOR_PRIMARY,
|
1819 |
+
),
|
1820 |
+
'selectors' => array(
|
1821 |
+
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'background-color: {{VALUE}};',
|
1822 |
+
),
|
1823 |
+
)
|
1824 |
+
);
|
1825 |
+
|
1826 |
+
$this->add_group_control(
|
1827 |
+
Group_Control_Border::get_type(),
|
1828 |
+
array(
|
1829 |
+
'name' => 'premium_modal_box_lower_close_border',
|
1830 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-lower-close',
|
1831 |
+
)
|
1832 |
+
);
|
1833 |
+
|
1834 |
+
$this->add_control(
|
1835 |
+
'premium_modal_box_lower_close_border_radius',
|
1836 |
+
array(
|
1837 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1838 |
+
'type' => Controls_Manager::SLIDER,
|
1839 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1840 |
+
'selectors' => array(
|
1841 |
+
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'border-radius: {{SIZE}}{{UNIT}};',
|
1842 |
+
),
|
1843 |
+
'separator' => 'after',
|
1844 |
+
)
|
1845 |
+
);
|
1846 |
+
|
1847 |
+
$this->end_controls_tab();
|
1848 |
+
|
1849 |
+
$this->start_controls_tab(
|
1850 |
+
'premium_modal_box_lower_close_button_hover',
|
1851 |
+
array(
|
1852 |
+
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1853 |
+
)
|
1854 |
+
);
|
1855 |
+
|
1856 |
+
$this->add_control(
|
1857 |
+
'premium_modal_box_lower_close_button_hover_color',
|
1858 |
+
array(
|
1859 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1860 |
+
'type' => Controls_Manager::COLOR,
|
1861 |
+
'global' => array(
|
1862 |
+
'default' => Global_Colors::COLOR_PRIMARY,
|
1863 |
+
),
|
1864 |
+
'selectors' => array(
|
1865 |
+
'{{WRAPPER}} .premium-modal-box-modal-lower-close:hover' => 'color: {{VALUE}};',
|
1866 |
+
),
|
1867 |
+
)
|
1868 |
+
);
|
1869 |
+
|
1870 |
+
$this->add_control(
|
1871 |
+
'premium_modal_box_lower_close_button_background_hover_color',
|
1872 |
+
array(
|
1873 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
1874 |
+
'type' => Controls_Manager::COLOR,
|
1875 |
+
'global' => array(
|
1876 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
1877 |
+
),
|
1878 |
+
'selectors' => array(
|
1879 |
+
'{{WRAPPER}} .premium-modal-box-modal-lower-close:hover' => 'background-color: {{VALUE}};',
|
1880 |
+
),
|
1881 |
+
)
|
1882 |
+
);
|
1883 |
+
|
1884 |
+
$this->add_group_control(
|
1885 |
+
Group_Control_Border::get_type(),
|
1886 |
+
array(
|
1887 |
+
'name' => 'premium_modal_box_lower_close_border_hover',
|
1888 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-lower-close:hover',
|
1889 |
+
)
|
1890 |
+
);
|
1891 |
+
|
1892 |
+
$this->add_control(
|
1893 |
+
'premium_modal_box_lower_close_border_radius_hover',
|
1894 |
+
array(
|
1895 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
1896 |
+
'type' => Controls_Manager::SLIDER,
|
1897 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1898 |
+
'selectors' => array(
|
1899 |
+
'{{WRAPPER}} .premium-modal-box-modal-lower-close:hover' => 'border-radius: {{SIZE}}{{UNIT}};',
|
1900 |
+
),
|
1901 |
+
'separator' => 'after',
|
1902 |
+
)
|
1903 |
+
);
|
1904 |
+
|
1905 |
+
$this->end_controls_tab();
|
1906 |
+
|
1907 |
+
$this->end_controls_tabs();
|
1908 |
+
|
1909 |
+
$this->add_responsive_control(
|
1910 |
+
'premium_modal_box_lower_close_button_padding',
|
1911 |
+
array(
|
1912 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
1913 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1914 |
+
'size_units' => array( 'px', 'em', '%' ),
|
1915 |
+
'selectors' => array(
|
1916 |
+
'{{WRAPPER}} .premium-modal-box-modal-lower-close' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
1917 |
+
),
|
1918 |
+
)
|
1919 |
+
);
|
1920 |
+
|
1921 |
+
$this->end_controls_section();
|
1922 |
+
|
1923 |
+
$this->start_controls_section(
|
1924 |
+
'premium_modal_box_style',
|
1925 |
+
array(
|
1926 |
+
'label' => __( 'Modal Box', 'premium-addons-for-elementor' ),
|
1927 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1928 |
+
)
|
1929 |
+
);
|
1930 |
+
|
1931 |
+
$this->add_control(
|
1932 |
+
'text_content_color',
|
1933 |
+
array(
|
1934 |
+
'label' => __( 'Text Color', 'premium-addons-for-elementor' ),
|
1935 |
+
'type' => Controls_Manager::COLOR,
|
1936 |
+
'selectors' => array(
|
1937 |
+
'{{WRAPPER}} .premium-modal-box-modal-body' => 'color: {{VALUE}}',
|
1938 |
+
),
|
1939 |
+
'condition' => array(
|
1940 |
+
'premium_modal_box_content_type' => 'editor',
|
1941 |
+
),
|
1942 |
+
)
|
1943 |
+
);
|
1944 |
+
|
1945 |
+
$this->add_group_control(
|
1946 |
+
Group_Control_Typography::get_type(),
|
1947 |
+
array(
|
1948 |
+
'name' => 'content_typography',
|
1949 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-body',
|
1950 |
+
'condition' => array(
|
1951 |
+
'premium_modal_box_content_type' => 'editor',
|
1952 |
+
),
|
1953 |
+
)
|
1954 |
+
);
|
1955 |
+
|
1956 |
+
$this->add_control(
|
1957 |
+
'premium_modal_box_content_background',
|
1958 |
+
array(
|
1959 |
+
'label' => __( 'Content Background Color', 'premium-addons-for-elementor' ),
|
1960 |
+
'type' => Controls_Manager::COLOR,
|
1961 |
+
'selectors' => array(
|
1962 |
+
'{{WRAPPER}} .premium-modal-box-modal-body' => 'background: {{VALUE}};',
|
1963 |
+
),
|
1964 |
+
)
|
1965 |
+
);
|
1966 |
+
|
1967 |
+
$this->add_responsive_control(
|
1968 |
+
'premium_modal_box_modal_size',
|
1969 |
+
array(
|
1970 |
+
'label' => __( 'Width', 'premium-addons-for-elementor' ),
|
1971 |
+
'type' => Controls_Manager::SLIDER,
|
1972 |
+
'size_units' => array( 'px', '%', 'em' ),
|
1973 |
+
'range' => array(
|
1974 |
+
'px' => array(
|
1975 |
+
'min' => 50,
|
1976 |
+
'max' => 1500,
|
1977 |
+
),
|
1978 |
+
'em' => array(
|
1979 |
+
'min' => 1,
|
1980 |
+
'max' => 50,
|
1981 |
+
),
|
1982 |
+
),
|
1983 |
+
'separator' => 'before',
|
1984 |
+
'label_block' => true,
|
1985 |
+
'selectors' => array(
|
1986 |
+
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'width: {{SIZE}}{{UNIT}};',
|
1987 |
+
),
|
1988 |
+
)
|
1989 |
+
);
|
1990 |
+
|
1991 |
+
$this->add_responsive_control(
|
1992 |
+
'premium_modal_box_modal_max_height',
|
1993 |
+
array(
|
1994 |
+
'label' => __( 'Max Height', 'premium-addons-for-elementor' ),
|
1995 |
+
'type' => Controls_Manager::SLIDER,
|
1996 |
+
'size_units' => array( 'px', 'em', 'vh' ),
|
1997 |
+
'range' => array(
|
1998 |
+
'px' => array(
|
1999 |
+
'min' => 50,
|
2000 |
+
'max' => 1500,
|
2001 |
+
),
|
2002 |
+
'em' => array(
|
2003 |
+
'min' => 1,
|
2004 |
+
'max' => 50,
|
2005 |
+
),
|
2006 |
+
),
|
2007 |
+
'label_block' => true,
|
2008 |
+
'selectors' => array(
|
2009 |
+
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'max-height: {{SIZE}}{{UNIT}};',
|
2010 |
+
),
|
2011 |
+
)
|
2012 |
+
);
|
2013 |
+
|
2014 |
+
$this->add_responsive_control(
|
2015 |
+
'content_overflow',
|
2016 |
+
array(
|
2017 |
+
'label' => __( 'Overflow', 'premium-addons-for-elementor' ),
|
2018 |
+
'type' => Controls_Manager::SELECT,
|
2019 |
+
'options' => array(
|
2020 |
+
'auto' => __( 'Auto', 'premium-addons-for-elementor' ),
|
2021 |
+
'visible' => __( 'Visible', 'premium-addons-for-elementor' ),
|
2022 |
+
'hidden' => __( 'Hidden', 'premium-addons-for-elementor' ),
|
2023 |
+
'scroll' => __( 'Scroll', 'premium-addons-for-elementor' ),
|
2024 |
+
),
|
2025 |
+
'default' => 'auto',
|
2026 |
+
'selectors' => array(
|
2027 |
+
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'overflow: {{VALUE}}',
|
2028 |
+
),
|
2029 |
+
)
|
2030 |
+
);
|
2031 |
+
|
2032 |
+
$this->add_group_control(
|
2033 |
+
Group_Control_Background::get_type(),
|
2034 |
+
array(
|
2035 |
+
'name' => 'premium_modal_box_modal_background',
|
2036 |
+
'types' => array( 'classic', 'gradient' ),
|
2037 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal',
|
2038 |
+
)
|
2039 |
+
);
|
2040 |
+
|
2041 |
+
$this->add_control(
|
2042 |
+
'premium_modal_box_footer_background',
|
2043 |
+
array(
|
2044 |
+
'label' => __( 'Footer Background Color', 'premium-addons-for-elementor' ),
|
2045 |
+
'type' => Controls_Manager::COLOR,
|
2046 |
+
'selectors' => array(
|
2047 |
+
'{{WRAPPER}} .premium-modal-box-modal-footer' => 'background: {{VALUE}};',
|
2048 |
+
),
|
2049 |
+
)
|
2050 |
+
);
|
2051 |
+
|
2052 |
+
$this->add_group_control(
|
2053 |
+
Group_Control_Border::get_type(),
|
2054 |
+
array(
|
2055 |
+
'name' => 'contentborder',
|
2056 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-dialog',
|
2057 |
+
)
|
2058 |
+
);
|
2059 |
+
|
2060 |
+
$this->add_control(
|
2061 |
+
'premium_modal_box_border_radius',
|
2062 |
+
array(
|
2063 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2064 |
+
'type' => Controls_Manager::SLIDER,
|
2065 |
+
'size_units' => array( 'px', '%', 'em' ),
|
2066 |
+
'selectors' => array(
|
2067 |
+
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'border-radius: {{SIZE}}{{UNIT}};',
|
2068 |
+
),
|
2069 |
+
)
|
2070 |
+
);
|
2071 |
+
|
2072 |
+
$this->add_group_control(
|
2073 |
+
Group_Control_Box_Shadow::get_type(),
|
2074 |
+
array(
|
2075 |
+
'name' => 'premium_modal_box_shadow',
|
2076 |
+
'selector' => '{{WRAPPER}} .premium-modal-box-modal-dialog',
|
2077 |
+
)
|
2078 |
+
);
|
2079 |
+
|
2080 |
+
$this->add_responsive_control(
|
2081 |
+
'premium_modal_box_margin',
|
2082 |
+
array(
|
2083 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2084 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2085 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2086 |
+
'selectors' => array(
|
2087 |
+
'{{WRAPPER}} .premium-modal-box-modal-dialog' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2088 |
+
),
|
2089 |
+
)
|
2090 |
+
);
|
2091 |
+
|
2092 |
+
$this->add_responsive_control(
|
2093 |
+
'premium_modal_box_padding',
|
2094 |
+
array(
|
2095 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2096 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2097 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2098 |
+
'selectors' => array(
|
2099 |
+
'{{WRAPPER}} .premium-modal-box-modal-body' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2100 |
+
),
|
2101 |
+
)
|
2102 |
+
);
|
2103 |
+
|
2104 |
+
$this->end_controls_section();
|
2105 |
+
}
|
2106 |
+
|
2107 |
+
|
2108 |
+
/**
|
2109 |
+
* Render Header Icon
|
2110 |
+
*
|
2111 |
+
* Render HTML markup for modal header icon.
|
2112 |
+
*
|
2113 |
+
* @since 1.0.0
|
2114 |
+
* @access public
|
2115 |
+
*
|
2116 |
+
* @param boolean $new new icon.
|
2117 |
+
* @param boolean $migrate icon migrated.
|
2118 |
+
*/
|
2119 |
+
protected function render_header_icon( $new, $migrate ) {
|
2120 |
+
|
2121 |
+
$settings = $this->get_settings_for_display();
|
2122 |
+
|
2123 |
+
$header_icon = $settings['premium_modal_box_icon_selection'];
|
2124 |
+
|
2125 |
+
if ( 'fonticon' === $header_icon ) {
|
2126 |
+
if ( $new || $migrate ) :
|
2127 |
+
Icons_Manager::render_icon( $settings['premium_modal_box_font_icon_updated'], array( 'aria-hidden' => 'true' ) );
|
2128 |
+
else : ?>
|
2129 |
+
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_icon' ) ); ?>></i>
|
2130 |
+
<?php
|
2131 |
+
endif;
|
2132 |
+
} elseif ( 'image' === $header_icon ) {
|
2133 |
+
?>
|
2134 |
+
<img <?php echo wp_kses_post( $this->get_render_attribute_string( 'title_icon' ) ); ?>>
|
2135 |
+
<?php
|
2136 |
+
} elseif ( 'animation' === $header_icon ) {
|
2137 |
+
$this->add_render_attribute(
|
2138 |
+
'header_lottie',
|
2139 |
+
array(
|
2140 |
+
'class' => array(
|
2141 |
+
'premium-modal-header-lottie',
|
2142 |
+
'premium-lottie-animation',
|
2143 |
+
),
|
2144 |
+
'data-lottie-url' => $settings['header_lottie_url'],
|
2145 |
+
'data-lottie-loop' => $settings['header_lottie_loop'],
|
2146 |
+
'data-lottie-reverse' => $settings['header_lottie_reverse'],
|
2147 |
+
)
|
2148 |
+
);
|
2149 |
+
?>
|
2150 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'header_lottie' ) ); ?>></div>
|
2151 |
+
<?php
|
2152 |
+
}
|
2153 |
+
}
|
2154 |
+
|
2155 |
+
/**
|
2156 |
+
* Render Modal Box widget output on the frontend.
|
2157 |
+
*
|
2158 |
+
* Written in PHP and used to generate the final HTML.
|
2159 |
+
*
|
2160 |
+
* @since 1.0.0
|
2161 |
+
* @access protected
|
2162 |
+
*/
|
2163 |
+
protected function render() {
|
2164 |
+
|
2165 |
+
$settings = $this->get_settings_for_display();
|
2166 |
+
|
2167 |
+
$trigger = $settings['premium_modal_box_display_on'];
|
2168 |
+
|
2169 |
+
$this->add_inline_editing_attributes( 'premium_modal_box_selector_text' );
|
2170 |
+
|
2171 |
+
$this->add_render_attribute(
|
2172 |
+
'trigger',
|
2173 |
+
array(
|
2174 |
+
'data-toggle' => 'premium-modal',
|
2175 |
+
'data-target' => '#premium-modal-' . $this->get_id(),
|
2176 |
+
)
|
2177 |
+
);
|
2178 |
+
|
2179 |
+
if ( 'button' === $trigger ) {
|
2180 |
+
|
2181 |
+
$icon_type = $settings['icon_type'];
|
2182 |
+
|
2183 |
+
if ( 'icon' === $icon_type ) {
|
2184 |
+
|
2185 |
+
if ( ! empty( $settings['premium_modal_box_button_icon_selection'] ) ) {
|
2186 |
+
$this->add_render_attribute(
|
2187 |
+
'icon',
|
2188 |
+
array(
|
2189 |
+
'class' => $settings['premium_modal_box_button_icon_selection'],
|
2190 |
+
'aria-hidden' => 'true',
|
2191 |
+
)
|
2192 |
+
);
|
2193 |
+
}
|
2194 |
+
|
2195 |
+
$migrated = isset( $settings['__fa4_migrated']['premium_modal_box_button_icon_selection_updated'] );
|
2196 |
+
$is_new = empty( $settings['premium_modal_box_button_icon_selection'] ) && Icons_Manager::is_migration_allowed();
|
2197 |
+
|
2198 |
+
}
|
2199 |
+
|
2200 |
+
if ( 'yes' === $settings['draw_svg'] ) {
|
2201 |
+
|
2202 |
+
$this->add_render_attribute(
|
2203 |
+
'modal',
|
2204 |
+
'class',
|
2205 |
+
array(
|
2206 |
+
'elementor-invisible',
|
2207 |
+
'premium-drawer-hover',
|
2208 |
+
)
|
2209 |
+
);
|
2210 |
+
|
2211 |
+
if ( 'icon' === $icon_type ) {
|
2212 |
+
|
2213 |
+
$this->add_render_attribute( 'icon', 'class', $settings['premium_modal_box_button_icon_selection_updated']['value'] );
|
2214 |
+
|
2215 |
+
}
|
2216 |
+
|
2217 |
+
$this->add_render_attribute(
|
2218 |
+
'icon',
|
2219 |
+
array(
|
2220 |
+
'class' => 'premium-svg-drawer',
|
2221 |
+
'data-svg-reverse' => $settings['svg_reverse'],
|
2222 |
+
'data-svg-loop' => $settings['svg_loop'],
|
2223 |
+
'data-svg-sync' => $settings['svg_sync'],
|
2224 |
+
'data-svg-hover' => $settings['svg_hover'],
|
2225 |
+
'data-svg-fill' => $settings['svg_color'],
|
2226 |
+
'data-svg-frames' => $settings['frames'],
|
2227 |
+
'data-svg-yoyo' => $settings['svg_yoyo'],
|
2228 |
+
'data-svg-point' => $settings['svg_reverse'] ? $settings['end_point']['size'] : $settings['start_point']['size'],
|
2229 |
+
)
|
2230 |
+
);
|
2231 |
+
|
2232 |
+
} else {
|
2233 |
+
$this->add_render_attribute( 'icon', 'class', 'premium-svg-nodraw' );
|
2234 |
+
}
|
2235 |
+
|
2236 |
+
$this->add_render_attribute(
|
2237 |
+
'trigger',
|
2238 |
+
array(
|
2239 |
+
'type' => 'button',
|
2240 |
+
'class' => array(
|
2241 |
+
'premium-modal-trigger-btn',
|
2242 |
+
'premium-btn-' . $settings['premium_modal_box_button_size'],
|
2243 |
+
),
|
2244 |
+
)
|
2245 |
+
);
|
2246 |
+
|
2247 |
+
} elseif ( 'image' === $trigger ) {
|
2248 |
+
|
2249 |
+
$alt = Control_Media::get_image_alt( $settings['premium_modal_box_image_src'] );
|
2250 |
+
|
2251 |
+
$this->add_render_attribute(
|
2252 |
+
'trigger',
|
2253 |
+
array(
|
2254 |
+
'class' => 'premium-modal-trigger-img',
|
2255 |
+
'src' => $settings['premium_modal_box_image_src']['url'],
|
2256 |
+
'alt' => $alt,
|
2257 |
+
)
|
2258 |
+
);
|
2259 |
+
|
2260 |
+
} elseif ( 'text' === $trigger ) {
|
2261 |
+
$this->add_render_attribute( 'trigger', 'class', 'premium-modal-trigger-text' );
|
2262 |
+
} elseif ( 'animation' === $trigger ) {
|
2263 |
+
|
2264 |
+
$this->add_render_attribute(
|
2265 |
+
'trigger',
|
2266 |
+
array(
|
2267 |
+
'class' => array(
|
2268 |
+
'premium-modal-trigger-animation',
|
2269 |
+
'premium-lottie-animation',
|
2270 |
+
),
|
2271 |
+
'data-lottie-url' => $settings['lottie_url'],
|
2272 |
+
'data-lottie-loop' => $settings['lottie_loop'],
|
2273 |
+
'data-lottie-reverse' => $settings['lottie_reverse'],
|
2274 |
+
'data-lottie-hover' => $settings['lottie_hover'],
|
2275 |
+
)
|
2276 |
+
);
|
2277 |
+
|
2278 |
+
}
|
2279 |
+
|
2280 |
+
if ( 'template' === $settings['premium_modal_box_content_type'] ) {
|
2281 |
+
$template = empty( $settings['premium_modal_box_content_temp'] ) ? $settings['live_temp_content'] : $settings['premium_modal_box_content_temp'];
|
2282 |
+
}
|
2283 |
+
|
2284 |
+
if ( 'yes' === $settings['premium_modal_box_header_switcher'] ) {
|
2285 |
+
|
2286 |
+
$header_icon = $settings['premium_modal_box_icon_selection'];
|
2287 |
+
|
2288 |
+
$header_migrated = false;
|
2289 |
+
$header_new = false;
|
2290 |
+
|
2291 |
+
if ( 'fonticon' === $header_icon ) {
|
2292 |
+
|
2293 |
+
if ( ! empty( $settings['premium_modal_box_font_icon'] ) ) {
|
2294 |
+
$this->add_render_attribute(
|
2295 |
+
'title_icon',
|
2296 |
+
array(
|
2297 |
+
'class' => $settings['premium_modal_box_font_icon'],
|
2298 |
+
'aria-hidden' => 'true',
|
2299 |
+
)
|
2300 |
+
);
|
2301 |
+
}
|
2302 |
+
|
2303 |
+
$header_migrated = isset( $settings['__fa4_migrated']['premium_modal_box_font_icon_updated'] );
|
2304 |
+
$header_new = empty( $settings['premium_modal_box_font_icon'] ) && Icons_Manager::is_migration_allowed();
|
2305 |
+
} elseif ( 'image' === $header_icon ) {
|
2306 |
+
|
2307 |
+
$alt = Control_Media::get_image_alt( $settings['premium_modal_box_image_icon'] );
|
2308 |
+
|
2309 |
+
$this->add_render_attribute(
|
2310 |
+
'title_icon',
|
2311 |
+
array(
|
2312 |
+
'src' => $settings['premium_modal_box_image_icon']['url'],
|
2313 |
+
'alt' => $alt,
|
2314 |
+
)
|
2315 |
+
);
|
2316 |
+
|
2317 |
+
}
|
2318 |
+
}
|
2319 |
+
|
2320 |
+
$modal_settings = array(
|
2321 |
+
'trigger' => $trigger,
|
2322 |
+
);
|
2323 |
+
|
2324 |
+
if ( 'pageload' === $trigger ) {
|
2325 |
+
$modal_settings['delay'] = $settings['premium_modal_box_popup_delay'];
|
2326 |
+
}
|
2327 |
+
|
2328 |
+
$this->add_render_attribute(
|
2329 |
+
'modal',
|
2330 |
+
array(
|
2331 |
+
'class' => 'premium-modal-box-container',
|
2332 |
+
'data-settings' => wp_json_encode( $modal_settings ),
|
2333 |
+
)
|
2334 |
+
);
|
2335 |
+
|
2336 |
+
$animation_class = $settings['premium_modal_box_animation'];
|
2337 |
+
if ( '' !== $settings['premium_modal_box_animation_duration'] ) {
|
2338 |
+
$animation_dur = 'animated-' . $settings['premium_modal_box_animation_duration'];
|
2339 |
+
} else {
|
2340 |
+
$animation_dur = 'animated-';
|
2341 |
+
}
|
2342 |
+
|
2343 |
+
$this->add_render_attribute(
|
2344 |
+
'dialog',
|
2345 |
+
array(
|
2346 |
+
'class' => 'premium-modal-box-modal-dialog',
|
2347 |
+
'data-delay-animation' => $settings['premium_modal_box_animation_delay'],
|
2348 |
+
'data-modal-animation' => array(
|
2349 |
+
$animation_class,
|
2350 |
+
$animation_dur,
|
2351 |
+
),
|
2352 |
+
)
|
2353 |
+
);
|
2354 |
+
|
2355 |
+
?>
|
2356 |
+
|
2357 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'modal' ) ); ?>>
|
2358 |
+
<div class="premium-modal-trigger-container">
|
2359 |
+
<?php
|
2360 |
+
if ( 'button' === $trigger ) :
|
2361 |
+
?>
|
2362 |
+
<button <?php echo wp_kses_post( $this->get_render_attribute_string( 'trigger' ) ); ?>>
|
2363 |
+
<?php
|
2364 |
+
if ( 'yes' === $settings['premium_modal_box_icon_switcher'] && 'before' === $settings['premium_modal_box_icon_position'] ) :
|
2365 |
+
if ( 'icon' === $icon_type ) :
|
2366 |
+
if ( ( $is_new || $migrated ) && 'yes' !== $settings['draw_svg'] ) :
|
2367 |
+
Icons_Manager::render_icon(
|
2368 |
+
$settings['premium_modal_box_button_icon_selection_updated'],
|
2369 |
+
array(
|
2370 |
+
'class' => 'premium-svg-nodraw',
|
2371 |
+
'aria-hidden' => 'true',
|
2372 |
+
)
|
2373 |
+
);
|
2374 |
+
else :
|
2375 |
+
?>
|
2376 |
+
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>></i>
|
2377 |
+
<?php
|
2378 |
+
endif;
|
2379 |
+
else :
|
2380 |
+
?>
|
2381 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>>
|
2382 |
+
<?php $this->print_unescaped_setting( 'custom_svg' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
2383 |
+
</div>
|
2384 |
+
<?php
|
2385 |
+
endif;
|
2386 |
+
endif;
|
2387 |
+
?>
|
2388 |
+
<span><?php echo wp_kses_post( $settings['premium_modal_box_button_text'] ); ?></span>
|
2389 |
+
<?php
|
2390 |
+
if ( 'yes' === $settings['premium_modal_box_icon_switcher'] && 'after' === $settings['premium_modal_box_icon_position'] ) :
|
2391 |
+
if ( 'icon' === $icon_type ) :
|
2392 |
+
if ( ( $is_new || $migrated ) && 'yes' !== $settings['draw_svg'] ) :
|
2393 |
+
Icons_Manager::render_icon(
|
2394 |
+
$settings['premium_modal_box_button_icon_selection_updated'],
|
2395 |
+
array(
|
2396 |
+
'class' => 'premium-svg-nodraw',
|
2397 |
+
'aria-hidden' => 'true',
|
2398 |
+
)
|
2399 |
+
);
|
2400 |
+
else :
|
2401 |
+
?>
|
2402 |
+
<i <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>></i>
|
2403 |
+
<?php
|
2404 |
+
endif;
|
2405 |
+
else :
|
2406 |
+
?>
|
2407 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'icon' ) ); ?>>
|
2408 |
+
<?php $this->print_unescaped_setting( 'custom_svg' ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped ?>
|
2409 |
+
</div>
|
2410 |
+
<?php
|
2411 |
+
endif;
|
2412 |
+
endif;
|
2413 |
+
?>
|
2414 |
+
</button>
|
2415 |
+
<?php elseif ( 'image' === $trigger ) : ?>
|
2416 |
+
<img <?php echo wp_kses_post( $this->get_render_attribute_string( 'trigger' ) ); ?>>
|
2417 |
+
<?php elseif ( 'text' === $trigger ) : ?>
|
2418 |
+
<span <?php echo wp_kses_post( $this->get_render_attribute_string( 'trigger' ) ); ?>>
|
2419 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'premium_modal_box_selector_text' ) ); ?>>
|
2420 |
+
<?php echo wp_kses_post( $settings['premium_modal_box_selector_text'] ); ?>
|
2421 |
+
</div>
|
2422 |
+
</span>
|
2423 |
+
<?php elseif ( 'animation' === $trigger ) : ?>
|
2424 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'trigger' ) ); ?>></div>
|
2425 |
+
<?php endif; ?>
|
2426 |
+
</div>
|
2427 |
+
|
2428 |
+
<div id="premium-modal-<?php echo esc_attr( $this->get_id() ); ?>" class="premium-modal-box-modal" role="dialog" style="display: none">
|
2429 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'dialog' ) ); ?>>
|
2430 |
+
<?php if ( 'yes' === $settings['premium_modal_box_header_switcher'] ) : ?>
|
2431 |
+
<div class="premium-modal-box-modal-header">
|
2432 |
+
<?php if ( ! empty( $settings['premium_modal_box_title'] ) ) : ?>
|
2433 |
+
<h3 class="premium-modal-box-modal-title">
|
2434 |
+
<?php
|
2435 |
+
$this->render_header_icon( $header_new, $header_migrated );
|
2436 |
+
echo wp_kses_post( $settings['premium_modal_box_title'] );
|
2437 |
+
?>
|
2438 |
+
</h3>
|
2439 |
+
<?php endif; ?>
|
2440 |
+
<?php if ( 'yes' === $settings['premium_modal_box_upper_close'] ) : ?>
|
2441 |
+
<div class="premium-modal-box-close-button-container">
|
2442 |
+
<button type="button" class="premium-modal-box-modal-close" data-dismiss="premium-modal">×</button>
|
2443 |
+
</div>
|
2444 |
+
<?php endif; ?>
|
2445 |
+
</div>
|
2446 |
+
<?php endif; ?>
|
2447 |
+
<div class="premium-modal-box-modal-body">
|
2448 |
+
<?php
|
2449 |
+
if ( 'editor' === $settings['premium_modal_box_content_type'] ) :
|
2450 |
+
echo $this->parse_text_editor( $settings['premium_modal_box_content'] ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
2451 |
+
else :
|
2452 |
+
echo $this->getTemplateInstance()->get_template_content( $template ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
2453 |
+
endif;
|
2454 |
+
?>
|
2455 |
+
</div>
|
2456 |
+
<?php if ( 'yes' === $settings['premium_modal_box_lower_close'] ) : ?>
|
2457 |
+
<div class="premium-modal-box-modal-footer">
|
2458 |
+
<button type="button" class="premium-modal-box-modal-lower-close" data-dismiss="premium-modal">
|
2459 |
+
<?php echo wp_kses_post( $settings['premium_modal_close_text'] ); ?>
|
2460 |
+
</button>
|
2461 |
+
</div>
|
2462 |
+
<?php endif; ?>
|
2463 |
+
</div>
|
2464 |
+
</div>
|
2465 |
+
</div>
|
2466 |
+
|
2467 |
+
<?php
|
2468 |
+
}
|
2469 |
+
}
|
widgets/premium-nav-menu.php
CHANGED
@@ -1,4885 +1,4885 @@
|
|
1 |
-
<?php
|
2 |
-
/**
|
3 |
-
* Premium Nav Menu.
|
4 |
-
*/
|
5 |
-
|
6 |
-
namespace PremiumAddons\Widgets;
|
7 |
-
|
8 |
-
// Elementor Classes.
|
9 |
-
use Elementor\Widget_Base;
|
10 |
-
use Elementor\Utils;
|
11 |
-
use Elementor\Control_Media;
|
12 |
-
use Elementor\Icons_Manager;
|
13 |
-
use Elementor\Repeater;
|
14 |
-
use Elementor\Controls_Manager;
|
15 |
-
use Elementor\Group_Control_Border;
|
16 |
-
use Elementor\Group_Control_Typography;
|
17 |
-
use Elementor\Group_Control_Background;
|
18 |
-
use Elementor\Group_Control_Box_Shadow;
|
19 |
-
use Elementor\Group_Control_Text_Shadow;
|
20 |
-
use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
|
21 |
-
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
|
22 |
-
|
23 |
-
// PremiumAddons Classes.
|
24 |
-
use PremiumAddons\Includes\Helper_Functions;
|
25 |
-
use PremiumAddons\Includes\Pa_Nav_Menu_Walker;
|
26 |
-
use PremiumAddons\Includes\Premium_Template_Tags;
|
27 |
-
|
28 |
-
if ( ! defined( 'ABSPATH' ) ) {
|
29 |
-
exit; // If this file is called directly, abort.
|
30 |
-
}
|
31 |
-
|
32 |
-
/**
|
33 |
-
* Class Premium_Person.
|
34 |
-
*/
|
35 |
-
class Premium_Nav_Menu extends Widget_Base {
|
36 |
-
|
37 |
-
/**
|
38 |
-
* Get Elementor Helper Instance.
|
39 |
-
*
|
40 |
-
* @since 1.0.0
|
41 |
-
* @access public
|
42 |
-
*/
|
43 |
-
public function getTemplateInstance() {
|
44 |
-
$this->template_instance = Premium_Template_Tags::getInstance();
|
45 |
-
return $this->template_instance;
|
46 |
-
}
|
47 |
-
|
48 |
-
/**
|
49 |
-
* Retrieve Widget Name.
|
50 |
-
*
|
51 |
-
* @since 1.0.0
|
52 |
-
* @access public
|
53 |
-
*/
|
54 |
-
public function get_name() {
|
55 |
-
return 'premium-nav-menu';
|
56 |
-
}
|
57 |
-
|
58 |
-
/**
|
59 |
-
* Retrieve Widget Title.
|
60 |
-
*
|
61 |
-
* @since 1.0.0
|
62 |
-
* @access public
|
63 |
-
*/
|
64 |
-
public function get_title() {
|
65 |
-
return __( 'Mega Menu', 'premium-addons-for-elementor' );
|
66 |
-
}
|
67 |
-
|
68 |
-
/**
|
69 |
-
* Retrieve Widget Icon.
|
70 |
-
*
|
71 |
-
* @since 1.0.0
|
72 |
-
* @access public
|
73 |
-
*
|
74 |
-
* @return string widget icon.
|
75 |
-
*/
|
76 |
-
public function get_icon() {
|
77 |
-
return 'pa-mega-menu';
|
78 |
-
}
|
79 |
-
|
80 |
-
/**
|
81 |
-
* Retrieve Widget Dependent CSS.
|
82 |
-
*
|
83 |
-
* @since 1.0.0
|
84 |
-
* @access public
|
85 |
-
*
|
86 |
-
* @return array CSS style handles.
|
87 |
-
*/
|
88 |
-
public function get_style_depends() {
|
89 |
-
return array(
|
90 |
-
'premium-addons',
|
91 |
-
);
|
92 |
-
}
|
93 |
-
|
94 |
-
/**
|
95 |
-
* Retrieve Widget Dependent JS.
|
96 |
-
*
|
97 |
-
* @since 1.0.0
|
98 |
-
* @access public
|
99 |
-
*
|
100 |
-
* @return array JS script handles.
|
101 |
-
*/
|
102 |
-
public function get_script_depends() {
|
103 |
-
return array(
|
104 |
-
'lottie-js',
|
105 |
-
'pa-headroom',
|
106 |
-
'pa-menu',
|
107 |
-
);
|
108 |
-
}
|
109 |
-
|
110 |
-
/**
|
111 |
-
* Retrieve Widget Categories.
|
112 |
-
*
|
113 |
-
* @since 1.5.1
|
114 |
-
* @access public
|
115 |
-
*
|
116 |
-
* @return array Widget categories.
|
117 |
-
*/
|
118 |
-
public function get_categories() {
|
119 |
-
return array( 'premium-elements' );
|
120 |
-
}
|
121 |
-
|
122 |
-
/**
|
123 |
-
* Retrieve Widget Keywords.
|
124 |
-
*
|
125 |
-
* @since 1.0.0
|
126 |
-
* @access public
|
127 |
-
*
|
128 |
-
* @return string Widget keywords.
|
129 |
-
*/
|
130 |
-
public function get_keywords() {
|
131 |
-
return array( 'pa', 'premium', 'menu', 'nav', 'navigation', 'mega menu', 'header' );
|
132 |
-
}
|
133 |
-
|
134 |
-
/**
|
135 |
-
* Retrieve Widget Support URL.
|
136 |
-
*
|
137 |
-
* @access public
|
138 |
-
*
|
139 |
-
* @return string support URL.
|
140 |
-
*/
|
141 |
-
public function get_custom_help_url() {
|
142 |
-
return 'https://premiumaddons.com/support/';
|
143 |
-
}
|
144 |
-
|
145 |
-
/**
|
146 |
-
* Get Menu List.
|
147 |
-
*
|
148 |
-
* @access private
|
149 |
-
* @since 4.9.3
|
150 |
-
*
|
151 |
-
* @return array
|
152 |
-
*/
|
153 |
-
private function get_menu_list() {
|
154 |
-
|
155 |
-
$menus = wp_list_pluck( wp_get_nav_menus(), 'name', 'term_id' ); // term_id >> index key , name >> value of that index.
|
156 |
-
|
157 |
-
return $menus;
|
158 |
-
}
|
159 |
-
|
160 |
-
/**
|
161 |
-
* Register Nav Menu Controls.
|
162 |
-
*
|
163 |
-
* @since 1.0.0
|
164 |
-
* @access protected
|
165 |
-
*/
|
166 |
-
protected function register_controls() {
|
167 |
-
|
168 |
-
$this->get_menu_settings_controls();
|
169 |
-
|
170 |
-
$this->get_menu_content_controls();
|
171 |
-
|
172 |
-
$this->add_random_badges_section( $this );
|
173 |
-
|
174 |
-
$this->add_helpful_docs_section();
|
175 |
-
|
176 |
-
$this->get_menu_style_controls();
|
177 |
-
|
178 |
-
}
|
179 |
-
|
180 |
-
/**
|
181 |
-
* Get menu style controls.
|
182 |
-
*
|
183 |
-
* @access private
|
184 |
-
* @since 4.9.3
|
185 |
-
*/
|
186 |
-
private function get_menu_style_controls() {
|
187 |
-
$this->get_sticky_style();
|
188 |
-
$this->get_ver_toggler_style();
|
189 |
-
$this->get_menu_container_style();
|
190 |
-
$this->get_menu_item_style();
|
191 |
-
$this->get_menu_item_extras();
|
192 |
-
$this->get_submenu_container_style();
|
193 |
-
$this->get_submenu_item_style();
|
194 |
-
$this->get_sub_menu_item_extras();
|
195 |
-
$this->get_toggle_menu_sytle();
|
196 |
-
}
|
197 |
-
|
198 |
-
/**
|
199 |
-
* Get menu content controls.
|
200 |
-
*
|
201 |
-
* @access private
|
202 |
-
* @since 4.9.3
|
203 |
-
*/
|
204 |
-
private function get_menu_settings_controls() {
|
205 |
-
|
206 |
-
$this->start_controls_section(
|
207 |
-
'premium_nav_section',
|
208 |
-
array(
|
209 |
-
'label' => __( 'Menu Settings', 'premium-addons-for-elementor' ),
|
210 |
-
)
|
211 |
-
);
|
212 |
-
|
213 |
-
$this->add_control(
|
214 |
-
'menu_type',
|
215 |
-
array(
|
216 |
-
'label' => __( 'Menu Type', 'premium-addons-for-elementor' ),
|
217 |
-
'type' => Controls_Manager::SELECT,
|
218 |
-
'default' => 'wordpress_menu',
|
219 |
-
'options' => array(
|
220 |
-
'wordpress_menu' => __( 'WordPress Menu', 'premium-addons-for-elementor' ),
|
221 |
-
'custom' => __( 'Custom Menu', 'premium-addons-for-elementor' ),
|
222 |
-
),
|
223 |
-
)
|
224 |
-
);
|
225 |
-
|
226 |
-
$get_pro = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/pro', 'editor-page', 'wp-editor', 'get-pro' );
|
227 |
-
|
228 |
-
$papro_activated = apply_filters( 'papro_activated', false );
|
229 |
-
|
230 |
-
if ( ! $papro_activated ) {
|
231 |
-
$this->add_control(
|
232 |
-
'custom_menu_notice',
|
233 |
-
array(
|
234 |
-
'type' => Controls_Manager::RAW_HTML,
|
235 |
-
'raw' => __( 'Custom Menu can be used in Premium Addons Pro.', 'premium-addons-for-elementor' ) . '<a href="' . esc_url( $get_pro ) . '" target="_blank">' . __( ' Upgrade now!', 'premium-addons-for-elementor' ) . '</a>',
|
236 |
-
'content_classes' => 'papro-upgrade-notice',
|
237 |
-
'condition' => array(
|
238 |
-
'menu_type' => 'custom',
|
239 |
-
),
|
240 |
-
)
|
241 |
-
);
|
242 |
-
}
|
243 |
-
|
244 |
-
$menu_list = $this->get_menu_list();
|
245 |
-
|
246 |
-
if ( ! empty( $menu_list ) ) {
|
247 |
-
|
248 |
-
$this->add_control(
|
249 |
-
'pa_nav_menus',
|
250 |
-
array(
|
251 |
-
'label' => __( 'Menu', 'premium-addons-for-elementor' ),
|
252 |
-
'type' => Controls_Manager::SELECT,
|
253 |
-
'options' => $menu_list,
|
254 |
-
'default' => array_keys( $menu_list )[0],
|
255 |
-
'condition' => array(
|
256 |
-
'menu_type' => 'wordpress_menu',
|
257 |
-
),
|
258 |
-
)
|
259 |
-
);
|
260 |
-
|
261 |
-
} else {
|
262 |
-
$this->add_control(
|
263 |
-
'empty_nav_menu_notice',
|
264 |
-
array(
|
265 |
-
'raw' => '<strong>' . __( 'There are no menus in your site.', 'premium-addons-for-elementor' ) . '</strong><br>' . sprintf( __( 'Go to the <a href="%s" target="_blank">Menus screen</a> to create one.', 'premium-addons-for-elementor' ), admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
|
266 |
-
'type' => Controls_Manager::RAW_HTML,
|
267 |
-
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
268 |
-
'condition' => array(
|
269 |
-
'menu_type' => 'wordpress_menu',
|
270 |
-
),
|
271 |
-
)
|
272 |
-
);
|
273 |
-
}
|
274 |
-
|
275 |
-
if ( $papro_activated ) {
|
276 |
-
$this->add_control(
|
277 |
-
'custom_nav_notice',
|
278 |
-
array(
|
279 |
-
'raw' => __( 'It\'s not recommended to use Elementor Template and Link Submenu Items together under the same menu item', 'premium-addons-for-elemeentor' ),
|
280 |
-
'type' => Controls_Manager::RAW_HTML,
|
281 |
-
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
|
282 |
-
'condition' => array(
|
283 |
-
'menu_type' => 'custom',
|
284 |
-
),
|
285 |
-
)
|
286 |
-
);
|
287 |
-
}
|
288 |
-
|
289 |
-
$repeater = new Repeater();
|
290 |
-
|
291 |
-
$repeater->add_control(
|
292 |
-
'item_type',
|
293 |
-
array(
|
294 |
-
'label' => __( 'Item Type', 'premium-addons-for-elementor' ),
|
295 |
-
'type' => Controls_Manager::SELECT,
|
296 |
-
'default' => 'menu',
|
297 |
-
'options' => array(
|
298 |
-
'menu' => __( 'Menu', 'premium-addons-for-elementor' ),
|
299 |
-
'submenu' => __( 'Submenu', 'premium-addons-for-elementor' ),
|
300 |
-
),
|
301 |
-
)
|
302 |
-
);
|
303 |
-
|
304 |
-
$repeater->add_control(
|
305 |
-
'menu_content_type',
|
306 |
-
array(
|
307 |
-
'label' => __( 'Content Type', 'premium-addons-for-elementor' ),
|
308 |
-
'type' => Controls_Manager::SELECT,
|
309 |
-
'options' => array(
|
310 |
-
'link' => __( 'Link', 'premium-addons-for-elementor' ),
|
311 |
-
'custom_content' => __( 'Elementor Template', 'premium-addons-for-elementor' ),
|
312 |
-
),
|
313 |
-
'default' => 'link',
|
314 |
-
'condition' => array(
|
315 |
-
'item_type' => 'submenu',
|
316 |
-
),
|
317 |
-
)
|
318 |
-
);
|
319 |
-
|
320 |
-
$repeater->add_control(
|
321 |
-
'text',
|
322 |
-
array(
|
323 |
-
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
324 |
-
'type' => Controls_Manager::TEXT,
|
325 |
-
'default' => __( 'Item', 'premium-addons-for-elementor' ),
|
326 |
-
'dynamic' => array(
|
327 |
-
'active' => true,
|
328 |
-
),
|
329 |
-
'conditions' => array(
|
330 |
-
'relation' => 'or',
|
331 |
-
'terms' => array(
|
332 |
-
array(
|
333 |
-
'name' => 'item_type',
|
334 |
-
'operator' => '==',
|
335 |
-
'value' => 'menu',
|
336 |
-
),
|
337 |
-
array(
|
338 |
-
'name' => 'menu_content_type',
|
339 |
-
'operator' => '==',
|
340 |
-
'value' => 'link',
|
341 |
-
),
|
342 |
-
),
|
343 |
-
),
|
344 |
-
)
|
345 |
-
);
|
346 |
-
|
347 |
-
$repeater->add_control(
|
348 |
-
'link',
|
349 |
-
array(
|
350 |
-
'label' => __( 'Link', 'premium-addons-for-elementor' ),
|
351 |
-
'type' => Controls_Manager::URL,
|
352 |
-
'default' => array(
|
353 |
-
'url' => '#',
|
354 |
-
'is_external' => '',
|
355 |
-
),
|
356 |
-
'dynamic' => array(
|
357 |
-
'active' => true,
|
358 |
-
),
|
359 |
-
'conditions' => array(
|
360 |
-
'relation' => 'or',
|
361 |
-
'terms' => array(
|
362 |
-
array(
|
363 |
-
'name' => 'item_type',
|
364 |
-
'operator' => '==',
|
365 |
-
'value' => 'menu',
|
366 |
-
),
|
367 |
-
array(
|
368 |
-
'name' => 'menu_content_type',
|
369 |
-
'operator' => '==',
|
370 |
-
'value' => 'link',
|
371 |
-
),
|
372 |
-
),
|
373 |
-
),
|
374 |
-
)
|
375 |
-
);
|
376 |
-
|
377 |
-
$repeater->add_control(
|
378 |
-
'live_temp_content',
|
379 |
-
array(
|
380 |
-
'label' => __( 'Template Title', 'premium-addons-for-elementor' ),
|
381 |
-
'type' => Controls_Manager::TEXT,
|
382 |
-
'classes' => 'premium-live-temp-title control-hidden',
|
383 |
-
'label_block' => true,
|
384 |
-
'condition' => array(
|
385 |
-
'item_type' => 'submenu',
|
386 |
-
'menu_content_type' => 'custom_content',
|
387 |
-
),
|
388 |
-
)
|
389 |
-
);
|
390 |
-
|
391 |
-
$repeater->add_control(
|
392 |
-
'submenu_item_live',
|
393 |
-
array(
|
394 |
-
'type' => Controls_Manager::BUTTON,
|
395 |
-
'label_block' => true,
|
396 |
-
'button_type' => 'default papro-btn-block',
|
397 |
-
'text' => __( 'Create / Edit Template', 'premium-addons-for-elementor' ),
|
398 |
-
'event' => 'createLiveTemp',
|
399 |
-
'condition' => array(
|
400 |
-
'item_type' => 'submenu',
|
401 |
-
'menu_content_type' => 'custom_content',
|
402 |
-
),
|
403 |
-
)
|
404 |
-
);
|
405 |
-
|
406 |
-
$repeater->add_control(
|
407 |
-
'submenu_item',
|
408 |
-
array(
|
409 |
-
'label' => __( 'Select Existing Template', 'premium-addons-for-elementor' ),
|
410 |
-
'type' => Controls_Manager::SELECT2,
|
411 |
-
'classes' => 'premium-live-temp-label',
|
412 |
-
'label_block' => true,
|
413 |
-
'options' => $this->getTemplateInstance()->get_elementor_page_list(),
|
414 |
-
'condition' => array(
|
415 |
-
'item_type' => 'submenu',
|
416 |
-
'menu_content_type' => 'custom_content',
|
417 |
-
),
|
418 |
-
)
|
419 |
-
);
|
420 |
-
|
421 |
-
$repeater->add_control(
|
422 |
-
'section_full_width',
|
423 |
-
array(
|
424 |
-
'label' => __( 'Full Width Dropdown', 'premium-addons-for-elementor' ),
|
425 |
-
'type' => Controls_Manager::SWITCHER,
|
426 |
-
'description' => __( 'Enable this option to set the dropdown width to the same width of the parent section', 'premium-addons-for-elementor' ),
|
427 |
-
'condition' => array(
|
428 |
-
'item_type' => 'menu',
|
429 |
-
),
|
430 |
-
)
|
431 |
-
);
|
432 |
-
|
433 |
-
$repeater->add_responsive_control(
|
434 |
-
'section_width',
|
435 |
-
array(
|
436 |
-
'label' => __( 'Dropdown Minimum Width (px)', 'premium-addons-for-elementor' ),
|
437 |
-
'type' => Controls_Manager::SLIDER,
|
438 |
-
'range' => array(
|
439 |
-
'px' => array(
|
440 |
-
'min' => 0,
|
441 |
-
'max' => 1500,
|
442 |
-
),
|
443 |
-
),
|
444 |
-
'selectors' => array(
|
445 |
-
'{{WRAPPER}} {{CURRENT_ITEM}} ul.premium-sub-menu, {{WRAPPER}} {{CURRENT_ITEM}} .premium-mega-content-container' => 'min-width: {{SIZE}}{{UNIT}}',
|
446 |
-
),
|
447 |
-
'condition' => array(
|
448 |
-
'item_type' => 'menu',
|
449 |
-
'section_full_width!' => 'yes',
|
450 |
-
),
|
451 |
-
)
|
452 |
-
);
|
453 |
-
|
454 |
-
$repeater->add_responsive_control(
|
455 |
-
'section_position',
|
456 |
-
array(
|
457 |
-
'label' => __( 'Align to Widget Center', 'premium-addons-for-elementor' ),
|
458 |
-
'type' => Controls_Manager::SWITCHER,
|
459 |
-
'description' => __( 'This option centers the mega content to the center of the widget container. <b> Only works when Full Width Dropdown option is disabled </b>', 'premium-addons-for-elementor' ),
|
460 |
-
'condition' => array(
|
461 |
-
'item_type' => 'submenu',
|
462 |
-
'menu_content_type' => 'custom_content',
|
463 |
-
),
|
464 |
-
)
|
465 |
-
);
|
466 |
-
|
467 |
-
$repeater->add_control(
|
468 |
-
'icon_switcher',
|
469 |
-
array(
|
470 |
-
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
471 |
-
'type' => Controls_Manager::SWITCHER,
|
472 |
-
'conditions' => array(
|
473 |
-
'relation' => 'or',
|
474 |
-
'terms' => array(
|
475 |
-
array(
|
476 |
-
'name' => 'item_type',
|
477 |
-
'operator' => '==',
|
478 |
-
'value' => 'menu',
|
479 |
-
),
|
480 |
-
array(
|
481 |
-
'name' => 'menu_content_type',
|
482 |
-
'operator' => '==',
|
483 |
-
'value' => 'link',
|
484 |
-
),
|
485 |
-
),
|
486 |
-
),
|
487 |
-
)
|
488 |
-
);
|
489 |
-
|
490 |
-
$repeater->add_control(
|
491 |
-
'icon_type',
|
492 |
-
array(
|
493 |
-
'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
|
494 |
-
'type' => Controls_Manager::SELECT,
|
495 |
-
'description' => __( 'Use a font awesome icon or upload a custom image', 'premium-addons-for-elementor' ),
|
496 |
-
'options' => array(
|
497 |
-
'icon' => __( 'Icon', 'premium-addons-for-elementor' ),
|
498 |
-
'image' => __( 'Image', 'premium-addons-for-elementor' ),
|
499 |
-
'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
|
500 |
-
),
|
501 |
-
'default' => 'icon',
|
502 |
-
'conditions' => array(
|
503 |
-
'relation' => 'and',
|
504 |
-
'terms' => array(
|
505 |
-
array(
|
506 |
-
'name' => 'icon_switcher',
|
507 |
-
'value' => 'yes',
|
508 |
-
),
|
509 |
-
array(
|
510 |
-
'relation' => 'or',
|
511 |
-
'terms' => array(
|
512 |
-
array(
|
513 |
-
'name' => 'item_type',
|
514 |
-
'operator' => '==',
|
515 |
-
'value' => 'menu',
|
516 |
-
),
|
517 |
-
array(
|
518 |
-
'name' => 'menu_content_type',
|
519 |
-
'operator' => '==',
|
520 |
-
'value' => 'link',
|
521 |
-
),
|
522 |
-
),
|
523 |
-
),
|
524 |
-
|
525 |
-
),
|
526 |
-
),
|
527 |
-
)
|
528 |
-
);
|
529 |
-
|
530 |
-
$repeater->add_control(
|
531 |
-
'item_icon',
|
532 |
-
array(
|
533 |
-
'label' => __( 'Select an Icon', 'premium-addons-for-elementor' ),
|
534 |
-
'type' => Controls_Manager::ICONS,
|
535 |
-
'label_block' => false,
|
536 |
-
'skin' => 'inline',
|
537 |
-
'exclude_inline_options' => array( 'svg' ),
|
538 |
-
'conditions' => array(
|
539 |
-
'relation' => 'and',
|
540 |
-
'terms' => array(
|
541 |
-
array(
|
542 |
-
'name' => 'icon_switcher',
|
543 |
-
'value' => 'yes',
|
544 |
-
),
|
545 |
-
array(
|
546 |
-
'name' => 'icon_type',
|
547 |
-
'value' => 'icon',
|
548 |
-
),
|
549 |
-
array(
|
550 |
-
'relation' => 'or',
|
551 |
-
'terms' => array(
|
552 |
-
array(
|
553 |
-
'name' => 'item_type',
|
554 |
-
'operator' => '==',
|
555 |
-
'value' => 'menu',
|
556 |
-
),
|
557 |
-
array(
|
558 |
-
'name' => 'menu_content_type',
|
559 |
-
'operator' => '==',
|
560 |
-
'value' => 'link',
|
561 |
-
),
|
562 |
-
),
|
563 |
-
),
|
564 |
-
|
565 |
-
),
|
566 |
-
),
|
567 |
-
)
|
568 |
-
);
|
569 |
-
|
570 |
-
$repeater->add_control(
|
571 |
-
'item_image',
|
572 |
-
array(
|
573 |
-
'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),
|
574 |
-
'type' => Controls_Manager::MEDIA,
|
575 |
-
'default' => array(
|
576 |
-
'url' => Utils::get_placeholder_image_src(),
|
577 |
-
),
|
578 |
-
'conditions' => array(
|
579 |
-
'relation' => 'and',
|
580 |
-
'terms' => array(
|
581 |
-
array(
|
582 |
-
'name' => 'icon_switcher',
|
583 |
-
'value' => 'yes',
|
584 |
-
),
|
585 |
-
array(
|
586 |
-
'name' => 'icon_type',
|
587 |
-
'value' => 'image',
|
588 |
-
),
|
589 |
-
array(
|
590 |
-
'relation' => 'or',
|
591 |
-
'terms' => array(
|
592 |
-
array(
|
593 |
-
'name' => 'item_type',
|
594 |
-
'operator' => '==',
|
595 |
-
'value' => 'menu',
|
596 |
-
),
|
597 |
-
array(
|
598 |
-
'name' => 'menu_content_type',
|
599 |
-
'operator' => '==',
|
600 |
-
'value' => 'link',
|
601 |
-
),
|
602 |
-
),
|
603 |
-
),
|
604 |
-
|
605 |
-
),
|
606 |
-
),
|
607 |
-
)
|
608 |
-
);
|
609 |
-
|
610 |
-
$repeater->add_control(
|
611 |
-
'lottie_url',
|
612 |
-
array(
|
613 |
-
'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
|
614 |
-
'type' => Controls_Manager::TEXT,
|
615 |
-
'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
|
616 |
-
'label_block' => true,
|
617 |
-
'conditions' => array(
|
618 |
-
'relation' => 'and',
|
619 |
-
'terms' => array(
|
620 |
-
array(
|
621 |
-
'name' => 'icon_switcher',
|
622 |
-
'value' => 'yes',
|
623 |
-
),
|
624 |
-
array(
|
625 |
-
'name' => 'icon_type',
|
626 |
-
'value' => 'animation',
|
627 |
-
),
|
628 |
-
array(
|
629 |
-
'relation' => 'or',
|
630 |
-
'terms' => array(
|
631 |
-
array(
|
632 |
-
'name' => 'item_type',
|
633 |
-
'operator' => '==',
|
634 |
-
'value' => 'menu',
|
635 |
-
),
|
636 |
-
array(
|
637 |
-
'name' => 'menu_content_type',
|
638 |
-
'operator' => '==',
|
639 |
-
'value' => 'link',
|
640 |
-
),
|
641 |
-
),
|
642 |
-
),
|
643 |
-
|
644 |
-
),
|
645 |
-
),
|
646 |
-
)
|
647 |
-
);
|
648 |
-
|
649 |
-
$repeater->add_control(
|
650 |
-
'badge_switcher',
|
651 |
-
array(
|
652 |
-
'label' => __( 'Badge', 'premium-addons-for-elementor' ),
|
653 |
-
'type' => Controls_Manager::SWITCHER,
|
654 |
-
'separator' => 'before',
|
655 |
-
'conditions' => array(
|
656 |
-
'relation' => 'or',
|
657 |
-
'terms' => array(
|
658 |
-
array(
|
659 |
-
'name' => 'item_type',
|
660 |
-
'operator' => '==',
|
661 |
-
'value' => 'menu',
|
662 |
-
),
|
663 |
-
array(
|
664 |
-
'name' => 'menu_content_type',
|
665 |
-
'operator' => '==',
|
666 |
-
'value' => 'link',
|
667 |
-
),
|
668 |
-
),
|
669 |
-
),
|
670 |
-
)
|
671 |
-
);
|
672 |
-
|
673 |
-
$repeater->add_control(
|
674 |
-
'badge_text',
|
675 |
-
array(
|
676 |
-
'label' => __( 'Badge Text', 'premium-addons-for-elementor' ),
|
677 |
-
'type' => Controls_Manager::TEXT,
|
678 |
-
'conditions' => array(
|
679 |
-
'relation' => 'and',
|
680 |
-
'terms' => array(
|
681 |
-
array(
|
682 |
-
'name' => 'badge_switcher',
|
683 |
-
'value' => 'yes',
|
684 |
-
),
|
685 |
-
array(
|
686 |
-
'relation' => 'or',
|
687 |
-
'terms' => array(
|
688 |
-
array(
|
689 |
-
'name' => 'item_type',
|
690 |
-
'operator' => '==',
|
691 |
-
'value' => 'menu',
|
692 |
-
),
|
693 |
-
array(
|
694 |
-
'name' => 'menu_content_type',
|
695 |
-
'operator' => '==',
|
696 |
-
'value' => 'link',
|
697 |
-
),
|
698 |
-
),
|
699 |
-
),
|
700 |
-
|
701 |
-
),
|
702 |
-
),
|
703 |
-
)
|
704 |
-
);
|
705 |
-
|
706 |
-
if ( $papro_activated ) {
|
707 |
-
|
708 |
-
do_action( 'pa_custom_menu_controls', $this, $repeater );
|
709 |
-
|
710 |
-
}
|
711 |
-
|
712 |
-
$this->end_controls_section();
|
713 |
-
|
714 |
-
}
|
715 |
-
|
716 |
-
/**
|
717 |
-
* Get menu content controls.
|
718 |
-
*
|
719 |
-
* @access private
|
720 |
-
* @since 4.9.3
|
721 |
-
*/
|
722 |
-
private function get_menu_content_controls() {
|
723 |
-
|
724 |
-
$this->start_controls_section(
|
725 |
-
'display_options_section',
|
726 |
-
array(
|
727 |
-
'label' => __( 'Display Options', 'premium-addons-for-elementor' ),
|
728 |
-
)
|
729 |
-
);
|
730 |
-
|
731 |
-
$this->add_control(
|
732 |
-
'menu_heading',
|
733 |
-
array(
|
734 |
-
'label' => __( 'Menu Settings', 'premium-addons-for-elementor' ),
|
735 |
-
'type' => Controls_Manager::HEADING,
|
736 |
-
)
|
737 |
-
);
|
738 |
-
|
739 |
-
$this->add_control(
|
740 |
-
'pa_nav_menu_layout',
|
741 |
-
array(
|
742 |
-
'label' => __( 'Layout', 'premium-addons-for-elementor' ),
|
743 |
-
'type' => Controls_Manager::SELECT,
|
744 |
-
'prefix_class' => 'premium-nav-',
|
745 |
-
'options' => array(
|
746 |
-
'hor' => 'Horizontal',
|
747 |
-
'ver' => 'Vertical',
|
748 |
-
'dropdown' => 'Expand',
|
749 |
-
'slide' => 'Slide',
|
750 |
-
),
|
751 |
-
'render_type' => 'template',
|
752 |
-
'default' => 'hor',
|
753 |
-
)
|
754 |
-
);
|
755 |
-
|
756 |
-
$align_left = is_rtl() ? 'flex-end' : 'flex-start';
|
757 |
-
$align_right = is_rtl() ? 'flex-start' : 'flex-end';
|
758 |
-
$align_def = is_rtl() ? 'flex-end' : 'flex-start';
|
759 |
-
|
760 |
-
$this->add_responsive_control(
|
761 |
-
'pa_nav_menu_align',
|
762 |
-
array(
|
763 |
-
'label' => __( 'Menu Alignment', 'premium-addons-for-elementor' ),
|
764 |
-
'type' => Controls_Manager::CHOOSE,
|
765 |
-
'options' => array(
|
766 |
-
$align_left => array(
|
767 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
768 |
-
'icon' => 'eicon-h-align-left',
|
769 |
-
),
|
770 |
-
'center' => array(
|
771 |
-
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
772 |
-
'icon' => 'eicon-h-align-center',
|
773 |
-
),
|
774 |
-
$align_right => array(
|
775 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
776 |
-
'icon' => 'eicon-h-align-right',
|
777 |
-
),
|
778 |
-
'space-between' => array(
|
779 |
-
'title' => __( 'Strech', 'premium-addons-for-elementor' ),
|
780 |
-
'icon' => 'eicon-h-align-stretch',
|
781 |
-
),
|
782 |
-
),
|
783 |
-
'default' => 'center',
|
784 |
-
'toggle' => false,
|
785 |
-
'selectors' => array(
|
786 |
-
'{{WRAPPER}} .premium-main-nav-menu' => 'justify-content: {{VALUE}}',
|
787 |
-
),
|
788 |
-
'condition' => array(
|
789 |
-
'pa_nav_menu_layout' => 'hor',
|
790 |
-
),
|
791 |
-
)
|
792 |
-
);
|
793 |
-
|
794 |
-
$this->add_responsive_control(
|
795 |
-
'pa_nav_menu_align_ver',
|
796 |
-
array(
|
797 |
-
'label' => __( 'Menu Alignment', 'premium-addons-for-elementor' ),
|
798 |
-
'type' => Controls_Manager::CHOOSE,
|
799 |
-
'options' => array(
|
800 |
-
$align_left => array(
|
801 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
802 |
-
'icon' => 'eicon-text-align-left',
|
803 |
-
),
|
804 |
-
'center' => array(
|
805 |
-
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
806 |
-
'icon' => 'eicon-text-align-center',
|
807 |
-
),
|
808 |
-
$align_right => array(
|
809 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
810 |
-
'icon' => 'eicon-text-align-right',
|
811 |
-
),
|
812 |
-
),
|
813 |
-
'default' => $align_def,
|
814 |
-
'toggle' => false,
|
815 |
-
'selectors' => array(
|
816 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'justify-content: {{VALUE}}',
|
817 |
-
),
|
818 |
-
'condition' => array(
|
819 |
-
'pa_nav_menu_layout' => 'ver',
|
820 |
-
),
|
821 |
-
)
|
822 |
-
);
|
823 |
-
|
824 |
-
$this->add_control(
|
825 |
-
'pointer',
|
826 |
-
array(
|
827 |
-
'label' => __( 'Item Hover Effect', 'premium-addons-for-elementor' ),
|
828 |
-
'type' => Controls_Manager::SELECT,
|
829 |
-
'default' => 'none',
|
830 |
-
'options' => array(
|
831 |
-
'none' => __( 'None', 'premium-addons-for-elementor' ),
|
832 |
-
'underline' => __( 'Underline', 'premium-addons-for-elementor' ),
|
833 |
-
'overline' => __( 'Overline', 'premium-addons-for-elementor' ),
|
834 |
-
'double-line' => __( 'Double Line', 'premium-addons-for-elementor' ),
|
835 |
-
'framed' => __( 'Framed', 'premium-addons-for-elementor' ),
|
836 |
-
'background' => __( 'Background', 'premium-addons-for-elementor' ),
|
837 |
-
'text' => __( 'Text', 'premium-addons-for-elementor' ),
|
838 |
-
),
|
839 |
-
'style_transfer' => true,
|
840 |
-
)
|
841 |
-
);
|
842 |
-
|
843 |
-
$this->add_control(
|
844 |
-
'animation_line',
|
845 |
-
array(
|
846 |
-
'label' => __( 'Animation', 'premium-addons-for-elementor' ),
|
847 |
-
'type' => Controls_Manager::SELECT,
|
848 |
-
'default' => 'fade',
|
849 |
-
'options' => array(
|
850 |
-
'fade' => 'Fade',
|
851 |
-
'slide' => 'Slide',
|
852 |
-
'grow' => 'Grow',
|
853 |
-
'drop-in' => 'Drop In',
|
854 |
-
'drop-out' => 'Drop Out',
|
855 |
-
'none' => 'None',
|
856 |
-
),
|
857 |
-
'condition' => array(
|
858 |
-
'pointer' => array( 'underline', 'overline', 'double-line' ),
|
859 |
-
),
|
860 |
-
)
|
861 |
-
);
|
862 |
-
|
863 |
-
$this->add_control(
|
864 |
-
'animation_framed',
|
865 |
-
array(
|
866 |
-
'label' => __( 'Animation', 'premium-addons-for-elementor' ),
|
867 |
-
'type' => Controls_Manager::SELECT,
|
868 |
-
'default' => 'fade',
|
869 |
-
'options' => array(
|
870 |
-
'fade' => 'Fade',
|
871 |
-
'grow' => 'Grow',
|
872 |
-
'shrink' => 'Shrink',
|
873 |
-
'draw' => 'Draw',
|
874 |
-
'corners' => 'Corners',
|
875 |
-
'none' => 'None',
|
876 |
-
),
|
877 |
-
'condition' => array(
|
878 |
-
'pointer' => 'framed',
|
879 |
-
),
|
880 |
-
)
|
881 |
-
);
|
882 |
-
|
883 |
-
$this->add_control(
|
884 |
-
'animation_background',
|
885 |
-
array(
|
886 |
-
'label' => __( 'Animation', 'premium-addons-for-elementor' ),
|
887 |
-
'type' => Controls_Manager::SELECT,
|
888 |
-
'default' => 'fade',
|
889 |
-
'options' => array(
|
890 |
-
'fade' => 'Fade',
|
891 |
-
'grow' => 'Grow',
|
892 |
-
'shrink' => 'Shrink',
|
893 |
-
'sweep-left' => 'Sweep Left',
|
894 |
-
'sweep-right' => 'Sweep Right',
|
895 |
-
'sweep-up' => 'Sweep Up',
|
896 |
-
'sweep-down' => 'Sweep Down',
|
897 |
-
'shutter-in-vertical' => 'Shutter In Vertical',
|
898 |
-
'shutter-out-vertical' => 'Shutter Out Vertical',
|
899 |
-
'shutter-in-horizontal' => 'Shutter In Horizontal',
|
900 |
-
'shutter-out-horizontal' => 'Shutter Out Horizontal',
|
901 |
-
'none' => 'None',
|
902 |
-
),
|
903 |
-
'condition' => array(
|
904 |
-
'pointer' => 'background',
|
905 |
-
),
|
906 |
-
)
|
907 |
-
);
|
908 |
-
|
909 |
-
$this->add_control(
|
910 |
-
'animation_text',
|
911 |
-
array(
|
912 |
-
'label' => __( 'Animation', 'premium-addons-for-elementor' ),
|
913 |
-
'type' => Controls_Manager::SELECT,
|
914 |
-
'default' => 'grow',
|
915 |
-
'options' => array(
|
916 |
-
'grow' => 'Grow',
|
917 |
-
'shrink' => 'Shrink',
|
918 |
-
'sink' => 'Sink',
|
919 |
-
'float' => 'Float',
|
920 |
-
'skew' => 'Skew',
|
921 |
-
'rotate' => 'Rotate',
|
922 |
-
'none' => 'None',
|
923 |
-
),
|
924 |
-
'condition' => array(
|
925 |
-
'pointer' => 'text',
|
926 |
-
),
|
927 |
-
)
|
928 |
-
);
|
929 |
-
|
930 |
-
$this->get_vertical_toggle_settings();
|
931 |
-
|
932 |
-
$this->get_sticky_option_settings();
|
933 |
-
|
934 |
-
$this->add_control(
|
935 |
-
'submenu_heading',
|
936 |
-
array(
|
937 |
-
'label' => __( 'Submenu Settings', 'premium-addons-for-elementor' ),
|
938 |
-
'type' => Controls_Manager::HEADING,
|
939 |
-
'separator' => 'before',
|
940 |
-
)
|
941 |
-
);
|
942 |
-
|
943 |
-
$this->add_control(
|
944 |
-
'submenu_icon',
|
945 |
-
array(
|
946 |
-
'label' => __( 'Submenu Indicator Icon', 'premium-addons-for-elementor' ),
|
947 |
-
'type' => Controls_Manager::ICONS,
|
948 |
-
'default' => array(
|
949 |
-
'value' => 'fas fa-angle-down',
|
950 |
-
'library' => 'fa-solid',
|
951 |
-
),
|
952 |
-
'recommended' => array(
|
953 |
-
'fa-solid' => array(
|
954 |
-
'chevron-down',
|
955 |
-
'angle-down',
|
956 |
-
'caret-down',
|
957 |
-
'plus',
|
958 |
-
),
|
959 |
-
),
|
960 |
-
'label_block' => false,
|
961 |
-
'skin' => 'inline',
|
962 |
-
'exclude_inline_options' => array( 'svg' ),
|
963 |
-
'frontend_available' => true,
|
964 |
-
)
|
965 |
-
);
|
966 |
-
|
967 |
-
$default_pos = is_rtl() ? 'left' : 'right';
|
968 |
-
$default_align = is_rtl() ? 'flex-end' : 'flex-start';
|
969 |
-
|
970 |
-
$this->add_responsive_control(
|
971 |
-
'pa_nav_ver_submenu',
|
972 |
-
array(
|
973 |
-
'label' => __( 'Submenu Position', 'premium-addons-for-elementor' ),
|
974 |
-
'type' => Controls_Manager::CHOOSE,
|
975 |
-
'render_type' => 'template',
|
976 |
-
'prefix_class' => 'premium-vertical-',
|
977 |
-
'options' => array(
|
978 |
-
'left' => array(
|
979 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
980 |
-
'icon' => 'eicon-h-align-left',
|
981 |
-
),
|
982 |
-
'right' => array(
|
983 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
984 |
-
'icon' => 'eicon-h-align-right',
|
985 |
-
),
|
986 |
-
),
|
987 |
-
'default' => $default_pos,
|
988 |
-
'toggle' => false,
|
989 |
-
'condition' => array(
|
990 |
-
'pa_nav_menu_layout' => 'ver',
|
991 |
-
),
|
992 |
-
)
|
993 |
-
);
|
994 |
-
|
995 |
-
$this->add_responsive_control(
|
996 |
-
'pa_sub_menu_align',
|
997 |
-
array(
|
998 |
-
'label' => __( 'Content Alignment', 'premium-addons-for-elementor' ),
|
999 |
-
'type' => Controls_Manager::CHOOSE,
|
1000 |
-
'options' => array(
|
1001 |
-
'flex-start' => array(
|
1002 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1003 |
-
'icon' => 'eicon-text-align-left',
|
1004 |
-
),
|
1005 |
-
'center' => array(
|
1006 |
-
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1007 |
-
'icon' => 'eicon-text-align-center',
|
1008 |
-
),
|
1009 |
-
'flex-end' => array(
|
1010 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1011 |
-
'icon' => 'eicon-text-align-right',
|
1012 |
-
),
|
1013 |
-
),
|
1014 |
-
'default' => $default_align,
|
1015 |
-
'toggle' => false,
|
1016 |
-
'selectors' => array(
|
1017 |
-
'{{WRAPPER}} .premium-sub-menu .premium-sub-menu-link' => 'justify-content: {{VALUE}}',
|
1018 |
-
),
|
1019 |
-
)
|
1020 |
-
);
|
1021 |
-
|
1022 |
-
$this->add_control(
|
1023 |
-
'submenu_event',
|
1024 |
-
array(
|
1025 |
-
'label' => __( 'Open Submenu On', 'premium-addons-for-elementor' ),
|
1026 |
-
'type' => Controls_Manager::SELECT,
|
1027 |
-
'default' => 'hover',
|
1028 |
-
'render_type' => 'template',
|
1029 |
-
'options' => array(
|
1030 |
-
'hover' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1031 |
-
'click' => __( 'click', 'premium-addons-for-elementor' ),
|
1032 |
-
),
|
1033 |
-
'condition' => array(
|
1034 |
-
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1035 |
-
),
|
1036 |
-
)
|
1037 |
-
);
|
1038 |
-
|
1039 |
-
$this->add_control(
|
1040 |
-
'submenu_trigger',
|
1041 |
-
array(
|
1042 |
-
'label' => __( 'Submenu Trigger', 'premium-addons-for-elementor' ),
|
1043 |
-
'type' => Controls_Manager::SELECT,
|
1044 |
-
'default' => 'item',
|
1045 |
-
'render_type' => 'template',
|
1046 |
-
'options' => array(
|
1047 |
-
'icon' => __( 'Submenu Dropdwon Icon', 'premium-addons-for-elementor' ),
|
1048 |
-
'item' => __( 'Submenu Item', 'premium-addons-for-elementor' ),
|
1049 |
-
),
|
1050 |
-
'condition' => array(
|
1051 |
-
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1052 |
-
'submenu_event' => 'click',
|
1053 |
-
),
|
1054 |
-
)
|
1055 |
-
);
|
1056 |
-
|
1057 |
-
$this->add_control(
|
1058 |
-
'submenu_slide',
|
1059 |
-
array(
|
1060 |
-
'label' => __( 'Submenu Animation', 'premium-addons-for-elementor' ),
|
1061 |
-
'type' => Controls_Manager::SELECT,
|
1062 |
-
'prefix_class' => 'premium-nav-',
|
1063 |
-
'default' => 'none',
|
1064 |
-
'options' => array(
|
1065 |
-
'none' => __( 'None', 'premium-addons-for-elementor' ),
|
1066 |
-
'slide-up' => __( 'Slide Up', 'premium-addons-for-elementor' ),
|
1067 |
-
'slide-down' => __( 'Slide Down', 'premium-addons-for-elementor' ),
|
1068 |
-
'slide-left' => __( 'Slide Left', 'premium-addons-for-elementor' ),
|
1069 |
-
'slide-right' => __( 'Slide Right', 'premium-addons-for-elementor' ),
|
1070 |
-
),
|
1071 |
-
'condition' => array(
|
1072 |
-
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1073 |
-
),
|
1074 |
-
)
|
1075 |
-
);
|
1076 |
-
|
1077 |
-
// sub-items badge hover.
|
1078 |
-
$this->add_control(
|
1079 |
-
'sub_badge_hv_effects',
|
1080 |
-
array(
|
1081 |
-
'label' => __( 'Badge Effects', 'premium-addons-for-elementor' ),
|
1082 |
-
'type' => Controls_Manager::SELECT,
|
1083 |
-
'render_type' => 'template',
|
1084 |
-
'default' => '',
|
1085 |
-
'options' => array(
|
1086 |
-
'' => __( 'None', 'premium-addons-for-elementor' ),
|
1087 |
-
'dot' => __( 'Grow', 'premium-addons-for-elementor' ),
|
1088 |
-
'expand' => __( 'Expand', 'premium-addons-for-elementor' ),
|
1089 |
-
'pulse' => __( 'Pulse', 'premium-addons-for-elementor' ),
|
1090 |
-
'buzz' => __( 'Buzz', 'premium-addons-for-elementor' ),
|
1091 |
-
'slide-right' => __( 'Slide Right', 'premium-addons-for-elementor' ),
|
1092 |
-
'slide-left' => __( 'Slide Left', 'premium-addons-for-elementor' ),
|
1093 |
-
),
|
1094 |
-
)
|
1095 |
-
);
|
1096 |
-
|
1097 |
-
$this->add_responsive_control(
|
1098 |
-
'dot_size',
|
1099 |
-
array(
|
1100 |
-
'label' => __( 'Dot Size', 'premium-addons-for-elementor' ),
|
1101 |
-
'type' => Controls_Manager::SLIDER,
|
1102 |
-
'label_block' => true,
|
1103 |
-
'size_units' => array( 'px' ),
|
1104 |
-
'range' => array(
|
1105 |
-
'px' => array(
|
1106 |
-
'min' => 0,
|
1107 |
-
'max' => 10,
|
1108 |
-
),
|
1109 |
-
),
|
1110 |
-
'selectors' => array(
|
1111 |
-
'{{WRAPPER}} .premium-badge-dot .premium-sub-item-badge' => 'padding: {{SIZE}}{{UNIT}};',
|
1112 |
-
),
|
1113 |
-
'condition' => array(
|
1114 |
-
'sub_badge_hv_effects' => 'dot',
|
1115 |
-
),
|
1116 |
-
)
|
1117 |
-
);
|
1118 |
-
|
1119 |
-
// toggle menu settings.
|
1120 |
-
$this->add_control(
|
1121 |
-
'pa_toggle_heading',
|
1122 |
-
array(
|
1123 |
-
'label' => __( 'Mobile Menu Settings', 'premium-addons-for-elementor' ),
|
1124 |
-
'type' => Controls_Manager::HEADING,
|
1125 |
-
'separator' => 'before',
|
1126 |
-
'condition' => array(
|
1127 |
-
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1128 |
-
),
|
1129 |
-
)
|
1130 |
-
);
|
1131 |
-
|
1132 |
-
$this->add_control(
|
1133 |
-
'pa_mobile_menu_layout',
|
1134 |
-
array(
|
1135 |
-
'label' => __( 'Layout', 'premium-addons-for-elementor' ),
|
1136 |
-
'type' => Controls_Manager::SELECT,
|
1137 |
-
'render_type' => 'template',
|
1138 |
-
'prefix_class' => 'premium-ham-',
|
1139 |
-
'options' => array(
|
1140 |
-
'dropdown' => 'Expand',
|
1141 |
-
'slide' => 'Slide',
|
1142 |
-
),
|
1143 |
-
'default' => 'dropdown',
|
1144 |
-
'condition' => array(
|
1145 |
-
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1146 |
-
),
|
1147 |
-
)
|
1148 |
-
);
|
1149 |
-
|
1150 |
-
$this->add_control(
|
1151 |
-
'pa_mobile_menu_breakpoint',
|
1152 |
-
array(
|
1153 |
-
'label' => __( 'Breakpoint', 'premium-addons-for-elementor' ),
|
1154 |
-
'type' => Controls_Manager::SELECT,
|
1155 |
-
'options' => array(
|
1156 |
-
'767' => __( 'Mobile (<768)', 'premium-addons-for-elementor' ),
|
1157 |
-
'1024' => __( 'Tablet (<1025)', 'premium-addons-for-elementor' ),
|
1158 |
-
'custom' => __( 'Custom', 'premium-addons-for-elementor' ),
|
1159 |
-
),
|
1160 |
-
'default' => '1024',
|
1161 |
-
'condition' => array(
|
1162 |
-
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1163 |
-
),
|
1164 |
-
)
|
1165 |
-
);
|
1166 |
-
|
1167 |
-
$this->add_control(
|
1168 |
-
'pa_custom_breakpoint',
|
1169 |
-
array(
|
1170 |
-
'label' => __( 'Custom Breakpoint (px)', 'premium-addons-for-elementor' ),
|
1171 |
-
'type' => Controls_Manager::NUMBER,
|
1172 |
-
'min' => 0,
|
1173 |
-
'max' => 2000,
|
1174 |
-
'step' => 5,
|
1175 |
-
'description' => 'Use this option to control when to turn your menu into a toggle menu, Default is 1025',
|
1176 |
-
'condition' => array(
|
1177 |
-
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1178 |
-
'pa_mobile_menu_breakpoint' => 'custom',
|
1179 |
-
),
|
1180 |
-
)
|
1181 |
-
);
|
1182 |
-
|
1183 |
-
$this->end_controls_section();
|
1184 |
-
|
1185 |
-
$this->get_dropdown_content_settings( $align_left, $align_right );
|
1186 |
-
|
1187 |
-
}
|
1188 |
-
|
1189 |
-
/**
|
1190 |
-
* Add random badges control controls.
|
1191 |
-
*
|
1192 |
-
* @access private
|
1193 |
-
* @since 4.9.34
|
1194 |
-
*/
|
1195 |
-
private function add_random_badges_section() {
|
1196 |
-
|
1197 |
-
$this->start_controls_section(
|
1198 |
-
'premium_rn_badge_section',
|
1199 |
-
array(
|
1200 |
-
'label' => __( 'Random Badges', 'premium-addons-for-elementor' ),
|
1201 |
-
)
|
1202 |
-
);
|
1203 |
-
|
1204 |
-
$papro_activated = apply_filters( 'papro_activated', false );
|
1205 |
-
|
1206 |
-
if ( $papro_activated ) {
|
1207 |
-
if ( version_compare( PREMIUM_PRO_ADDONS_VERSION, '2.8.9', '>' ) ) {
|
1208 |
-
do_action( 'pa_rn_badges_controls', $this );
|
1209 |
-
|
1210 |
-
} else {
|
1211 |
-
$this->add_control(
|
1212 |
-
'rn_badges_ver_notice',
|
1213 |
-
array(
|
1214 |
-
'type' => Controls_Manager::RAW_HTML,
|
1215 |
-
'raw' => __( 'Please update Premium Addons Pro version to 2.8.10 to use this option.', 'premium-addons-for-elementor' ),
|
1216 |
-
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
1217 |
-
)
|
1218 |
-
);
|
1219 |
-
}
|
1220 |
-
} else {
|
1221 |
-
|
1222 |
-
$get_pro = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/pro', 'editor-page', 'wp-editor', 'get-pro' );
|
1223 |
-
|
1224 |
-
$this->add_control(
|
1225 |
-
'rn_badges_notice',
|
1226 |
-
array(
|
1227 |
-
'type' => Controls_Manager::RAW_HTML,
|
1228 |
-
'raw' => __( 'Random Badges can be used in Premium Addons Pro.', 'premium-addons-for-elementor' ) . '<a href="' . esc_url( $get_pro ) . '" target="_blank">' . __( ' Upgrade now!', 'premium-addons-for-elementor' ) . '</a>',
|
1229 |
-
'content_classes' => 'papro-upgrade-notice',
|
1230 |
-
)
|
1231 |
-
);
|
1232 |
-
}
|
1233 |
-
|
1234 |
-
$this->end_controls_section();
|
1235 |
-
|
1236 |
-
}
|
1237 |
-
|
1238 |
-
/**
|
1239 |
-
* Add Helpful Information Section
|
1240 |
-
*
|
1241 |
-
* @access private
|
1242 |
-
* @since 4.9.35
|
1243 |
-
*/
|
1244 |
-
private function add_helpful_docs_section() {
|
1245 |
-
|
1246 |
-
$this->start_controls_section(
|
1247 |
-
'section_pa_docs',
|
1248 |
-
array(
|
1249 |
-
'label' => __( 'Helpful Documentations', 'premium-addons-for-elementor' ),
|
1250 |
-
)
|
1251 |
-
);
|
1252 |
-
|
1253 |
-
$docs = array(
|
1254 |
-
'https://premiumaddons.com/docs/elementor-mega-menu-widget-tutorial' => __( 'Getting started »', 'premium-addons-for-elementor' ),
|
1255 |
-
'https://premiumaddons.com/docs/elementor-mega-menu-widget-tutorial/#random-badges' => __( 'How to add random badges in Mega Menu widget »', 'premium-addons-for-elementor' ),
|
1256 |
-
);
|
1257 |
-
|
1258 |
-
$doc_index = 1;
|
1259 |
-
foreach ( $docs as $url => $title ) {
|
1260 |
-
|
1261 |
-
$doc_url = Helper_Functions::get_campaign_link( $url, 'editor-page', 'wp-editor', 'get-support' );
|
1262 |
-
|
1263 |
-
$this->add_control(
|
1264 |
-
'doc_' . $doc_index,
|
1265 |
-
array(
|
1266 |
-
'type' => Controls_Manager::RAW_HTML,
|
1267 |
-
'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc_url, $title ),
|
1268 |
-
'content_classes' => 'editor-pa-doc',
|
1269 |
-
)
|
1270 |
-
);
|
1271 |
-
|
1272 |
-
$doc_index++;
|
1273 |
-
|
1274 |
-
}
|
1275 |
-
|
1276 |
-
$this->end_controls_section();
|
1277 |
-
|
1278 |
-
}
|
1279 |
-
|
1280 |
-
/**
|
1281 |
-
* Get sticky style options.
|
1282 |
-
*
|
1283 |
-
* @access private
|
1284 |
-
* @since 4.9.15
|
1285 |
-
*/
|
1286 |
-
private function get_sticky_style() {
|
1287 |
-
|
1288 |
-
$this->start_controls_section(
|
1289 |
-
'pa_sticky_style_sec',
|
1290 |
-
array(
|
1291 |
-
'label' => __( 'Sticky Menu Style', 'premium-addons-for-elementor' ),
|
1292 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
1293 |
-
'condition' => array(
|
1294 |
-
'pa_sticky_switcher' => 'yes',
|
1295 |
-
'pa_nav_menu_layout' => 'hor',
|
1296 |
-
),
|
1297 |
-
)
|
1298 |
-
);
|
1299 |
-
|
1300 |
-
$this->add_group_control(
|
1301 |
-
Group_Control_Box_Shadow::get_type(),
|
1302 |
-
array(
|
1303 |
-
'name' => 'pa_sticky_shadow',
|
1304 |
-
'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
|
1305 |
-
'fields_options' => array(
|
1306 |
-
'box_shadow' => array(
|
1307 |
-
'selectors' => array(
|
1308 |
-
'.premium-sticky-parent-{{ID}}' => 'box-shadow: {{HORIZONTAL}}px {{VERTICAL}}px {{BLUR}}px {{SPREAD}}px {{COLOR}} {{box_shadow_position.VALUE}} !important;',
|
1309 |
-
),
|
1310 |
-
),
|
1311 |
-
),
|
1312 |
-
)
|
1313 |
-
);
|
1314 |
-
|
1315 |
-
$this->add_group_control(
|
1316 |
-
Group_Control_Background::get_type(),
|
1317 |
-
array(
|
1318 |
-
'name' => 'pa_sticky_bg',
|
1319 |
-
'types' => array( 'classic', 'gradient' ),
|
1320 |
-
'selector' => '.premium-sticky-parent-{{ID}}',
|
1321 |
-
)
|
1322 |
-
);
|
1323 |
-
|
1324 |
-
$this->add_group_control(
|
1325 |
-
Group_Control_Border::get_type(),
|
1326 |
-
array(
|
1327 |
-
'name' => 'pa_sticky_border',
|
1328 |
-
'selector' => '.premium-sticky-parent-{{ID}}',
|
1329 |
-
)
|
1330 |
-
);
|
1331 |
-
|
1332 |
-
$this->add_responsive_control(
|
1333 |
-
'pa_sticky_padding',
|
1334 |
-
array(
|
1335 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
1336 |
-
'type' => Controls_Manager::DIMENSIONS,
|
1337 |
-
'size_units' => array( 'px', 'em', '%' ),
|
1338 |
-
'selectors' => array(
|
1339 |
-
'.premium-sticky-parent-{{ID}}' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1340 |
-
),
|
1341 |
-
)
|
1342 |
-
);
|
1343 |
-
|
1344 |
-
$this->end_controls_section();
|
1345 |
-
}
|
1346 |
-
|
1347 |
-
/**
|
1348 |
-
* Get sticky option settings.
|
1349 |
-
*
|
1350 |
-
* @access private
|
1351 |
-
* @since 4.9.15
|
1352 |
-
*/
|
1353 |
-
private function get_sticky_option_settings() {
|
1354 |
-
|
1355 |
-
$this->add_control(
|
1356 |
-
'pa_sticky_switcher',
|
1357 |
-
array(
|
1358 |
-
'label' => __( 'Enable Sticky Menu', 'premium-addons-for-elementor' ),
|
1359 |
-
'type' => Controls_Manager::SWITCHER,
|
1360 |
-
'frontend_available' => true,
|
1361 |
-
'separator' => 'before',
|
1362 |
-
'render_type' => 'template',
|
1363 |
-
'prefix_class' => 'premium-nav-sticky-',
|
1364 |
-
'condition' => array(
|
1365 |
-
'pa_nav_menu_layout' => 'hor',
|
1366 |
-
),
|
1367 |
-
)
|
1368 |
-
);
|
1369 |
-
|
1370 |
-
$this->add_control(
|
1371 |
-
'pa_sticky_target',
|
1372 |
-
array(
|
1373 |
-
'label' => __( 'Sticky Target ID', 'premium-addons-for-elementor' ),
|
1374 |
-
'type' => Controls_Manager::TEXT,
|
1375 |
-
'frontend_available' => true,
|
1376 |
-
'render_type' => 'template',
|
1377 |
-
'placeholder' => 'sticky-target',
|
1378 |
-
'description' => __( 'The target id to apply sticky effect on ( without the "#" ).', 'premium-addons-for-elementor' ),
|
1379 |
-
'condition' => array(
|
1380 |
-
'pa_nav_menu_layout' => 'hor',
|
1381 |
-
'pa_sticky_switcher' => 'yes',
|
1382 |
-
),
|
1383 |
-
)
|
1384 |
-
);
|
1385 |
-
|
1386 |
-
$this->add_control(
|
1387 |
-
'pa_sticky_on_scroll',
|
1388 |
-
array(
|
1389 |
-
'label' => __( 'Sticky on Scroll Up', 'premium-addons-for-elementor' ),
|
1390 |
-
'type' => Controls_Manager::SWITCHER,
|
1391 |
-
// 'prefix_class' => 'premium-sticky-scroll-',
|
1392 |
-
'frontend_available' => true,
|
1393 |
-
'render_type' => 'template',
|
1394 |
-
'condition' => array(
|
1395 |
-
'pa_nav_menu_layout' => 'hor',
|
1396 |
-
'pa_sticky_switcher' => 'yes',
|
1397 |
-
),
|
1398 |
-
)
|
1399 |
-
);
|
1400 |
-
|
1401 |
-
$this->add_control(
|
1402 |
-
'pa_sticky_disabled_on',
|
1403 |
-
array(
|
1404 |
-
'label' => __( 'Disable On', 'premium-addons-for-elementor' ),
|
1405 |
-
'type' => Controls_Manager::SELECT2,
|
1406 |
-
'frontend_available' => true,
|
1407 |
-
'options' => Helper_Functions::get_all_breakpoints(),
|
1408 |
-
'multiple' => true,
|
1409 |
-
'label_block' => true,
|
1410 |
-
'render_type' => 'template',
|
1411 |
-
'default' => array( 'tablet', 'mobile' ),
|
1412 |
-
'condition' => array(
|
1413 |
-
'pa_nav_menu_layout' => 'hor',
|
1414 |
-
'pa_sticky_switcher' => 'yes',
|
1415 |
-
),
|
1416 |
-
)
|
1417 |
-
);
|
1418 |
-
}
|
1419 |
-
|
1420 |
-
/**
|
1421 |
-
* Get vertical toggle settings.
|
1422 |
-
*
|
1423 |
-
* @access private
|
1424 |
-
* @since 4.9.15
|
1425 |
-
*/
|
1426 |
-
private function get_vertical_toggle_settings() {
|
1427 |
-
|
1428 |
-
$this->add_control(
|
1429 |
-
'pa_ver_toggle_switcher',
|
1430 |
-
array(
|
1431 |
-
'label' => __( 'Enable Collapsed Menu', 'premium-addons-for-elementor' ),
|
1432 |
-
'type' => Controls_Manager::SWITCHER,
|
1433 |
-
'separator' => 'before',
|
1434 |
-
'render_type' => 'template',
|
1435 |
-
'prefix_class' => 'premium-ver-toggle-',
|
1436 |
-
'condition' => array(
|
1437 |
-
'pa_nav_menu_layout' => 'ver',
|
1438 |
-
),
|
1439 |
-
)
|
1440 |
-
);
|
1441 |
-
|
1442 |
-
$this->add_control(
|
1443 |
-
'pa_ver_toggle_txt',
|
1444 |
-
array(
|
1445 |
-
'label' => __( 'Title', 'premium-addons-for-elementor' ),
|
1446 |
-
'type' => Controls_Manager::TEXT,
|
1447 |
-
'default' => __( 'Premium Menu', 'premium-addons-for-elementor' ),
|
1448 |
-
'condition' => array(
|
1449 |
-
'pa_nav_menu_layout' => 'ver',
|
1450 |
-
'pa_ver_toggle_switcher' => 'yes',
|
1451 |
-
),
|
1452 |
-
)
|
1453 |
-
);
|
1454 |
-
|
1455 |
-
$this->add_control(
|
1456 |
-
'pa_ver_toggle_event',
|
1457 |
-
array(
|
1458 |
-
'label' => __( 'Open On', 'premium-addons-for-elementor' ),
|
1459 |
-
'type' => Controls_Manager::SELECT,
|
1460 |
-
'default' => 'click',
|
1461 |
-
'render_type' => 'template',
|
1462 |
-
'prefix_class' => 'premium-ver-',
|
1463 |
-
'options' => array(
|
1464 |
-
'hover' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1465 |
-
'click' => __( 'Click', 'premium-addons-for-elementor' ),
|
1466 |
-
'always' => __( 'Always', 'premium-addons-for-elementor' ),
|
1467 |
-
),
|
1468 |
-
'condition' => array(
|
1469 |
-
'pa_nav_menu_layout' => 'ver',
|
1470 |
-
'pa_ver_toggle_switcher' => 'yes',
|
1471 |
-
),
|
1472 |
-
)
|
1473 |
-
);
|
1474 |
-
|
1475 |
-
$this->add_control(
|
1476 |
-
'pa_ver_toggle_open',
|
1477 |
-
array(
|
1478 |
-
'label' => __( 'Opened By Default', 'premium-addons-for-elementor' ),
|
1479 |
-
'type' => Controls_Manager::SWITCHER,
|
1480 |
-
'render_type' => 'template',
|
1481 |
-
// 'prefix_class' => 'premium-ver-',
|
1482 |
-
'condition' => array(
|
1483 |
-
'pa_nav_menu_layout' => 'ver',
|
1484 |
-
'pa_ver_toggle_switcher' => 'yes',
|
1485 |
-
'pa_ver_toggle_event' => 'click',
|
1486 |
-
),
|
1487 |
-
)
|
1488 |
-
);
|
1489 |
-
|
1490 |
-
$this->add_control(
|
1491 |
-
'pa_ver_toggle_main_icon',
|
1492 |
-
array(
|
1493 |
-
'label' => __( 'Title Icon', 'premium-addons-for-elementor' ),
|
1494 |
-
'type' => Controls_Manager::ICONS,
|
1495 |
-
'label_block' => false,
|
1496 |
-
'skin' => 'inline',
|
1497 |
-
'default' => array(
|
1498 |
-
'value' => 'fas fa-bars',
|
1499 |
-
'library' => 'solid',
|
1500 |
-
),
|
1501 |
-
'condition' => array(
|
1502 |
-
'pa_nav_menu_layout' => 'ver',
|
1503 |
-
'pa_ver_toggle_switcher' => 'yes',
|
1504 |
-
),
|
1505 |
-
)
|
1506 |
-
);
|
1507 |
-
|
1508 |
-
$this->add_control(
|
1509 |
-
'pa_ver_toggle_toggle_icon',
|
1510 |
-
array(
|
1511 |
-
'label' => __( 'Toggle Icon', 'premium-addons-for-elementor' ),
|
1512 |
-
'type' => Controls_Manager::ICONS,
|
1513 |
-
'label_block' => false,
|
1514 |
-
'skin' => 'inline',
|
1515 |
-
'default' => array(
|
1516 |
-
'value' => 'fas fa-angle-down',
|
1517 |
-
'library' => 'solid',
|
1518 |
-
),
|
1519 |
-
'condition' => array(
|
1520 |
-
'pa_nav_menu_layout' => 'ver',
|
1521 |
-
'pa_ver_toggle_switcher' => 'yes',
|
1522 |
-
),
|
1523 |
-
)
|
1524 |
-
);
|
1525 |
-
|
1526 |
-
$this->add_control(
|
1527 |
-
'pa_ver_toggle_close_icon',
|
1528 |
-
array(
|
1529 |
-
'label' => __( 'Close Icon', 'premium-addons-for-elementor' ),
|
1530 |
-
'type' => Controls_Manager::ICONS,
|
1531 |
-
'label_block' => false,
|
1532 |
-
'skin' => 'inline',
|
1533 |
-
'default' => array(
|
1534 |
-
'value' => 'fas fa-angle-up',
|
1535 |
-
'library' => 'solid',
|
1536 |
-
),
|
1537 |
-
'condition' => array(
|
1538 |
-
'pa_nav_menu_layout' => 'ver',
|
1539 |
-
'pa_ver_toggle_switcher' => 'yes',
|
1540 |
-
'pa_ver_toggle_event!' => 'always',
|
1541 |
-
),
|
1542 |
-
)
|
1543 |
-
);
|
1544 |
-
|
1545 |
-
$this->add_control(
|
1546 |
-
'premium_ver_spacing',
|
1547 |
-
array(
|
1548 |
-
'label' => __( 'Title Spacing', 'premium-addons-for-elementor' ),
|
1549 |
-
'type' => Controls_Manager::SLIDER,
|
1550 |
-
'label_block' => true,
|
1551 |
-
'size_units' => array( 'px', 'em' ),
|
1552 |
-
'description' => __( 'Use this option to control the spacing between the title icon and the title.', 'premium-addons-for-elementor' ),
|
1553 |
-
'selectors' => array(
|
1554 |
-
'{{WRAPPER}} .premium-ver-toggler-txt' => 'text-indent: {{SIZE}}{{UNIT}};',
|
1555 |
-
),
|
1556 |
-
'condition' => array(
|
1557 |
-
'pa_nav_menu_layout' => 'ver',
|
1558 |
-
'pa_ver_toggle_switcher' => 'yes',
|
1559 |
-
),
|
1560 |
-
)
|
1561 |
-
);
|
1562 |
-
}
|
1563 |
-
|
1564 |
-
/**
|
1565 |
-
* Get dropdown content settings.
|
1566 |
-
*
|
1567 |
-
* @access private
|
1568 |
-
* @since 4.9.15
|
1569 |
-
*
|
1570 |
-
* @param string $align_left align-left val.
|
1571 |
-
* @param string $align_right align-right val.
|
1572 |
-
*/
|
1573 |
-
private function get_dropdown_content_settings( $align_left, $align_right ) {
|
1574 |
-
|
1575 |
-
$this->start_controls_section(
|
1576 |
-
'premium_dropdown_section',
|
1577 |
-
array(
|
1578 |
-
'label' => __( 'Expand/Slide Menu Settings', 'premium-addons-for-elementor' ),
|
1579 |
-
)
|
1580 |
-
);
|
1581 |
-
|
1582 |
-
$this->add_control(
|
1583 |
-
'btn_toggle_heading',
|
1584 |
-
array(
|
1585 |
-
'label' => __( 'Toggle Button', 'premium-addons-for-elementor' ),
|
1586 |
-
'type' => Controls_Manager::HEADING,
|
1587 |
-
)
|
1588 |
-
);
|
1589 |
-
|
1590 |
-
$this->add_control(
|
1591 |
-
'pa_mobile_toggle_text',
|
1592 |
-
array(
|
1593 |
-
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
1594 |
-
'type' => Controls_Manager::TEXT,
|
1595 |
-
'default' => __( 'Menu', 'premium-addons-for-elementor' ),
|
1596 |
-
)
|
1597 |
-
);
|
1598 |
-
|
1599 |
-
$this->add_control(
|
1600 |
-
'pa_mobile_toggle_close',
|
1601 |
-
array(
|
1602 |
-
'label' => __( 'Close Text', 'premium-addons-for-elementor' ),
|
1603 |
-
'type' => Controls_Manager::TEXT,
|
1604 |
-
'default' => __( 'Close', 'premium-addons-for-elementor' ),
|
1605 |
-
)
|
1606 |
-
);
|
1607 |
-
|
1608 |
-
$this->add_control(
|
1609 |
-
'pa_mobile_toggle_icon',
|
1610 |
-
array(
|
1611 |
-
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
1612 |
-
'type' => Controls_Manager::ICONS,
|
1613 |
-
'label_block' => false,
|
1614 |
-
'skin' => 'inline',
|
1615 |
-
'default' => array(
|
1616 |
-
'value' => 'fas fa-bars',
|
1617 |
-
'library' => 'solid',
|
1618 |
-
),
|
1619 |
-
)
|
1620 |
-
);
|
1621 |
-
|
1622 |
-
$this->add_control(
|
1623 |
-
'pa_mobile_close_icon',
|
1624 |
-
array(
|
1625 |
-
'label' => __( 'Close Icon', 'premium-addons-for-elementor' ),
|
1626 |
-
'type' => Controls_Manager::ICONS,
|
1627 |
-
'label_block' => false,
|
1628 |
-
'skin' => 'inline',
|
1629 |
-
'default' => array(
|
1630 |
-
'value' => 'fas fa-times',
|
1631 |
-
'library' => 'solid',
|
1632 |
-
),
|
1633 |
-
)
|
1634 |
-
);
|
1635 |
-
|
1636 |
-
$this->add_responsive_control(
|
1637 |
-
'pa_mobile_toggle_pos',
|
1638 |
-
array(
|
1639 |
-
'label' => __( 'Toggle Button Position', 'premium-addons-for-elementor' ),
|
1640 |
-
'type' => Controls_Manager::CHOOSE,
|
1641 |
-
'options' => array(
|
1642 |
-
$align_left => array(
|
1643 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1644 |
-
'icon' => 'eicon-h-align-left',
|
1645 |
-
),
|
1646 |
-
'center' => array(
|
1647 |
-
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1648 |
-
'icon' => 'eicon-h-align-center',
|
1649 |
-
),
|
1650 |
-
$align_right => array(
|
1651 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1652 |
-
'icon' => 'eicon-h-align-right',
|
1653 |
-
),
|
1654 |
-
),
|
1655 |
-
'default' => 'center',
|
1656 |
-
'toggle' => false,
|
1657 |
-
'selectors' => array(
|
1658 |
-
'{{WRAPPER}} .premium-hamburger-toggle' => 'justify-content: {{VALUE}}',
|
1659 |
-
),
|
1660 |
-
)
|
1661 |
-
);
|
1662 |
-
|
1663 |
-
$this->add_control(
|
1664 |
-
'pa_mobile_menu_pos',
|
1665 |
-
array(
|
1666 |
-
'label' => __( 'Menu Position', 'premium-addons-for-elementor' ),
|
1667 |
-
'type' => Controls_Manager::CHOOSE,
|
1668 |
-
'separator' => 'before',
|
1669 |
-
'options' => array(
|
1670 |
-
'left' => array(
|
1671 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1672 |
-
'icon' => 'eicon-h-align-left',
|
1673 |
-
),
|
1674 |
-
'center' => array(
|
1675 |
-
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1676 |
-
'icon' => 'eicon-h-align-center',
|
1677 |
-
),
|
1678 |
-
'right' => array(
|
1679 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1680 |
-
'icon' => 'eicon-h-align-right',
|
1681 |
-
),
|
1682 |
-
),
|
1683 |
-
'default' => 'right',
|
1684 |
-
'toggle' => false,
|
1685 |
-
'selectors' => array(
|
1686 |
-
'{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu-container, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu-container' => 'justify-content: {{VALUE}}',
|
1687 |
-
),
|
1688 |
-
'conditions' => array(
|
1689 |
-
'relation' => 'or',
|
1690 |
-
'terms' => array(
|
1691 |
-
array(
|
1692 |
-
'name' => 'pa_nav_menu_layout',
|
1693 |
-
'value' => 'dropdown',
|
1694 |
-
),
|
1695 |
-
array(
|
1696 |
-
'relation' => 'and',
|
1697 |
-
'terms' => array(
|
1698 |
-
array(
|
1699 |
-
'name' => 'pa_mobile_menu_layout',
|
1700 |
-
'value' => 'dropdown',
|
1701 |
-
),
|
1702 |
-
array(
|
1703 |
-
'name' => 'pa_nav_menu_layout',
|
1704 |
-
'operator' => 'in',
|
1705 |
-
'value' => array( 'hor', 'ver' ),
|
1706 |
-
),
|
1707 |
-
),
|
1708 |
-
),
|
1709 |
-
),
|
1710 |
-
),
|
1711 |
-
)
|
1712 |
-
);
|
1713 |
-
|
1714 |
-
$this->add_control(
|
1715 |
-
'pa_mobile_menu_align',
|
1716 |
-
array(
|
1717 |
-
'label' => __( 'Menu Alignment', 'premium-addons-for-elementor' ),
|
1718 |
-
'type' => Controls_Manager::CHOOSE,
|
1719 |
-
'options' => array(
|
1720 |
-
$align_left => array(
|
1721 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1722 |
-
'icon' => 'eicon-text-align-left',
|
1723 |
-
),
|
1724 |
-
'center' => array(
|
1725 |
-
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1726 |
-
'icon' => 'eicon-text-align-center',
|
1727 |
-
),
|
1728 |
-
$align_right => array(
|
1729 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1730 |
-
'icon' => 'eicon-text-align-right',
|
1731 |
-
),
|
1732 |
-
),
|
1733 |
-
'default' => 'flex-start',
|
1734 |
-
'toggle' => false,
|
1735 |
-
'selectors' => array(
|
1736 |
-
'{{WRAPPER}}.premium-hamburger-menu .premium-main-mobile-menu > .premium-nav-menu-item > .premium-menu-link, {{WRAPPER}}.premium-nav-dropdown .premium-main-mobile-menu > .premium-nav-menu-item > .premium-menu-link, {{WRAPPER}}.premium-nav-slide .premium-main-mobile-menu > .premium-nav-menu-item > .premium-menu-link' => 'justify-content: {{VALUE}}',
|
1737 |
-
),
|
1738 |
-
)
|
1739 |
-
);
|
1740 |
-
|
1741 |
-
$transform_sign = is_rtl() ? '' : '-';
|
1742 |
-
|
1743 |
-
$this->add_responsive_control(
|
1744 |
-
'pa_ham_menu_width',
|
1745 |
-
array(
|
1746 |
-
'label' => __( 'Toggle Menu Width', 'premium-addons-for-elementor' ),
|
1747 |
-
'type' => Controls_Manager::SLIDER,
|
1748 |
-
'separator' => 'before',
|
1749 |
-
'label_block' => true,
|
1750 |
-
'size_units' => array( 'px', 'vw' ),
|
1751 |
-
'range' => array(
|
1752 |
-
'px' => array(
|
1753 |
-
'min' => 0,
|
1754 |
-
'max' => 1000,
|
1755 |
-
),
|
1756 |
-
),
|
1757 |
-
'selectors' => array(
|
1758 |
-
'{{WRAPPER}}.premium-ham-dropdown .premium-main-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-main-mobile-menu' => 'width: {{SIZE}}{{UNIT}};',
|
1759 |
-
'{{WRAPPER}}.premium-ham-slide .premium-mobile-menu-outer-container, {{WRAPPER}}.premium-nav-slide .premium-mobile-menu-outer-container' => 'width: {{SIZE}}{{UNIT}}; transform:translateX(' . $transform_sign . '{{SIZE}}{{UNIT}} );',
|
1760 |
-
),
|
1761 |
-
'condition' => array(
|
1762 |
-
'pa_toggle_full!' => 'yes',
|
1763 |
-
),
|
1764 |
-
)
|
1765 |
-
);
|
1766 |
-
|
1767 |
-
$this->add_control(
|
1768 |
-
'pa_toggle_full',
|
1769 |
-
array(
|
1770 |
-
'label' => __( 'Full Width', 'premium-addons-for-elementor' ),
|
1771 |
-
'type' => Controls_Manager::SWITCHER,
|
1772 |
-
'render_type' => 'template',
|
1773 |
-
'conditions' => array(
|
1774 |
-
'relation' => 'or',
|
1775 |
-
'terms' => array(
|
1776 |
-
array(
|
1777 |
-
'name' => 'pa_nav_menu_layout',
|
1778 |
-
'value' => 'dropdown',
|
1779 |
-
),
|
1780 |
-
array(
|
1781 |
-
'relation' => 'and',
|
1782 |
-
'terms' => array(
|
1783 |
-
array(
|
1784 |
-
'name' => 'pa_mobile_menu_layout',
|
1785 |
-
'value' => 'dropdown',
|
1786 |
-
),
|
1787 |
-
array(
|
1788 |
-
'name' => 'pa_nav_menu_layout',
|
1789 |
-
'operator' => 'in',
|
1790 |
-
'value' => array( 'hor', 'ver' ),
|
1791 |
-
),
|
1792 |
-
),
|
1793 |
-
),
|
1794 |
-
),
|
1795 |
-
),
|
1796 |
-
)
|
1797 |
-
);
|
1798 |
-
|
1799 |
-
$this->add_control(
|
1800 |
-
'pa_mobile_hide_icon',
|
1801 |
-
array(
|
1802 |
-
'label' => __( 'Hide Items Icon', 'premium-addons-for-elementor' ),
|
1803 |
-
'type' => Controls_Manager::SWITCHER,
|
1804 |
-
'prefix_class' => 'premium-hidden-icon-',
|
1805 |
-
)
|
1806 |
-
);
|
1807 |
-
|
1808 |
-
$this->add_control(
|
1809 |
-
'pa_mobile_hide_badge',
|
1810 |
-
array(
|
1811 |
-
'label' => __( 'Hide Items Badge', 'premium-addons-for-elementor' ),
|
1812 |
-
'type' => Controls_Manager::SWITCHER,
|
1813 |
-
'prefix_class' => 'premium-hidden-badge-',
|
1814 |
-
)
|
1815 |
-
);
|
1816 |
-
|
1817 |
-
$this->add_control(
|
1818 |
-
'pa_disable_page_scroll',
|
1819 |
-
array(
|
1820 |
-
'label' => __( 'Disable Page Scroll', 'premium-addons-for-elementor' ),
|
1821 |
-
'type' => Controls_Manager::SWITCHER,
|
1822 |
-
'prefix_class' => 'premium-disable-scroll-',
|
1823 |
-
'description' => __( 'Enable this option to disable page scroll when the slide menu is opened', 'premium-addons-for-elementor' ),
|
1824 |
-
'render_type' => 'template',
|
1825 |
-
'conditions' => array(
|
1826 |
-
'relation' => 'or',
|
1827 |
-
'terms' => array(
|
1828 |
-
array(
|
1829 |
-
'name' => 'pa_nav_menu_layout',
|
1830 |
-
'operator' => '===',
|
1831 |
-
'value' => 'slide',
|
1832 |
-
),
|
1833 |
-
array(
|
1834 |
-
'name' => 'pa_mobile_menu_layout',
|
1835 |
-
'operator' => '===',
|
1836 |
-
'value' => 'slide',
|
1837 |
-
),
|
1838 |
-
),
|
1839 |
-
),
|
1840 |
-
)
|
1841 |
-
);
|
1842 |
-
|
1843 |
-
$this->end_controls_section();
|
1844 |
-
}
|
1845 |
-
|
1846 |
-
/**
|
1847 |
-
* Get Vertical toggler style.
|
1848 |
-
*
|
1849 |
-
* @access private
|
1850 |
-
* @since 4.9.15
|
1851 |
-
*/
|
1852 |
-
private function get_ver_toggler_style() {
|
1853 |
-
|
1854 |
-
$this->start_controls_section(
|
1855 |
-
'pa_ver_toggler_style_section',
|
1856 |
-
array(
|
1857 |
-
'label' => __( 'Collapsed Menu Style', 'premium-addons-for-elementor' ),
|
1858 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
1859 |
-
'condition' => array(
|
1860 |
-
'pa_ver_toggle_switcher' => 'yes',
|
1861 |
-
'pa_nav_menu_layout' => 'ver',
|
1862 |
-
),
|
1863 |
-
)
|
1864 |
-
);
|
1865 |
-
|
1866 |
-
$this->add_control(
|
1867 |
-
'pa_ver_title_heading',
|
1868 |
-
array(
|
1869 |
-
'label' => __( 'Title', 'premium-addons-for-elementor' ),
|
1870 |
-
'type' => Controls_Manager::HEADING,
|
1871 |
-
)
|
1872 |
-
);
|
1873 |
-
|
1874 |
-
$this->add_group_control(
|
1875 |
-
Group_Control_Typography::get_type(),
|
1876 |
-
array(
|
1877 |
-
'name' => 'pa_ver_title_typo',
|
1878 |
-
'selector' => '{{WRAPPER}} .premium-ver-toggler-txt',
|
1879 |
-
)
|
1880 |
-
);
|
1881 |
-
|
1882 |
-
$this->add_control(
|
1883 |
-
'pa_ver_title_icon_size',
|
1884 |
-
array(
|
1885 |
-
'label' => __( 'Icon Size', 'premium-addons-for-elementor' ),
|
1886 |
-
'type' => Controls_Manager::SLIDER,
|
1887 |
-
'size_units' => array( 'px' ),
|
1888 |
-
'selectors' => array(
|
1889 |
-
'{{WRAPPER}} .premium-ver-title-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
|
1890 |
-
'{{WRAPPER}} .premium-ver-title-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
|
1891 |
-
),
|
1892 |
-
'condition' => array(
|
1893 |
-
'pa_ver_toggle_main_icon[value]!' => '',
|
1894 |
-
),
|
1895 |
-
)
|
1896 |
-
);
|
1897 |
-
|
1898 |
-
$this->start_controls_tabs( 'pa_ver_title_tabs' );
|
1899 |
-
|
1900 |
-
$this->start_controls_tab(
|
1901 |
-
'pa_ver_title_tab_normal',
|
1902 |
-
array(
|
1903 |
-
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
1904 |
-
)
|
1905 |
-
);
|
1906 |
-
|
1907 |
-
$this->add_control(
|
1908 |
-
'pa_ver_title_color',
|
1909 |
-
array(
|
1910 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1911 |
-
'type' => Controls_Manager::COLOR,
|
1912 |
-
'selectors' => array(
|
1913 |
-
'{{WRAPPER}} .premium-ver-toggler-txt' => 'color: {{VALUE}};',
|
1914 |
-
),
|
1915 |
-
)
|
1916 |
-
);
|
1917 |
-
|
1918 |
-
$this->add_control(
|
1919 |
-
'pa_ver_title_icon_color',
|
1920 |
-
array(
|
1921 |
-
'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
|
1922 |
-
'type' => Controls_Manager::COLOR,
|
1923 |
-
'selectors' => array(
|
1924 |
-
'{{WRAPPER}} .premium-ver-title-icon i' => 'color: {{VALUE}};',
|
1925 |
-
'{{WRAPPER}} .premium-ver-title-icon svg, {{WRAPPER}} .premium-ver-title-icon svg path' => 'fill: {{VALUE}};',
|
1926 |
-
),
|
1927 |
-
'condition' => array(
|
1928 |
-
'pa_ver_toggle_main_icon[value]!' => '',
|
1929 |
-
),
|
1930 |
-
)
|
1931 |
-
);
|
1932 |
-
|
1933 |
-
$this->end_controls_tab();
|
1934 |
-
|
1935 |
-
$this->start_controls_tab(
|
1936 |
-
'pa_ver_title_tab_hov',
|
1937 |
-
array(
|
1938 |
-
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1939 |
-
)
|
1940 |
-
);
|
1941 |
-
|
1942 |
-
$this->add_control(
|
1943 |
-
'pa_ver_title_color_hov',
|
1944 |
-
array(
|
1945 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1946 |
-
'type' => Controls_Manager::COLOR,
|
1947 |
-
'selectors' => array(
|
1948 |
-
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-toggler-txt' => 'color: {{VALUE}};',
|
1949 |
-
),
|
1950 |
-
)
|
1951 |
-
);
|
1952 |
-
|
1953 |
-
$this->add_control(
|
1954 |
-
'pa_ver_title_icon_color_hov',
|
1955 |
-
array(
|
1956 |
-
'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
|
1957 |
-
'type' => Controls_Manager::COLOR,
|
1958 |
-
'selectors' => array(
|
1959 |
-
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-title-icon i' => 'color: {{VALUE}};',
|
1960 |
-
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-title-icon svg, {{WRAPPER}} .premium-ver-toggler:hover .premium-ver-title-icon svg path' => 'fill: {{VALUE}};',
|
1961 |
-
),
|
1962 |
-
'condition' => array(
|
1963 |
-
'pa_ver_toggle_main_icon[value]!' => '',
|
1964 |
-
),
|
1965 |
-
)
|
1966 |
-
);
|
1967 |
-
|
1968 |
-
$this->end_controls_tab();
|
1969 |
-
|
1970 |
-
$this->end_controls_tabs();
|
1971 |
-
|
1972 |
-
$this->add_control(
|
1973 |
-
'pa_ver_toggle_heading',
|
1974 |
-
array(
|
1975 |
-
'label' => __( 'Toggle Icon', 'premium-addons-for-elementor' ),
|
1976 |
-
'type' => Controls_Manager::HEADING,
|
1977 |
-
'separator' => 'before',
|
1978 |
-
'conditions' => array(
|
1979 |
-
'relation' => 'or',
|
1980 |
-
'terms' => array(
|
1981 |
-
array(
|
1982 |
-
'name' => 'pa_ver_toggle_toggle_icon[value]',
|
1983 |
-
'operator' => '!==',
|
1984 |
-
'value' => '',
|
1985 |
-
),
|
1986 |
-
array(
|
1987 |
-
'name' => 'pa_ver_toggle_close_icon[value]',
|
1988 |
-
'operator' => '!==',
|
1989 |
-
'value' => '',
|
1990 |
-
),
|
1991 |
-
),
|
1992 |
-
),
|
1993 |
-
)
|
1994 |
-
);
|
1995 |
-
|
1996 |
-
$this->add_control(
|
1997 |
-
'pa_ver_toggle_icon_size',
|
1998 |
-
array(
|
1999 |
-
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
2000 |
-
'type' => Controls_Manager::SLIDER,
|
2001 |
-
'size_units' => array( 'px' ),
|
2002 |
-
'selectors' => array(
|
2003 |
-
'{{WRAPPER}} .premium-ver-toggler-btn i' => 'font-size: {{SIZE}}{{UNIT}};',
|
2004 |
-
'{{WRAPPER}} .premium-ver-toggler-btn svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
|
2005 |
-
),
|
2006 |
-
'conditions' => array(
|
2007 |
-
'relation' => 'or',
|
2008 |
-
'terms' => array(
|
2009 |
-
array(
|
2010 |
-
'name' => 'pa_ver_toggle_toggle_icon[value]',
|
2011 |
-
'operator' => '!==',
|
2012 |
-
'value' => '',
|
2013 |
-
),
|
2014 |
-
array(
|
2015 |
-
'name' => 'pa_ver_toggle_close_icon[value]',
|
2016 |
-
'operator' => '!==',
|
2017 |
-
'value' => '',
|
2018 |
-
),
|
2019 |
-
),
|
2020 |
-
),
|
2021 |
-
)
|
2022 |
-
);
|
2023 |
-
|
2024 |
-
$this->start_controls_tabs( 'pa_ver_toggle_icon_tabs' );
|
2025 |
-
|
2026 |
-
$this->start_controls_tab(
|
2027 |
-
'pa_ver_toggle_tab_normal',
|
2028 |
-
array(
|
2029 |
-
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
2030 |
-
'conditions' => array(
|
2031 |
-
'relation' => 'or',
|
2032 |
-
'terms' => array(
|
2033 |
-
array(
|
2034 |
-
'name' => 'pa_ver_toggle_toggle_icon[value]',
|
2035 |
-
'operator' => '!==',
|
2036 |
-
'value' => '',
|
2037 |
-
),
|
2038 |
-
array(
|
2039 |
-
'name' => 'pa_ver_toggle_close_icon[value]',
|
2040 |
-
'operator' => '!==',
|
2041 |
-
'value' => '',
|
2042 |
-
),
|
2043 |
-
),
|
2044 |
-
),
|
2045 |
-
)
|
2046 |
-
);
|
2047 |
-
|
2048 |
-
$this->add_control(
|
2049 |
-
'pa_ver_toggle_icon_color',
|
2050 |
-
array(
|
2051 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2052 |
-
'type' => Controls_Manager::COLOR,
|
2053 |
-
'selectors' => array(
|
2054 |
-
'{{WRAPPER}} .premium-ver-toggler-btn i' => 'color: {{VALUE}};',
|
2055 |
-
'{{WRAPPER}} .premium-ver-toggler-btn svg, {{WRAPPER}} .premium-ver-toggler-btn svg path' => 'fill: {{VALUE}};',
|
2056 |
-
),
|
2057 |
-
)
|
2058 |
-
);
|
2059 |
-
|
2060 |
-
$this->end_controls_tab();
|
2061 |
-
|
2062 |
-
$this->start_controls_tab(
|
2063 |
-
'pa_ver_toggle_tab_hov',
|
2064 |
-
array(
|
2065 |
-
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
2066 |
-
'conditions' => array(
|
2067 |
-
'relation' => 'or',
|
2068 |
-
'terms' => array(
|
2069 |
-
array(
|
2070 |
-
'name' => 'pa_ver_toggle_toggle_icon[value]',
|
2071 |
-
'operator' => '!==',
|
2072 |
-
'value' => '',
|
2073 |
-
),
|
2074 |
-
array(
|
2075 |
-
'name' => 'pa_ver_toggle_close_icon[value]',
|
2076 |
-
'operator' => '!==',
|
2077 |
-
'value' => '',
|
2078 |
-
),
|
2079 |
-
),
|
2080 |
-
),
|
2081 |
-
)
|
2082 |
-
);
|
2083 |
-
|
2084 |
-
$this->add_control(
|
2085 |
-
'pa_ver_toggle_icon_color_hov',
|
2086 |
-
array(
|
2087 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2088 |
-
'type' => Controls_Manager::COLOR,
|
2089 |
-
'selectors' => array(
|
2090 |
-
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-toggler-btn i' => 'color: {{VALUE}};',
|
2091 |
-
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-toggler-btn svg,
|
2092 |
-
{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-toggler-btn svg path' => 'fill: {{VALUE}};',
|
2093 |
-
),
|
2094 |
-
)
|
2095 |
-
);
|
2096 |
-
|
2097 |
-
$this->end_controls_tab();
|
2098 |
-
|
2099 |
-
$this->end_controls_tabs();
|
2100 |
-
|
2101 |
-
$this->add_control(
|
2102 |
-
'pa_ver_container_heading',
|
2103 |
-
array(
|
2104 |
-
'label' => __( 'Container', 'premium-addons-for-elementor' ),
|
2105 |
-
'type' => Controls_Manager::HEADING,
|
2106 |
-
'separator' => 'before',
|
2107 |
-
)
|
2108 |
-
);
|
2109 |
-
|
2110 |
-
$this->start_controls_tabs( 'pa_ver_toggler_tabs' );
|
2111 |
-
|
2112 |
-
$this->start_controls_tab(
|
2113 |
-
'pa_ver_toggler_tab_normal',
|
2114 |
-
array(
|
2115 |
-
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
2116 |
-
)
|
2117 |
-
);
|
2118 |
-
|
2119 |
-
$this->add_group_control(
|
2120 |
-
Group_Control_Background::get_type(),
|
2121 |
-
array(
|
2122 |
-
'name' => 'pa_ver_toggler_bg',
|
2123 |
-
'types' => array( 'classic', 'gradient' ),
|
2124 |
-
'selector' => '{{WRAPPER}} .premium-ver-toggler',
|
2125 |
-
)
|
2126 |
-
);
|
2127 |
-
|
2128 |
-
$this->add_group_control(
|
2129 |
-
Group_Control_Box_Shadow::get_type(),
|
2130 |
-
array(
|
2131 |
-
'name' => 'pa_ver_toggler_shadow',
|
2132 |
-
'selector' => '{{WRAPPER}} .premium-ver-toggler',
|
2133 |
-
)
|
2134 |
-
);
|
2135 |
-
|
2136 |
-
$this->end_controls_tab();
|
2137 |
-
|
2138 |
-
$this->start_controls_tab(
|
2139 |
-
'pa_ver_toggler_tab_hov',
|
2140 |
-
array(
|
2141 |
-
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
2142 |
-
)
|
2143 |
-
);
|
2144 |
-
|
2145 |
-
$this->add_group_control(
|
2146 |
-
Group_Control_Background::get_type(),
|
2147 |
-
array(
|
2148 |
-
'name' => 'pa_ver_toggler_bg_hov',
|
2149 |
-
'types' => array( 'classic', 'gradient' ),
|
2150 |
-
'selector' => '{{WRAPPER}} .premium-ver-toggler:hover',
|
2151 |
-
)
|
2152 |
-
);
|
2153 |
-
|
2154 |
-
$this->add_group_control(
|
2155 |
-
Group_Control_Box_Shadow::get_type(),
|
2156 |
-
array(
|
2157 |
-
'name' => 'pa_ver_toggler_shadow_hov',
|
2158 |
-
'selector' => '{{WRAPPER}} .premium-ver-toggler:hover',
|
2159 |
-
)
|
2160 |
-
);
|
2161 |
-
|
2162 |
-
$this->end_controls_tab();
|
2163 |
-
|
2164 |
-
$this->end_controls_tabs();
|
2165 |
-
|
2166 |
-
$this->add_group_control(
|
2167 |
-
Group_Control_Border::get_type(),
|
2168 |
-
array(
|
2169 |
-
'name' => 'pa_ver_toggler_border',
|
2170 |
-
'selector' => '{{WRAPPER}} .premium-ver-toggler',
|
2171 |
-
'separator' => 'before',
|
2172 |
-
)
|
2173 |
-
);
|
2174 |
-
|
2175 |
-
$this->add_control(
|
2176 |
-
'pa_ver_toggler_rad',
|
2177 |
-
array(
|
2178 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2179 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2180 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2181 |
-
'selectors' => array(
|
2182 |
-
'{{WRAPPER}} .premium-ver-toggler' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2183 |
-
),
|
2184 |
-
)
|
2185 |
-
);
|
2186 |
-
|
2187 |
-
$this->add_responsive_control(
|
2188 |
-
'pa_ver_toggler_padding',
|
2189 |
-
array(
|
2190 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2191 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2192 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2193 |
-
'selectors' => array(
|
2194 |
-
'{{WRAPPER}} .premium-ver-toggler' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2195 |
-
),
|
2196 |
-
)
|
2197 |
-
);
|
2198 |
-
|
2199 |
-
$this->end_controls_section();
|
2200 |
-
}
|
2201 |
-
|
2202 |
-
/**
|
2203 |
-
* Get menu container style.
|
2204 |
-
*
|
2205 |
-
* @access private
|
2206 |
-
* @since 4.9.3
|
2207 |
-
*/
|
2208 |
-
private function get_menu_container_style() {
|
2209 |
-
|
2210 |
-
$this->start_controls_section(
|
2211 |
-
'premium_nav_style_section',
|
2212 |
-
array(
|
2213 |
-
'label' => __( 'Desktop Menu Style', 'premium-addons-for-elementor' ),
|
2214 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
2215 |
-
'condition' => array(
|
2216 |
-
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
2217 |
-
),
|
2218 |
-
)
|
2219 |
-
);
|
2220 |
-
|
2221 |
-
$this->add_responsive_control(
|
2222 |
-
'pa_nav_menu_height',
|
2223 |
-
array(
|
2224 |
-
'label' => __( 'Height', 'premium-addons-for-elementor' ),
|
2225 |
-
'type' => Controls_Manager::SLIDER,
|
2226 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2227 |
-
'label_block' => true,
|
2228 |
-
'selectors' => array(
|
2229 |
-
'{{WRAPPER}}.premium-nav-hor > .elementor-widget-container > .premium-nav-widget-container > .premium-ver-inner-container > .premium-nav-menu-container' => 'height: {{SIZE}}{{UNIT}};',
|
2230 |
-
),
|
2231 |
-
'condition' => array(
|
2232 |
-
'pa_nav_menu_layout' => 'hor',
|
2233 |
-
),
|
2234 |
-
)
|
2235 |
-
);
|
2236 |
-
|
2237 |
-
$this->add_responsive_control(
|
2238 |
-
'pa_nav_menu_width',
|
2239 |
-
array(
|
2240 |
-
'label' => __( 'Width', 'premium-addons-for-elementor' ),
|
2241 |
-
'type' => Controls_Manager::SLIDER,
|
2242 |
-
'size_units' => array( 'px', '%' ),
|
2243 |
-
'range' => array(
|
2244 |
-
'px' => array(
|
2245 |
-
'min' => 0,
|
2246 |
-
'max' => 1000,
|
2247 |
-
),
|
2248 |
-
),
|
2249 |
-
'label_block' => true,
|
2250 |
-
'selectors' => array(
|
2251 |
-
// '{{WRAPPER}}.premium-nav-ver .premium-nav-menu-container, {{WRAPPER}}.premium-nav-ver .premium-ver-toggler' => 'width: {{SIZE}}{{UNIT}};',
|
2252 |
-
'{{WRAPPER}}.premium-nav-ver .premium-ver-inner-container' => 'width: {{SIZE}}{{UNIT}};',
|
2253 |
-
),
|
2254 |
-
'condition' => array(
|
2255 |
-
'pa_nav_menu_layout' => 'ver',
|
2256 |
-
),
|
2257 |
-
)
|
2258 |
-
);
|
2259 |
-
|
2260 |
-
$this->add_group_control(
|
2261 |
-
Group_Control_Box_Shadow::get_type(),
|
2262 |
-
array(
|
2263 |
-
'name' => 'pa_nav_menu_shadow',
|
2264 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container',
|
2265 |
-
)
|
2266 |
-
);
|
2267 |
-
|
2268 |
-
$this->add_group_control(
|
2269 |
-
Group_Control_Background::get_type(),
|
2270 |
-
array(
|
2271 |
-
'name' => 'pa_nav_menu_background',
|
2272 |
-
'types' => array( 'classic', 'gradient' ),
|
2273 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container',
|
2274 |
-
)
|
2275 |
-
);
|
2276 |
-
|
2277 |
-
$this->add_group_control(
|
2278 |
-
Group_Control_Border::get_type(),
|
2279 |
-
array(
|
2280 |
-
'name' => 'pa_nav_menu_border',
|
2281 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container',
|
2282 |
-
)
|
2283 |
-
);
|
2284 |
-
|
2285 |
-
$this->add_control(
|
2286 |
-
'pa_nav_menu_rad',
|
2287 |
-
array(
|
2288 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2289 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2290 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2291 |
-
'selectors' => array(
|
2292 |
-
'{{WRAPPER}} .premium-nav-menu-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2293 |
-
),
|
2294 |
-
)
|
2295 |
-
);
|
2296 |
-
|
2297 |
-
$this->add_responsive_control(
|
2298 |
-
'pa_nav_menu_padding',
|
2299 |
-
array(
|
2300 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2301 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2302 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2303 |
-
'selectors' => array(
|
2304 |
-
'{{WRAPPER}} .premium-nav-menu-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2305 |
-
),
|
2306 |
-
)
|
2307 |
-
);
|
2308 |
-
|
2309 |
-
$this->end_controls_section();
|
2310 |
-
}
|
2311 |
-
|
2312 |
-
/**
|
2313 |
-
* Get toggle menu container style.
|
2314 |
-
*
|
2315 |
-
* @access private
|
2316 |
-
* @since 4.9.3
|
2317 |
-
*/
|
2318 |
-
private function get_toggle_menu_sytle() {
|
2319 |
-
|
2320 |
-
$this->start_controls_section(
|
2321 |
-
'premium_toggle_mene_style_section',
|
2322 |
-
array(
|
2323 |
-
'label' => __( 'Expand/Slide Menu Style', 'premium-addons-for-elementor' ),
|
2324 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
2325 |
-
)
|
2326 |
-
);
|
2327 |
-
|
2328 |
-
$this->add_control(
|
2329 |
-
'pa_ham_toggle_style',
|
2330 |
-
array(
|
2331 |
-
'label' => __( 'Toggle Button', 'premium-addons-for-elementor' ),
|
2332 |
-
'type' => Controls_Manager::HEADING,
|
2333 |
-
)
|
2334 |
-
);
|
2335 |
-
|
2336 |
-
$this->start_controls_tabs( 'pa_ham_toggle_style_tabs' );
|
2337 |
-
|
2338 |
-
$this->start_controls_tab(
|
2339 |
-
'pa_ham_toggle_icon_tab',
|
2340 |
-
array(
|
2341 |
-
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
2342 |
-
)
|
2343 |
-
);
|
2344 |
-
|
2345 |
-
$this->add_responsive_control(
|
2346 |
-
'pa_ham_toggle_icon_size',
|
2347 |
-
array(
|
2348 |
-
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
2349 |
-
'type' => Controls_Manager::SLIDER,
|
2350 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2351 |
-
'label_block' => true,
|
2352 |
-
'selectors' => array(
|
2353 |
-
'{{WRAPPER}} .premium-hamburger-toggle i' => 'font-size: {{SIZE}}{{UNIT}};',
|
2354 |
-
'{{WRAPPER}} .premium-hamburger-toggle svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
2355 |
-
),
|
2356 |
-
)
|
2357 |
-
);
|
2358 |
-
|
2359 |
-
$this->add_control(
|
2360 |
-
'pa_ham_toggle_color',
|
2361 |
-
array(
|
2362 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2363 |
-
'type' => Controls_Manager::COLOR,
|
2364 |
-
'selectors' => array(
|
2365 |
-
'{{WRAPPER}} .premium-hamburger-toggle i' => 'color: {{VALUE}};',
|
2366 |
-
'{{WRAPPER}} .premium-hamburger-toggle svg, {{WRAPPER}} .premium-hamburger-toggle svg path' => 'fill: {{VALUE}};',
|
2367 |
-
),
|
2368 |
-
)
|
2369 |
-
);
|
2370 |
-
|
2371 |
-
$this->add_control(
|
2372 |
-
'pa_ham_toggle_color_hover',
|
2373 |
-
array(
|
2374 |
-
'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
|
2375 |
-
'type' => Controls_Manager::COLOR,
|
2376 |
-
'selectors' => array(
|
2377 |
-
'{{WRAPPER}} .premium-hamburger-toggle:hover i' => 'color: {{VALUE}};',
|
2378 |
-
'{{WRAPPER}} .premium-hamburger-toggle:hover svg, {{WRAPPER}} .premium-hamburger-toggle:hover svg path' => 'fill: {{VALUE}};',
|
2379 |
-
),
|
2380 |
-
)
|
2381 |
-
);
|
2382 |
-
|
2383 |
-
$this->end_controls_tab();
|
2384 |
-
|
2385 |
-
$this->start_controls_tab(
|
2386 |
-
'pa_ham_toggle_label_tab',
|
2387 |
-
array(
|
2388 |
-
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
2389 |
-
)
|
2390 |
-
);
|
2391 |
-
|
2392 |
-
$this->add_group_control(
|
2393 |
-
Group_Control_Typography::get_type(),
|
2394 |
-
array(
|
2395 |
-
'name' => 'pa_ham_toggle_txt_typo',
|
2396 |
-
'selector' => '{{WRAPPER}} .premium-hamburger-toggle .premium-toggle-text, {{WRAPPER}}.premium-ham-dropdown .premium-hamburger-toggle .premium-toggle-close',
|
2397 |
-
)
|
2398 |
-
);
|
2399 |
-
|
2400 |
-
$this->add_control(
|
2401 |
-
'pa_ham_toggle_txt_color',
|
2402 |
-
array(
|
2403 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2404 |
-
'type' => Controls_Manager::COLOR,
|
2405 |
-
'selectors' => array(
|
2406 |
-
'{{WRAPPER}} .premium-hamburger-toggle .premium-toggle-text, {{WRAPPER}}.premium-ham-dropdown .premium-hamburger-toggle .premium-toggle-close' => 'color: {{VALUE}};',
|
2407 |
-
),
|
2408 |
-
)
|
2409 |
-
);
|
2410 |
-
|
2411 |
-
$this->add_control(
|
2412 |
-
'pa_ham_toggle_txt_color_hover',
|
2413 |
-
array(
|
2414 |
-
'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
|
2415 |
-
'type' => Controls_Manager::COLOR,
|
2416 |
-
'selectors' => array(
|
2417 |
-
'{{WRAPPER}} .premium-hamburger-toggle:hover .premium-toggle-text, {{WRAPPER}}.premium-ham-dropdown .premium-hamburger-toggle:hover .premium-toggle-close' => 'color: {{VALUE}};',
|
2418 |
-
),
|
2419 |
-
)
|
2420 |
-
);
|
2421 |
-
|
2422 |
-
$this->add_responsive_control(
|
2423 |
-
'pa_ham_toggle_txt_margin',
|
2424 |
-
array(
|
2425 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2426 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2427 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2428 |
-
'selectors' => array(
|
2429 |
-
'{{WRAPPER}} .premium-hamburger-toggle .premium-toggle-text, {{WRAPPER}}.premium-ham-dropdown .premium-hamburger-toggle .premium-toggle-close' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2430 |
-
),
|
2431 |
-
)
|
2432 |
-
);
|
2433 |
-
|
2434 |
-
$this->end_controls_tab();
|
2435 |
-
|
2436 |
-
$this->end_controls_tabs();
|
2437 |
-
|
2438 |
-
$this->add_control(
|
2439 |
-
'pa_ham_toggle_bg',
|
2440 |
-
array(
|
2441 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
2442 |
-
'separator' => 'before',
|
2443 |
-
'type' => Controls_Manager::COLOR,
|
2444 |
-
'selectors' => array(
|
2445 |
-
'{{WRAPPER}} .premium-hamburger-toggle' => 'background-color: {{VALUE}};',
|
2446 |
-
),
|
2447 |
-
)
|
2448 |
-
);
|
2449 |
-
|
2450 |
-
$this->add_control(
|
2451 |
-
'pa_ham_toggle_bg_hover',
|
2452 |
-
array(
|
2453 |
-
'label' => __( 'Hover Background Color', 'premium-addons-for-elementor' ),
|
2454 |
-
'type' => Controls_Manager::COLOR,
|
2455 |
-
'selectors' => array(
|
2456 |
-
'{{WRAPPER}} .premium-hamburger-toggle:hover' => 'background-color: {{VALUE}};',
|
2457 |
-
),
|
2458 |
-
)
|
2459 |
-
);
|
2460 |
-
|
2461 |
-
$this->add_group_control(
|
2462 |
-
Group_Control_Box_Shadow::get_type(),
|
2463 |
-
array(
|
2464 |
-
'name' => 'pa_ham_toggle_shadow',
|
2465 |
-
'selector' => '{{WRAPPER}} .premium-hamburger-toggle',
|
2466 |
-
)
|
2467 |
-
);
|
2468 |
-
|
2469 |
-
$this->add_group_control(
|
2470 |
-
Group_Control_Border::get_type(),
|
2471 |
-
array(
|
2472 |
-
'name' => 'pa_ham_toggle_border',
|
2473 |
-
'selector' => '{{WRAPPER}} .premium-hamburger-toggle',
|
2474 |
-
)
|
2475 |
-
);
|
2476 |
-
|
2477 |
-
$this->add_control(
|
2478 |
-
'pa_ham_toggle_rad',
|
2479 |
-
array(
|
2480 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2481 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2482 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2483 |
-
'selectors' => array(
|
2484 |
-
'{{WRAPPER}} .premium-hamburger-toggle' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2485 |
-
),
|
2486 |
-
)
|
2487 |
-
);
|
2488 |
-
|
2489 |
-
$this->add_responsive_control(
|
2490 |
-
'pa_ham_toggle_padding',
|
2491 |
-
array(
|
2492 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2493 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2494 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2495 |
-
'selectors' => array(
|
2496 |
-
'{{WRAPPER}} .premium-hamburger-toggle' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2497 |
-
),
|
2498 |
-
)
|
2499 |
-
);
|
2500 |
-
|
2501 |
-
$this->add_responsive_control(
|
2502 |
-
'pa_ham_toggle_margin',
|
2503 |
-
array(
|
2504 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2505 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2506 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2507 |
-
'selectors' => array(
|
2508 |
-
'{{WRAPPER}} .premium-hamburger-toggle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2509 |
-
),
|
2510 |
-
)
|
2511 |
-
);
|
2512 |
-
|
2513 |
-
$this->add_control(
|
2514 |
-
'pa_ham_menu_style',
|
2515 |
-
array(
|
2516 |
-
'label' => __( 'Toggle Menu', 'premium-addons-for-elementor' ),
|
2517 |
-
'type' => Controls_Manager::HEADING,
|
2518 |
-
'separator' => 'before',
|
2519 |
-
)
|
2520 |
-
);
|
2521 |
-
|
2522 |
-
$this->add_control(
|
2523 |
-
'pa_ham_menu_item_color',
|
2524 |
-
array(
|
2525 |
-
'label' => __( 'Menu Item Color', 'premium-addons-for-elementor' ),
|
2526 |
-
'type' => Controls_Manager::COLOR,
|
2527 |
-
'selectors' => array(
|
2528 |
-
'{{WRAPPER}} .premium-main-mobile-menu.premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'color: {{VALUE}};',
|
2529 |
-
),
|
2530 |
-
)
|
2531 |
-
);
|
2532 |
-
|
2533 |
-
$this->add_control(
|
2534 |
-
'pa_ham_menu_overlay',
|
2535 |
-
array(
|
2536 |
-
'label' => __( 'Overlay Color', 'premium-addons-for-elementor' ),
|
2537 |
-
'type' => Controls_Manager::COLOR,
|
2538 |
-
'selectors' => array(
|
2539 |
-
'{{WRAPPER}} .premium-nav-slide-overlay' => 'background: {{VALUE}};',
|
2540 |
-
),
|
2541 |
-
'conditions' => array(
|
2542 |
-
'relation' => 'or',
|
2543 |
-
'terms' => array(
|
2544 |
-
array(
|
2545 |
-
'name' => 'pa_nav_menu_layout',
|
2546 |
-
'value' => 'slide',
|
2547 |
-
),
|
2548 |
-
array(
|
2549 |
-
'relation' => 'and',
|
2550 |
-
'terms' => array(
|
2551 |
-
array(
|
2552 |
-
'name' => 'pa_mobile_menu_layout',
|
2553 |
-
'value' => 'slide',
|
2554 |
-
),
|
2555 |
-
array(
|
2556 |
-
'name' => 'pa_nav_menu_layout',
|
2557 |
-
'operator' => 'in',
|
2558 |
-
'value' => array( 'hor', 'ver' ),
|
2559 |
-
),
|
2560 |
-
),
|
2561 |
-
),
|
2562 |
-
),
|
2563 |
-
),
|
2564 |
-
)
|
2565 |
-
);
|
2566 |
-
|
2567 |
-
$this->add_group_control(
|
2568 |
-
Group_Control_Box_Shadow::get_type(),
|
2569 |
-
array(
|
2570 |
-
'name' => 'pa_ham_menu_shadow',
|
2571 |
-
'selector' => '{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu, {{WRAPPER}} .premium-mobile-menu-outer-container',
|
2572 |
-
)
|
2573 |
-
);
|
2574 |
-
|
2575 |
-
$this->add_group_control(
|
2576 |
-
Group_Control_Background::get_type(),
|
2577 |
-
array(
|
2578 |
-
'name' => 'pa_ham_menu_background',
|
2579 |
-
'types' => array( 'classic', 'gradient' ),
|
2580 |
-
'selector' => '{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu,
|
2581 |
-
{{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu,
|
2582 |
-
{{WRAPPER}} .premium-mobile-menu-outer-container,
|
2583 |
-
{{WRAPPER}} .premium-mobile-menu-container',
|
2584 |
-
|
2585 |
-
)
|
2586 |
-
);
|
2587 |
-
|
2588 |
-
$this->add_group_control(
|
2589 |
-
Group_Control_Border::get_type(),
|
2590 |
-
array(
|
2591 |
-
'name' => 'pa_ham_menu_border',
|
2592 |
-
'selector' => '{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu, {{WRAPPER}} .premium-mobile-menu-outer-container',
|
2593 |
-
)
|
2594 |
-
);
|
2595 |
-
|
2596 |
-
$this->add_control(
|
2597 |
-
'pa_ham_menu_rad',
|
2598 |
-
array(
|
2599 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2600 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2601 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2602 |
-
'selectors' => array(
|
2603 |
-
'{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2604 |
-
),
|
2605 |
-
'condition' => array(
|
2606 |
-
'pa_mobile_menu_layout' => 'dropdown',
|
2607 |
-
),
|
2608 |
-
)
|
2609 |
-
);
|
2610 |
-
|
2611 |
-
$this->add_responsive_control(
|
2612 |
-
'pa_ham_menu_padding',
|
2613 |
-
array(
|
2614 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2615 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2616 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2617 |
-
'selectors' => array(
|
2618 |
-
'{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu, {{WRAPPER}} .premium-mobile-menu-outer-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2619 |
-
),
|
2620 |
-
)
|
2621 |
-
);
|
2622 |
-
|
2623 |
-
$this->end_controls_section();
|
2624 |
-
|
2625 |
-
// Show close button style if desktop or mobile menu is set to slide.
|
2626 |
-
$close_btn_conditions = array(
|
2627 |
-
'relation' => 'or',
|
2628 |
-
'terms' => array(
|
2629 |
-
array(
|
2630 |
-
'name' => 'pa_nav_menu_layout',
|
2631 |
-
'value' => 'slide',
|
2632 |
-
),
|
2633 |
-
array(
|
2634 |
-
'name' => 'pa_mobile_menu_layout',
|
2635 |
-
'value' => 'slide',
|
2636 |
-
),
|
2637 |
-
),
|
2638 |
-
);
|
2639 |
-
|
2640 |
-
$this->start_controls_section(
|
2641 |
-
'ham_close_style_section',
|
2642 |
-
array(
|
2643 |
-
'label' => __( 'Close Button Style', 'premium-addons-for-elementor' ),
|
2644 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
2645 |
-
'conditions' => array_merge(
|
2646 |
-
$close_btn_conditions,
|
2647 |
-
array()
|
2648 |
-
),
|
2649 |
-
)
|
2650 |
-
);
|
2651 |
-
|
2652 |
-
$this->start_controls_tabs( 'pa_ham_close_style_tabs' );
|
2653 |
-
|
2654 |
-
$this->start_controls_tab(
|
2655 |
-
'pa_ham_close_icon_tab',
|
2656 |
-
array(
|
2657 |
-
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
2658 |
-
)
|
2659 |
-
);
|
2660 |
-
|
2661 |
-
$this->add_responsive_control(
|
2662 |
-
'pa_ham_close_size',
|
2663 |
-
array(
|
2664 |
-
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
2665 |
-
'type' => Controls_Manager::SLIDER,
|
2666 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2667 |
-
'label_block' => true,
|
2668 |
-
'selectors' => array(
|
2669 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close i' => 'font-size: {{SIZE}}{{UNIT}};',
|
2670 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
2671 |
-
),
|
2672 |
-
)
|
2673 |
-
);
|
2674 |
-
|
2675 |
-
$this->add_control(
|
2676 |
-
'pa_ham_close_color',
|
2677 |
-
array(
|
2678 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2679 |
-
'type' => Controls_Manager::COLOR,
|
2680 |
-
'selectors' => array(
|
2681 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close i' => 'color: {{VALUE}};',
|
2682 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close svg, {{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close svg path' => 'fill: {{VALUE}};',
|
2683 |
-
),
|
2684 |
-
)
|
2685 |
-
);
|
2686 |
-
|
2687 |
-
$this->add_control(
|
2688 |
-
'pa_ham_close_color_hover',
|
2689 |
-
array(
|
2690 |
-
'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
|
2691 |
-
'type' => Controls_Manager::COLOR,
|
2692 |
-
'selectors' => array(
|
2693 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover i' => 'color: {{VALUE}};',
|
2694 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover svg, {{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover svg path' => 'fill: {{VALUE}};',
|
2695 |
-
),
|
2696 |
-
)
|
2697 |
-
);
|
2698 |
-
|
2699 |
-
$this->end_controls_tab();
|
2700 |
-
|
2701 |
-
$this->start_controls_tab(
|
2702 |
-
'pa_ham_close_txt_tab',
|
2703 |
-
array(
|
2704 |
-
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
2705 |
-
)
|
2706 |
-
);
|
2707 |
-
|
2708 |
-
$this->add_group_control(
|
2709 |
-
Group_Control_Typography::get_type(),
|
2710 |
-
array(
|
2711 |
-
'name' => 'pa_ham_close_txt_typo',
|
2712 |
-
'selector' => '{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close .premium-toggle-close',
|
2713 |
-
)
|
2714 |
-
);
|
2715 |
-
|
2716 |
-
$this->add_control(
|
2717 |
-
'pa_ham_close_txt_color',
|
2718 |
-
array(
|
2719 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2720 |
-
'type' => Controls_Manager::COLOR,
|
2721 |
-
'selectors' => array(
|
2722 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close .premium-toggle-close' => 'color: {{VALUE}};',
|
2723 |
-
),
|
2724 |
-
)
|
2725 |
-
);
|
2726 |
-
|
2727 |
-
$this->add_control(
|
2728 |
-
'pa_ham_close_txt_color_hover',
|
2729 |
-
array(
|
2730 |
-
'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
|
2731 |
-
'type' => Controls_Manager::COLOR,
|
2732 |
-
'selectors' => array(
|
2733 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover .premium-toggle-close' => 'color: {{VALUE}};',
|
2734 |
-
),
|
2735 |
-
)
|
2736 |
-
);
|
2737 |
-
|
2738 |
-
$this->add_responsive_control(
|
2739 |
-
'pa_ham_close_txt_margin',
|
2740 |
-
array(
|
2741 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2742 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2743 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2744 |
-
'selectors' => array(
|
2745 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close .premium-toggle-close' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2746 |
-
),
|
2747 |
-
)
|
2748 |
-
);
|
2749 |
-
|
2750 |
-
$this->end_controls_tab();
|
2751 |
-
|
2752 |
-
$this->end_controls_tabs();
|
2753 |
-
|
2754 |
-
$this->add_control(
|
2755 |
-
'pa_ham_close_bg',
|
2756 |
-
array(
|
2757 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
2758 |
-
'type' => Controls_Manager::COLOR,
|
2759 |
-
'separator' => 'before',
|
2760 |
-
'selectors' => array(
|
2761 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close' => 'background-color: {{VALUE}};',
|
2762 |
-
),
|
2763 |
-
)
|
2764 |
-
);
|
2765 |
-
|
2766 |
-
$this->add_control(
|
2767 |
-
'pa_ham_close_bg_hover',
|
2768 |
-
array(
|
2769 |
-
'label' => __( 'Hover Background Color', 'premium-addons-for-elementor' ),
|
2770 |
-
'type' => Controls_Manager::COLOR,
|
2771 |
-
'selectors' => array(
|
2772 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover' => 'background-color: {{VALUE}};',
|
2773 |
-
),
|
2774 |
-
)
|
2775 |
-
);
|
2776 |
-
|
2777 |
-
$this->add_group_control(
|
2778 |
-
Group_Control_Box_Shadow::get_type(),
|
2779 |
-
array(
|
2780 |
-
'name' => 'pa_ham_close_shadow',
|
2781 |
-
'selector' => '{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close',
|
2782 |
-
)
|
2783 |
-
);
|
2784 |
-
|
2785 |
-
$this->add_group_control(
|
2786 |
-
Group_Control_Border::get_type(),
|
2787 |
-
array(
|
2788 |
-
'name' => 'pa_ham_close_border',
|
2789 |
-
'selector' => '{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close',
|
2790 |
-
)
|
2791 |
-
);
|
2792 |
-
|
2793 |
-
$this->add_control(
|
2794 |
-
'pa_ham_close_rad',
|
2795 |
-
array(
|
2796 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2797 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2798 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2799 |
-
'selectors' => array(
|
2800 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2801 |
-
),
|
2802 |
-
)
|
2803 |
-
);
|
2804 |
-
|
2805 |
-
$this->add_responsive_control(
|
2806 |
-
'pa_ham_close_padding',
|
2807 |
-
array(
|
2808 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2809 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2810 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2811 |
-
'selectors' => array(
|
2812 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2813 |
-
),
|
2814 |
-
)
|
2815 |
-
);
|
2816 |
-
|
2817 |
-
$this->add_responsive_control(
|
2818 |
-
'pa_ham_close_margin',
|
2819 |
-
array(
|
2820 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2821 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2822 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2823 |
-
'selectors' => array(
|
2824 |
-
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2825 |
-
),
|
2826 |
-
)
|
2827 |
-
);
|
2828 |
-
|
2829 |
-
$this->end_controls_section();
|
2830 |
-
}
|
2831 |
-
|
2832 |
-
/**
|
2833 |
-
* Get Menu Item Extras.
|
2834 |
-
* Adds Menu Items' Icon & Badge Style.
|
2835 |
-
*
|
2836 |
-
* @access private
|
2837 |
-
* @since 4.9.4
|
2838 |
-
*/
|
2839 |
-
private function get_menu_item_extras() {
|
2840 |
-
|
2841 |
-
$this->start_controls_section(
|
2842 |
-
'premium_nav_item_extra_style',
|
2843 |
-
array(
|
2844 |
-
'label' => __( 'Menu Item Icon & Badge', 'premium-addons-for-elementor' ),
|
2845 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
2846 |
-
)
|
2847 |
-
);
|
2848 |
-
|
2849 |
-
$this->start_controls_tabs( 'pa_nav_items_extras' );
|
2850 |
-
|
2851 |
-
$this->start_controls_tab(
|
2852 |
-
'pa_nav_item_icon_style',
|
2853 |
-
array(
|
2854 |
-
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
2855 |
-
)
|
2856 |
-
);
|
2857 |
-
|
2858 |
-
$left_order = is_rtl() ? '1' : '0';
|
2859 |
-
$right_order = is_rtl() ? '0' : '1';
|
2860 |
-
$default = is_rtl() ? $right_order : $left_order;
|
2861 |
-
|
2862 |
-
$this->add_responsive_control(
|
2863 |
-
'pa_nav_item_icon_pos',
|
2864 |
-
array(
|
2865 |
-
'label' => __( 'Position', 'premium-addons-for-elementor' ),
|
2866 |
-
'type' => Controls_Manager::CHOOSE,
|
2867 |
-
'options' => array(
|
2868 |
-
$left_order => array(
|
2869 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
2870 |
-
'icon' => 'eicon-h-align-left',
|
2871 |
-
),
|
2872 |
-
$right_order => array(
|
2873 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
2874 |
-
'icon' => 'eicon-h-align-right',
|
2875 |
-
),
|
2876 |
-
),
|
2877 |
-
'default' => $default,
|
2878 |
-
'toggle' => false,
|
2879 |
-
'selectors' => array(
|
2880 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'order: {{VALUE}}',
|
2881 |
-
),
|
2882 |
-
)
|
2883 |
-
);
|
2884 |
-
|
2885 |
-
$this->add_control(
|
2886 |
-
'menu_item_icon_color',
|
2887 |
-
array(
|
2888 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2889 |
-
'type' => Controls_Manager::COLOR,
|
2890 |
-
'global' => array(
|
2891 |
-
'default' => Global_Colors::COLOR_PRIMARY,
|
2892 |
-
),
|
2893 |
-
'selectors' => array(
|
2894 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'color: {{VALUE}};',
|
2895 |
-
),
|
2896 |
-
'condition' => array(
|
2897 |
-
'menu_type' => 'custom',
|
2898 |
-
),
|
2899 |
-
)
|
2900 |
-
);
|
2901 |
-
|
2902 |
-
$this->add_responsive_control(
|
2903 |
-
'pa_nav_item_icon_size',
|
2904 |
-
array(
|
2905 |
-
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
2906 |
-
'type' => Controls_Manager::SLIDER,
|
2907 |
-
'label_block' => true,
|
2908 |
-
'size_units' => array( 'px' ),
|
2909 |
-
'range' => array(
|
2910 |
-
'px' => array(
|
2911 |
-
'min' => 0,
|
2912 |
-
'max' => 300,
|
2913 |
-
),
|
2914 |
-
),
|
2915 |
-
'selectors' => array(
|
2916 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
2917 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon.dashicons, {{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > img.premium-item-icon, {{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon.premium-lottie-animation' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
2918 |
-
),
|
2919 |
-
)
|
2920 |
-
);
|
2921 |
-
|
2922 |
-
$this->add_control(
|
2923 |
-
'menu_item_icon_back_color',
|
2924 |
-
array(
|
2925 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
2926 |
-
'type' => Controls_Manager::COLOR,
|
2927 |
-
'selectors' => array(
|
2928 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'background-color: {{VALUE}};',
|
2929 |
-
),
|
2930 |
-
)
|
2931 |
-
);
|
2932 |
-
|
2933 |
-
$this->add_control(
|
2934 |
-
'menu_item_icon_radius',
|
2935 |
-
array(
|
2936 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2937 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2938 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2939 |
-
'selectors' => array(
|
2940 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2941 |
-
),
|
2942 |
-
)
|
2943 |
-
);
|
2944 |
-
|
2945 |
-
$this->add_responsive_control(
|
2946 |
-
'pa_nav_item_icon_margin',
|
2947 |
-
array(
|
2948 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2949 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2950 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2951 |
-
'selectors' => array(
|
2952 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2953 |
-
),
|
2954 |
-
)
|
2955 |
-
);
|
2956 |
-
|
2957 |
-
$this->add_responsive_control(
|
2958 |
-
'pa_nav_item_icon_padding',
|
2959 |
-
array(
|
2960 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2961 |
-
'type' => Controls_Manager::DIMENSIONS,
|
2962 |
-
'size_units' => array( 'px', 'em', '%' ),
|
2963 |
-
'selectors' => array(
|
2964 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2965 |
-
),
|
2966 |
-
)
|
2967 |
-
);
|
2968 |
-
|
2969 |
-
$this->end_controls_tab();
|
2970 |
-
|
2971 |
-
$this->start_controls_tab(
|
2972 |
-
'pa_nav_item_badge_style',
|
2973 |
-
array(
|
2974 |
-
'label' => __( 'Badge', 'premium-addons-for-elementor' ),
|
2975 |
-
)
|
2976 |
-
);
|
2977 |
-
|
2978 |
-
$this->add_group_control(
|
2979 |
-
Group_Control_Typography::get_type(),
|
2980 |
-
array(
|
2981 |
-
'name' => 'pa_nav_item_badge_typo',
|
2982 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
2983 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
2984 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge',
|
2985 |
-
)
|
2986 |
-
);
|
2987 |
-
|
2988 |
-
$this->add_control(
|
2989 |
-
'item_badge_color',
|
2990 |
-
array(
|
2991 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2992 |
-
'type' => Controls_Manager::COLOR,
|
2993 |
-
'selectors' => array(
|
2994 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
2995 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
2996 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'color: {{VALUE}};',
|
2997 |
-
),
|
2998 |
-
'condition' => array(
|
2999 |
-
'menu_type' => 'custom',
|
3000 |
-
),
|
3001 |
-
)
|
3002 |
-
);
|
3003 |
-
|
3004 |
-
$this->add_control(
|
3005 |
-
'item_badge_back_color',
|
3006 |
-
array(
|
3007 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
3008 |
-
'type' => Controls_Manager::COLOR,
|
3009 |
-
'selectors' => array(
|
3010 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3011 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3012 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'background-color: {{VALUE}};',
|
3013 |
-
),
|
3014 |
-
'condition' => array(
|
3015 |
-
'menu_type' => 'custom',
|
3016 |
-
),
|
3017 |
-
)
|
3018 |
-
);
|
3019 |
-
|
3020 |
-
$this->add_group_control(
|
3021 |
-
Group_Control_Border::get_type(),
|
3022 |
-
array(
|
3023 |
-
'name' => 'pa_nav_item_badge_border',
|
3024 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3025 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3026 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge',
|
3027 |
-
)
|
3028 |
-
);
|
3029 |
-
|
3030 |
-
$this->add_control(
|
3031 |
-
'pa_nav_item_badge_rad',
|
3032 |
-
array(
|
3033 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3034 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3035 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3036 |
-
'selectors' => array(
|
3037 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3038 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3039 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3040 |
-
),
|
3041 |
-
)
|
3042 |
-
);
|
3043 |
-
|
3044 |
-
$this->add_responsive_control(
|
3045 |
-
'pa_nav_item_badge_padding',
|
3046 |
-
array(
|
3047 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3048 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3049 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3050 |
-
'selectors' => array(
|
3051 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3052 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3053 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3054 |
-
),
|
3055 |
-
)
|
3056 |
-
);
|
3057 |
-
|
3058 |
-
$this->add_responsive_control(
|
3059 |
-
'pa_nav_item_badge_margin',
|
3060 |
-
array(
|
3061 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3062 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3063 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3064 |
-
'selectors' => array(
|
3065 |
-
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3066 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3067 |
-
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3068 |
-
),
|
3069 |
-
)
|
3070 |
-
);
|
3071 |
-
|
3072 |
-
$this->end_controls_tab();
|
3073 |
-
$this->end_controls_tabs();
|
3074 |
-
|
3075 |
-
$this->end_controls_section();
|
3076 |
-
}
|
3077 |
-
|
3078 |
-
/**
|
3079 |
-
* Get menu item style.
|
3080 |
-
*
|
3081 |
-
* @access private
|
3082 |
-
* @since 4.9.3
|
3083 |
-
*/
|
3084 |
-
private function get_menu_item_style() {
|
3085 |
-
|
3086 |
-
$this->start_controls_section(
|
3087 |
-
'premium_nav_item_style_section',
|
3088 |
-
array(
|
3089 |
-
'label' => __( 'Menu Item Style', 'premium-addons-for-elementor' ),
|
3090 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
3091 |
-
)
|
3092 |
-
);
|
3093 |
-
|
3094 |
-
$this->add_group_control(
|
3095 |
-
Group_Control_Typography::get_type(),
|
3096 |
-
array(
|
3097 |
-
'name' => 'pa_nav_item_typo',
|
3098 |
-
'global' => array(
|
3099 |
-
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
|
3100 |
-
),
|
3101 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link',
|
3102 |
-
)
|
3103 |
-
);
|
3104 |
-
|
3105 |
-
$this->add_responsive_control(
|
3106 |
-
'pa_nav_item_drop_icon_size',
|
3107 |
-
array(
|
3108 |
-
'label' => __( 'Dropdown Icon Size', 'premium-addons-for-elementor' ),
|
3109 |
-
'type' => Controls_Manager::SLIDER,
|
3110 |
-
'size_units' => array( 'px', 'em' ),
|
3111 |
-
'selectors' => array(
|
3112 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link .premium-dropdown-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
3113 |
-
),
|
3114 |
-
)
|
3115 |
-
);
|
3116 |
-
|
3117 |
-
$this->add_responsive_control(
|
3118 |
-
'pa_pointer_thinkness',
|
3119 |
-
array(
|
3120 |
-
'label' => __( 'Pointer Thickness', 'premium-addons-for-elementor' ),
|
3121 |
-
'type' => Controls_Manager::SLIDER,
|
3122 |
-
'size_units' => array( 'px' ),
|
3123 |
-
'range' => array(
|
3124 |
-
'px' => array(
|
3125 |
-
'min' => 0,
|
3126 |
-
'max' => 50,
|
3127 |
-
),
|
3128 |
-
),
|
3129 |
-
'selectors' => array(
|
3130 |
-
'{{WRAPPER}} .premium-nav-pointer-underline .premium-menu-link-parent::after,
|
3131 |
-
{{WRAPPER}} .premium-nav-pointer-overline .premium-menu-link-parent::before,
|
3132 |
-
{{WRAPPER}} .premium-nav-pointer-double-line .premium-menu-link-parent::before,
|
3133 |
-
{{WRAPPER}} .premium-nav-pointer-double-line .premium-menu-link-parent::after' => 'height: {{SIZE}}px;',
|
3134 |
-
'{{WRAPPER}} .premium-nav-pointer-framed:not(.premium-nav-animation-draw):not(.premium-nav-animation-corners) .premium-menu-link-parent::before' => 'border-width: {{SIZE}}px;',
|
3135 |
-
'{{WRAPPER}} .premium-nav-pointer-framed.premium-nav-animation-draw .premium-menu-link-parent::before' => 'border-width: 0 0 {{SIZE}}px {{SIZE}}px;',
|
3136 |
-
'{{WRAPPER}} .premium-nav-pointer-framed.premium-nav-animation-draw .premium-menu-link-parent::after' => 'border-width: {{SIZE}}px {{SIZE}}px 0 0;',
|
3137 |
-
'{{WRAPPER}} .premium-nav-pointer-framed.premium-nav-animation-corners .premium-menu-link-parent::before' => 'border-width: {{SIZE}}px 0 0 {{SIZE}}px',
|
3138 |
-
'{{WRAPPER}} .premium-nav-pointer-framed.premium-nav-animation-corners .premium-menu-link-parent::after' => 'border-width: 0 {{SIZE}}px {{SIZE}}px 0',
|
3139 |
-
),
|
3140 |
-
'condition' => array(
|
3141 |
-
'pointer!' => array( 'none', 'text', 'background' ),
|
3142 |
-
),
|
3143 |
-
|
3144 |
-
)
|
3145 |
-
);
|
3146 |
-
|
3147 |
-
$this->add_responsive_control(
|
3148 |
-
'pa_nav_item_drop_icon_margin',
|
3149 |
-
array(
|
3150 |
-
'label' => __( 'Dropdown Icon Margin', 'premium-addons-for-elementor' ),
|
3151 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3152 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3153 |
-
'selectors' => array(
|
3154 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link .premium-dropdown-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3155 |
-
),
|
3156 |
-
)
|
3157 |
-
);
|
3158 |
-
|
3159 |
-
$this->start_controls_tabs( 'pa_nav_items_styles' );
|
3160 |
-
|
3161 |
-
$this->start_controls_tab(
|
3162 |
-
'pa_nav_item_normal',
|
3163 |
-
array(
|
3164 |
-
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
3165 |
-
)
|
3166 |
-
);
|
3167 |
-
|
3168 |
-
$this->add_control(
|
3169 |
-
'pa_nav_item_color',
|
3170 |
-
array(
|
3171 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3172 |
-
'type' => Controls_Manager::COLOR,
|
3173 |
-
'global' => array(
|
3174 |
-
'default' => Global_Colors::COLOR_TEXT,
|
3175 |
-
),
|
3176 |
-
'selectors' => array(
|
3177 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'color: {{VALUE}};',
|
3178 |
-
),
|
3179 |
-
)
|
3180 |
-
);
|
3181 |
-
|
3182 |
-
$this->add_control(
|
3183 |
-
'pa_nav_item_drop_icon_color',
|
3184 |
-
array(
|
3185 |
-
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3186 |
-
'type' => Controls_Manager::COLOR,
|
3187 |
-
'global' => array(
|
3188 |
-
'default' => Global_Colors::COLOR_TEXT,
|
3189 |
-
),
|
3190 |
-
'selectors' => array(
|
3191 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3192 |
-
),
|
3193 |
-
)
|
3194 |
-
);
|
3195 |
-
|
3196 |
-
$this->add_group_control(
|
3197 |
-
Group_Control_Background::get_type(),
|
3198 |
-
array(
|
3199 |
-
'name' => 'pa_nav_item_bg',
|
3200 |
-
'types' => array( 'classic', 'gradient' ),
|
3201 |
-
// 'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item',
|
3202 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link',
|
3203 |
-
)
|
3204 |
-
);
|
3205 |
-
|
3206 |
-
$this->add_group_control(
|
3207 |
-
Group_Control_Text_Shadow::get_type(),
|
3208 |
-
array(
|
3209 |
-
'name' => 'pa_nav_item_shadow',
|
3210 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link',
|
3211 |
-
)
|
3212 |
-
);
|
3213 |
-
|
3214 |
-
$this->add_group_control(
|
3215 |
-
Group_Control_Border::get_type(),
|
3216 |
-
array(
|
3217 |
-
'name' => 'pa_nav_item_border',
|
3218 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link',
|
3219 |
-
)
|
3220 |
-
);
|
3221 |
-
|
3222 |
-
$this->add_control(
|
3223 |
-
'pa_nav_item_rad',
|
3224 |
-
array(
|
3225 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3226 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3227 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3228 |
-
'selectors' => array(
|
3229 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3230 |
-
),
|
3231 |
-
)
|
3232 |
-
);
|
3233 |
-
|
3234 |
-
$this->add_responsive_control(
|
3235 |
-
'pa_nav_item_padding',
|
3236 |
-
array(
|
3237 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3238 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3239 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3240 |
-
'selectors' => array(
|
3241 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3242 |
-
),
|
3243 |
-
)
|
3244 |
-
);
|
3245 |
-
|
3246 |
-
$this->add_responsive_control(
|
3247 |
-
'pa_nav_item_margin',
|
3248 |
-
array(
|
3249 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3250 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3251 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3252 |
-
'selectors' => array(
|
3253 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3254 |
-
),
|
3255 |
-
)
|
3256 |
-
);
|
3257 |
-
|
3258 |
-
$this->end_controls_tab();
|
3259 |
-
|
3260 |
-
$this->start_controls_tab(
|
3261 |
-
'pa_nav_item_hover',
|
3262 |
-
array(
|
3263 |
-
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
3264 |
-
)
|
3265 |
-
);
|
3266 |
-
|
3267 |
-
$this->add_control(
|
3268 |
-
'pa_nav_item_color_hover',
|
3269 |
-
array(
|
3270 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3271 |
-
'type' => Controls_Manager::COLOR,
|
3272 |
-
'global' => array(
|
3273 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
3274 |
-
),
|
3275 |
-
'selectors' => array(
|
3276 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link' => 'color: {{VALUE}};',
|
3277 |
-
),
|
3278 |
-
)
|
3279 |
-
);
|
3280 |
-
|
3281 |
-
$this->add_control(
|
3282 |
-
'pa_nav_item_drop_icon_hover',
|
3283 |
-
array(
|
3284 |
-
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3285 |
-
'type' => Controls_Manager::COLOR,
|
3286 |
-
'global' => array(
|
3287 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
3288 |
-
),
|
3289 |
-
'selectors' => array(
|
3290 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3291 |
-
),
|
3292 |
-
)
|
3293 |
-
);
|
3294 |
-
|
3295 |
-
$this->add_group_control(
|
3296 |
-
Group_Control_Background::get_type(),
|
3297 |
-
array(
|
3298 |
-
'name' => 'pa_nav_item_bg_hover',
|
3299 |
-
'types' => array( 'classic', 'gradient' ),
|
3300 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link',
|
3301 |
-
)
|
3302 |
-
);
|
3303 |
-
|
3304 |
-
$this->add_control(
|
3305 |
-
'menu_item_pointer_color_hover',
|
3306 |
-
array(
|
3307 |
-
'label' => __( 'Item Hover Effect Color', 'premium-addons-for-elementor' ),
|
3308 |
-
'type' => Controls_Manager::COLOR,
|
3309 |
-
'global' => array(
|
3310 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
3311 |
-
),
|
3312 |
-
'selectors' => array(
|
3313 |
-
'{{WRAPPER}} .premium-nav-widget-container:not(.premium-nav-pointer-framed) .premium-menu-link-parent:before,
|
3314 |
-
{{WRAPPER}} .premium-nav-widget-container:not(.premium-nav-pointer-framed) .premium-menu-link-parent:after' => 'background-color: {{VALUE}}',
|
3315 |
-
'{{WRAPPER}} .premium-nav-pointer-framed .premium-menu-link-parent:before,
|
3316 |
-
{{WRAPPER}} .premium-nav-pointer-framed .premium-menu-link-parent:after' => 'border-color: {{VALUE}}',
|
3317 |
-
),
|
3318 |
-
'condition' => array(
|
3319 |
-
'pointer!' => array( 'none', 'text' ),
|
3320 |
-
),
|
3321 |
-
)
|
3322 |
-
);
|
3323 |
-
|
3324 |
-
$this->add_group_control(
|
3325 |
-
Group_Control_Text_Shadow::get_type(),
|
3326 |
-
array(
|
3327 |
-
'name' => 'pa_nav_item_shadow_hover',
|
3328 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link',
|
3329 |
-
)
|
3330 |
-
);
|
3331 |
-
|
3332 |
-
$this->add_group_control(
|
3333 |
-
Group_Control_Border::get_type(),
|
3334 |
-
array(
|
3335 |
-
'name' => 'pa_nav_item_border_hover',
|
3336 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link',
|
3337 |
-
)
|
3338 |
-
);
|
3339 |
-
|
3340 |
-
$this->add_control(
|
3341 |
-
'pa_nav_item_rad_hover',
|
3342 |
-
array(
|
3343 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3344 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3345 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3346 |
-
'selectors' => array(
|
3347 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3348 |
-
),
|
3349 |
-
)
|
3350 |
-
);
|
3351 |
-
|
3352 |
-
$this->add_responsive_control(
|
3353 |
-
'pa_nav_item_padding_hover',
|
3354 |
-
array(
|
3355 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3356 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3357 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3358 |
-
'selectors' => array(
|
3359 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3360 |
-
),
|
3361 |
-
)
|
3362 |
-
);
|
3363 |
-
|
3364 |
-
$this->add_responsive_control(
|
3365 |
-
'pa_nav_item_margin_hover',
|
3366 |
-
array(
|
3367 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3368 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3369 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3370 |
-
'selectors' => array(
|
3371 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3372 |
-
),
|
3373 |
-
)
|
3374 |
-
);
|
3375 |
-
|
3376 |
-
$this->end_controls_tab();
|
3377 |
-
|
3378 |
-
$this->start_controls_tab(
|
3379 |
-
'pa_nav_item_active',
|
3380 |
-
array(
|
3381 |
-
'label' => __( 'Active', 'premium-addons-for-elementor' ),
|
3382 |
-
)
|
3383 |
-
);
|
3384 |
-
|
3385 |
-
$this->add_control(
|
3386 |
-
'pa_nav_item_color_active',
|
3387 |
-
array(
|
3388 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3389 |
-
'type' => Controls_Manager::COLOR,
|
3390 |
-
'global' => array(
|
3391 |
-
'default' => Global_Colors::COLOR_ACCENT,
|
3392 |
-
),
|
3393 |
-
'selectors' => array(
|
3394 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item > .premium-menu-link' => 'color: {{VALUE}};',
|
3395 |
-
),
|
3396 |
-
)
|
3397 |
-
);
|
3398 |
-
|
3399 |
-
$this->add_control(
|
3400 |
-
'pa_nav_item_drop_icon_active',
|
3401 |
-
array(
|
3402 |
-
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3403 |
-
'type' => Controls_Manager::COLOR,
|
3404 |
-
'global' => array(
|
3405 |
-
'default' => Global_Colors::COLOR_ACCENT,
|
3406 |
-
),
|
3407 |
-
'selectors' => array(
|
3408 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item > .premium-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3409 |
-
),
|
3410 |
-
)
|
3411 |
-
);
|
3412 |
-
|
3413 |
-
$this->add_group_control(
|
3414 |
-
Group_Control_Background::get_type(),
|
3415 |
-
array(
|
3416 |
-
'name' => 'pa_nav_item_bg_active',
|
3417 |
-
'types' => array( 'classic', 'gradient' ),
|
3418 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-active-item > .premium-menu-link',
|
3419 |
-
)
|
3420 |
-
);
|
3421 |
-
|
3422 |
-
$this->add_control(
|
3423 |
-
'menu_item_pointer_color_active',
|
3424 |
-
array(
|
3425 |
-
'label' => __( 'Item Hover Effect Color', 'premium-addons-for-elementor' ),
|
3426 |
-
'type' => Controls_Manager::COLOR,
|
3427 |
-
'selectors' => array(
|
3428 |
-
'{{WRAPPER}} .premium-nav-widget-container:not(.premium-nav-pointer-framed) .premium-active-item .premium-menu-link-parent:before,
|
3429 |
-
{{WRAPPER}} .premium-nav-widget-container:not(.premium-nav-pointer-framed) .premium-active-item .premium-menu-link-parent:after' => 'background-color: {{VALUE}}',
|
3430 |
-
'{{WRAPPER}} .premium-nav-pointer-framed .premium-active-item .premium-menu-link-parent:before,
|
3431 |
-
{{WRAPPER}} .premium-nav-pointer-framed .premium-active-item .premium-menu-link-parent:after' => 'border-color: {{VALUE}}',
|
3432 |
-
),
|
3433 |
-
'condition' => array(
|
3434 |
-
'pointer!' => array( 'none', 'text' ),
|
3435 |
-
),
|
3436 |
-
)
|
3437 |
-
);
|
3438 |
-
|
3439 |
-
$this->add_group_control(
|
3440 |
-
Group_Control_Text_Shadow::get_type(),
|
3441 |
-
array(
|
3442 |
-
'name' => 'pa_nav_item_shadow_active',
|
3443 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-active-item',
|
3444 |
-
)
|
3445 |
-
);
|
3446 |
-
|
3447 |
-
$this->add_group_control(
|
3448 |
-
Group_Control_Border::get_type(),
|
3449 |
-
array(
|
3450 |
-
'name' => 'pa_nav_item_border_active',
|
3451 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-active-item',
|
3452 |
-
)
|
3453 |
-
);
|
3454 |
-
|
3455 |
-
$this->add_control(
|
3456 |
-
'pa_nav_item_rad_active',
|
3457 |
-
array(
|
3458 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3459 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3460 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3461 |
-
'selectors' => array(
|
3462 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3463 |
-
),
|
3464 |
-
)
|
3465 |
-
);
|
3466 |
-
|
3467 |
-
$this->add_responsive_control(
|
3468 |
-
'pa_nav_item_padding_active',
|
3469 |
-
array(
|
3470 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3471 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3472 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3473 |
-
'selectors' => array(
|
3474 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3475 |
-
),
|
3476 |
-
)
|
3477 |
-
);
|
3478 |
-
|
3479 |
-
$this->add_responsive_control(
|
3480 |
-
'pa_nav_item_margin_active',
|
3481 |
-
array(
|
3482 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3483 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3484 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3485 |
-
'selectors' => array(
|
3486 |
-
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3487 |
-
),
|
3488 |
-
)
|
3489 |
-
);
|
3490 |
-
|
3491 |
-
$this->end_controls_tab();
|
3492 |
-
$this->end_controls_tabs();
|
3493 |
-
|
3494 |
-
$this->end_controls_section();
|
3495 |
-
}
|
3496 |
-
|
3497 |
-
/**
|
3498 |
-
* Get submenu container style.
|
3499 |
-
*
|
3500 |
-
* @access private
|
3501 |
-
* @since 4.9.3
|
3502 |
-
*/
|
3503 |
-
private function get_submenu_container_style() {
|
3504 |
-
|
3505 |
-
$this->start_controls_section(
|
3506 |
-
'premium_submenu_style_section',
|
3507 |
-
array(
|
3508 |
-
'label' => __( 'Submenu Style', 'premium-addons-for-elementor' ),
|
3509 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
3510 |
-
)
|
3511 |
-
);
|
3512 |
-
|
3513 |
-
$this->start_controls_tabs( 'pa_sub_menus_style' );
|
3514 |
-
|
3515 |
-
$this->start_controls_tab(
|
3516 |
-
'pa_sub_simple',
|
3517 |
-
array(
|
3518 |
-
'label' => __( 'Simple Panel', 'premium-addons-for-elementor' ),
|
3519 |
-
)
|
3520 |
-
);
|
3521 |
-
|
3522 |
-
$this->add_responsive_control(
|
3523 |
-
'pa_sub_minwidth',
|
3524 |
-
array(
|
3525 |
-
'label' => __( 'Minimum Width', 'premium-addons-for-elementor' ),
|
3526 |
-
'type' => Controls_Manager::SLIDER,
|
3527 |
-
'label_block' => true,
|
3528 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3529 |
-
'range' => array(
|
3530 |
-
'px' => array(
|
3531 |
-
'min' => 0,
|
3532 |
-
'max' => 1000,
|
3533 |
-
),
|
3534 |
-
),
|
3535 |
-
'selectors' => array(
|
3536 |
-
'{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu' => 'min-width: {{SIZE}}{{UNIT}};',
|
3537 |
-
),
|
3538 |
-
'condition' => array(
|
3539 |
-
'menu_type!' => 'custom',
|
3540 |
-
),
|
3541 |
-
)
|
3542 |
-
);
|
3543 |
-
|
3544 |
-
$this->add_group_control(
|
3545 |
-
Group_Control_Box_Shadow::get_type(),
|
3546 |
-
array(
|
3547 |
-
'name' => 'pa_sub_shadow',
|
3548 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu',
|
3549 |
-
)
|
3550 |
-
);
|
3551 |
-
|
3552 |
-
$this->add_group_control(
|
3553 |
-
Group_Control_Background::get_type(),
|
3554 |
-
array(
|
3555 |
-
'name' => 'pa_sub_bg',
|
3556 |
-
'types' => array( 'classic', 'gradient' ),
|
3557 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu',
|
3558 |
-
)
|
3559 |
-
);
|
3560 |
-
|
3561 |
-
$this->add_group_control(
|
3562 |
-
Group_Control_Border::get_type(),
|
3563 |
-
array(
|
3564 |
-
'name' => 'pa_sub_border',
|
3565 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu',
|
3566 |
-
)
|
3567 |
-
);
|
3568 |
-
|
3569 |
-
$this->add_control(
|
3570 |
-
'pa_sub_rad',
|
3571 |
-
array(
|
3572 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3573 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3574 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3575 |
-
'selectors' => array(
|
3576 |
-
'{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3577 |
-
),
|
3578 |
-
)
|
3579 |
-
);
|
3580 |
-
|
3581 |
-
$this->add_responsive_control(
|
3582 |
-
'pa_sub_padding',
|
3583 |
-
array(
|
3584 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3585 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3586 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3587 |
-
'selectors' => array(
|
3588 |
-
'{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3589 |
-
),
|
3590 |
-
)
|
3591 |
-
);
|
3592 |
-
|
3593 |
-
$this->add_responsive_control(
|
3594 |
-
'pa_sub_margin',
|
3595 |
-
array(
|
3596 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3597 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3598 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3599 |
-
'selectors' => array(
|
3600 |
-
'{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3601 |
-
),
|
3602 |
-
)
|
3603 |
-
);
|
3604 |
-
|
3605 |
-
$this->end_controls_tab();
|
3606 |
-
|
3607 |
-
$this->start_controls_tab(
|
3608 |
-
'pa_sub_mega',
|
3609 |
-
array(
|
3610 |
-
'label' => __( 'Mega Panel', 'premium-addons-for-elementor' ),
|
3611 |
-
)
|
3612 |
-
);
|
3613 |
-
|
3614 |
-
$mega_pos = is_rtl() ? 'right' : 'left';
|
3615 |
-
|
3616 |
-
$this->add_responsive_control(
|
3617 |
-
'pa_sub_mega_offset',
|
3618 |
-
array(
|
3619 |
-
'label' => __( 'Offset', 'premium-addons-for-elementor' ),
|
3620 |
-
'type' => Controls_Manager::SLIDER,
|
3621 |
-
'label_block' => true,
|
3622 |
-
'size_units' => array( 'px', '%' ),
|
3623 |
-
'range' => array(
|
3624 |
-
'px' => array(
|
3625 |
-
'min' => -1000,
|
3626 |
-
'max' => 2000,
|
3627 |
-
),
|
3628 |
-
'%' => array(
|
3629 |
-
'min' => -100,
|
3630 |
-
'max' => 100,
|
3631 |
-
),
|
3632 |
-
),
|
3633 |
-
'selectors' => array(
|
3634 |
-
'{{WRAPPER}}.premium-nav-hor .premium-nav-menu-container .premium-mega-content-container' => $mega_pos . ': {{SIZE}}{{UNIT}}; transform: translateX(0)',
|
3635 |
-
'{{WRAPPER}}.premium-nav-ver .premium-nav-menu-container .premium-mega-content-container' => 'top: {{SIZE}}{{UNIT}};',
|
3636 |
-
),
|
3637 |
-
'condition' => array(
|
3638 |
-
'menu_type!' => 'custom',
|
3639 |
-
),
|
3640 |
-
)
|
3641 |
-
);
|
3642 |
-
|
3643 |
-
$this->add_group_control(
|
3644 |
-
Group_Control_Box_Shadow::get_type(),
|
3645 |
-
array(
|
3646 |
-
'name' => 'pa_sub_mega_shadow',
|
3647 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container',
|
3648 |
-
)
|
3649 |
-
);
|
3650 |
-
|
3651 |
-
$this->add_group_control(
|
3652 |
-
Group_Control_Background::get_type(),
|
3653 |
-
array(
|
3654 |
-
'name' => 'pa_sub_mega_bg',
|
3655 |
-
'types' => array( 'classic', 'gradient' ),
|
3656 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container',
|
3657 |
-
)
|
3658 |
-
);
|
3659 |
-
|
3660 |
-
$this->add_group_control(
|
3661 |
-
Group_Control_Border::get_type(),
|
3662 |
-
array(
|
3663 |
-
'name' => 'pa_sub_mega_border',
|
3664 |
-
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container',
|
3665 |
-
)
|
3666 |
-
);
|
3667 |
-
|
3668 |
-
$this->add_control(
|
3669 |
-
'pa_sub_mega_rad',
|
3670 |
-
array(
|
3671 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3672 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3673 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3674 |
-
'selectors' => array(
|
3675 |
-
'{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3676 |
-
),
|
3677 |
-
)
|
3678 |
-
);
|
3679 |
-
|
3680 |
-
$this->add_responsive_control(
|
3681 |
-
'pa_sub_mega_padding',
|
3682 |
-
array(
|
3683 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3684 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3685 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3686 |
-
'selectors' => array(
|
3687 |
-
'{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3688 |
-
),
|
3689 |
-
)
|
3690 |
-
);
|
3691 |
-
|
3692 |
-
$this->add_responsive_control(
|
3693 |
-
'pa_sub_mega_margin',
|
3694 |
-
array(
|
3695 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3696 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3697 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3698 |
-
'selectors' => array(
|
3699 |
-
'{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3700 |
-
),
|
3701 |
-
)
|
3702 |
-
);
|
3703 |
-
|
3704 |
-
$this->end_controls_tab();
|
3705 |
-
$this->end_controls_tabs();
|
3706 |
-
|
3707 |
-
$this->end_controls_section();
|
3708 |
-
}
|
3709 |
-
|
3710 |
-
/**
|
3711 |
-
* Get submenu item style.
|
3712 |
-
*
|
3713 |
-
* @access private
|
3714 |
-
* @since 4.9.3
|
3715 |
-
*/
|
3716 |
-
private function get_submenu_item_style() {
|
3717 |
-
|
3718 |
-
$this->start_controls_section(
|
3719 |
-
'premium_submenu_item_style_section',
|
3720 |
-
array(
|
3721 |
-
'label' => __( 'Submenu Item Style', 'premium-addons-for-elementor' ),
|
3722 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
3723 |
-
)
|
3724 |
-
);
|
3725 |
-
|
3726 |
-
$this->add_group_control(
|
3727 |
-
Group_Control_Typography::get_type(),
|
3728 |
-
array(
|
3729 |
-
'name' => 'pa_sub_item_typo',
|
3730 |
-
'global' => array(
|
3731 |
-
'default' => Global_Typography::TYPOGRAPHY_TEXT,
|
3732 |
-
),
|
3733 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link',
|
3734 |
-
)
|
3735 |
-
);
|
3736 |
-
|
3737 |
-
$this->add_responsive_control(
|
3738 |
-
'pa_sub_item_drop_icon_size',
|
3739 |
-
array(
|
3740 |
-
'label' => __( 'Dropdown Icon Size', 'premium-addons-for-elementor' ),
|
3741 |
-
'type' => Controls_Manager::SLIDER,
|
3742 |
-
'size_units' => array( 'px', 'em' ),
|
3743 |
-
'selectors' => array(
|
3744 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link .premium-dropdown-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
3745 |
-
),
|
3746 |
-
'condition' => array(
|
3747 |
-
'menu_type!' => 'custom',
|
3748 |
-
),
|
3749 |
-
)
|
3750 |
-
);
|
3751 |
-
|
3752 |
-
$this->add_responsive_control(
|
3753 |
-
'pa_sub_item_drop_icon_margin',
|
3754 |
-
array(
|
3755 |
-
'label' => __( 'Dropdown Icon Margin', 'premium-addons-for-elementor' ),
|
3756 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3757 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3758 |
-
'selectors' => array(
|
3759 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link .premium-dropdown-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3760 |
-
),
|
3761 |
-
'condition' => array(
|
3762 |
-
'menu_type!' => 'custom',
|
3763 |
-
),
|
3764 |
-
)
|
3765 |
-
);
|
3766 |
-
|
3767 |
-
$this->start_controls_tabs( 'pa_sub_items_styles' );
|
3768 |
-
|
3769 |
-
$this->start_controls_tab(
|
3770 |
-
'pa_sub_item_normal',
|
3771 |
-
array(
|
3772 |
-
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
3773 |
-
)
|
3774 |
-
);
|
3775 |
-
|
3776 |
-
$this->add_control(
|
3777 |
-
'pa_sub_item_color',
|
3778 |
-
array(
|
3779 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3780 |
-
'type' => Controls_Manager::COLOR,
|
3781 |
-
'global' => array(
|
3782 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
3783 |
-
),
|
3784 |
-
'selectors' => array(
|
3785 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link' => 'color: {{VALUE}};',
|
3786 |
-
),
|
3787 |
-
)
|
3788 |
-
);
|
3789 |
-
|
3790 |
-
$this->add_control(
|
3791 |
-
'pa_sub_item_drop_icon_color',
|
3792 |
-
array(
|
3793 |
-
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3794 |
-
'type' => Controls_Manager::COLOR,
|
3795 |
-
'global' => array(
|
3796 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
3797 |
-
),
|
3798 |
-
'selectors' => array(
|
3799 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3800 |
-
),
|
3801 |
-
'condition' => array(
|
3802 |
-
'menu_type!' => 'custom',
|
3803 |
-
),
|
3804 |
-
)
|
3805 |
-
);
|
3806 |
-
|
3807 |
-
$this->add_group_control(
|
3808 |
-
Group_Control_Background::get_type(),
|
3809 |
-
array(
|
3810 |
-
'name' => 'pa_sub_item_bg',
|
3811 |
-
'types' => array( 'classic', 'gradient' ),
|
3812 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item',
|
3813 |
-
)
|
3814 |
-
);
|
3815 |
-
|
3816 |
-
$this->add_group_control(
|
3817 |
-
Group_Control_Text_Shadow::get_type(),
|
3818 |
-
array(
|
3819 |
-
'name' => 'pa_sub_item_shadow',
|
3820 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item',
|
3821 |
-
)
|
3822 |
-
);
|
3823 |
-
|
3824 |
-
$this->add_group_control(
|
3825 |
-
Group_Control_Border::get_type(),
|
3826 |
-
array(
|
3827 |
-
'name' => 'pa_sub_item_border',
|
3828 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item',
|
3829 |
-
)
|
3830 |
-
);
|
3831 |
-
|
3832 |
-
$this->add_control(
|
3833 |
-
'pa_sub_item_rad',
|
3834 |
-
array(
|
3835 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3836 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3837 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3838 |
-
'selectors' => array(
|
3839 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3840 |
-
),
|
3841 |
-
)
|
3842 |
-
);
|
3843 |
-
|
3844 |
-
$this->add_responsive_control(
|
3845 |
-
'pa_sub_item_padding',
|
3846 |
-
array(
|
3847 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3848 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3849 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3850 |
-
'selectors' => array(
|
3851 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3852 |
-
),
|
3853 |
-
)
|
3854 |
-
);
|
3855 |
-
|
3856 |
-
$this->add_responsive_control(
|
3857 |
-
'pa_sub_item_margin',
|
3858 |
-
array(
|
3859 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3860 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3861 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3862 |
-
'selectors' => array(
|
3863 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3864 |
-
),
|
3865 |
-
)
|
3866 |
-
);
|
3867 |
-
|
3868 |
-
$this->end_controls_tab();
|
3869 |
-
|
3870 |
-
$this->start_controls_tab(
|
3871 |
-
'pa_sub_item_hover',
|
3872 |
-
array(
|
3873 |
-
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
3874 |
-
)
|
3875 |
-
);
|
3876 |
-
|
3877 |
-
$this->add_control(
|
3878 |
-
'pa_sub_item_color_hover',
|
3879 |
-
array(
|
3880 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3881 |
-
'type' => Controls_Manager::COLOR,
|
3882 |
-
'default' => '#fff',
|
3883 |
-
'selectors' => array(
|
3884 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu-item:hover > .premium-sub-menu-link' => 'color: {{VALUE}};',
|
3885 |
-
),
|
3886 |
-
)
|
3887 |
-
);
|
3888 |
-
|
3889 |
-
$this->add_control(
|
3890 |
-
'pa_sub_item_drop_icon_hover',
|
3891 |
-
array(
|
3892 |
-
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3893 |
-
'type' => Controls_Manager::COLOR,
|
3894 |
-
'default' => '#fff',
|
3895 |
-
'selectors' => array(
|
3896 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu-item:hover > .premium-sub-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3897 |
-
),
|
3898 |
-
'condition' => array(
|
3899 |
-
'menu_type!' => 'custom',
|
3900 |
-
),
|
3901 |
-
)
|
3902 |
-
);
|
3903 |
-
|
3904 |
-
$this->add_group_control(
|
3905 |
-
Group_Control_Background::get_type(),
|
3906 |
-
array(
|
3907 |
-
'name' => 'pa_sub_item_bg_hover',
|
3908 |
-
'types' => array( 'classic', 'gradient' ),
|
3909 |
-
'selector' => '{{WRAPPER}}:not(.premium-hamburger-menu):not(.premium-nav-slide):not(.premium-nav-dropdown) .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover,
|
3910 |
-
{{WRAPPER}}.premium-hamburger-menu .premium-main-nav-menu .premium-sub-menu > .premium-sub-menu-item:hover > .premium-sub-menu-link,
|
3911 |
-
{{WRAPPER}}.premium-nav-slide .premium-main-nav-menu .premium-sub-menu > .premium-sub-menu-item:hover > .premium-sub-menu-link,
|
3912 |
-
{{WRAPPER}}.premium-nav-dropdown .premium-main-nav-menu .premium-sub-menu > .premium-sub-menu-item:hover > .premium-sub-menu-link',
|
3913 |
-
'fields_options' => array(
|
3914 |
-
'background' => array(
|
3915 |
-
'default' => 'classic',
|
3916 |
-
),
|
3917 |
-
'color' => array(
|
3918 |
-
'global' => array(
|
3919 |
-
'default' => Global_Colors::COLOR_SECONDARY,
|
3920 |
-
),
|
3921 |
-
),
|
3922 |
-
),
|
3923 |
-
)
|
3924 |
-
);
|
3925 |
-
|
3926 |
-
$this->add_group_control(
|
3927 |
-
Group_Control_Text_Shadow::get_type(),
|
3928 |
-
array(
|
3929 |
-
'name' => 'pa_sub_item_shadow_hover',
|
3930 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover',
|
3931 |
-
)
|
3932 |
-
);
|
3933 |
-
|
3934 |
-
$this->add_group_control(
|
3935 |
-
Group_Control_Border::get_type(),
|
3936 |
-
array(
|
3937 |
-
'name' => 'pa_sub_item_border_hover',
|
3938 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover',
|
3939 |
-
)
|
3940 |
-
);
|
3941 |
-
|
3942 |
-
$this->add_control(
|
3943 |
-
'pa_sub_item_rad_hover',
|
3944 |
-
array(
|
3945 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3946 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3947 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3948 |
-
'selectors' => array(
|
3949 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3950 |
-
),
|
3951 |
-
)
|
3952 |
-
);
|
3953 |
-
|
3954 |
-
$this->add_responsive_control(
|
3955 |
-
'pa_sub_item_padding_hover',
|
3956 |
-
array(
|
3957 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3958 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3959 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3960 |
-
'selectors' => array(
|
3961 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3962 |
-
),
|
3963 |
-
)
|
3964 |
-
);
|
3965 |
-
|
3966 |
-
$this->add_responsive_control(
|
3967 |
-
'pa_sub_item_margin_hover',
|
3968 |
-
array(
|
3969 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3970 |
-
'type' => Controls_Manager::DIMENSIONS,
|
3971 |
-
'size_units' => array( 'px', 'em', '%' ),
|
3972 |
-
'selectors' => array(
|
3973 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3974 |
-
),
|
3975 |
-
)
|
3976 |
-
);
|
3977 |
-
|
3978 |
-
$this->end_controls_tab();
|
3979 |
-
|
3980 |
-
$this->start_controls_tab(
|
3981 |
-
'pa_sub_item_active',
|
3982 |
-
array(
|
3983 |
-
'label' => __( 'Active', 'premium-addons-for-elementor' ),
|
3984 |
-
)
|
3985 |
-
);
|
3986 |
-
|
3987 |
-
$this->add_control(
|
3988 |
-
'pa_sub_item_color_active',
|
3989 |
-
array(
|
3990 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3991 |
-
'type' => Controls_Manager::COLOR,
|
3992 |
-
'selectors' => array(
|
3993 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item .premium-sub-menu-link' => 'color: {{VALUE}};',
|
3994 |
-
),
|
3995 |
-
)
|
3996 |
-
);
|
3997 |
-
|
3998 |
-
$this->add_control(
|
3999 |
-
'pa_sub_item_drop_icon_active',
|
4000 |
-
array(
|
4001 |
-
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
4002 |
-
'type' => Controls_Manager::COLOR,
|
4003 |
-
'global' => array(
|
4004 |
-
'default' => Global_Colors::COLOR_PRIMARY,
|
4005 |
-
),
|
4006 |
-
'selectors' => array(
|
4007 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item .premium-sub-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
4008 |
-
),
|
4009 |
-
'condition' => array(
|
4010 |
-
'menu_type!' => 'custom',
|
4011 |
-
),
|
4012 |
-
)
|
4013 |
-
);
|
4014 |
-
|
4015 |
-
$this->add_group_control(
|
4016 |
-
Group_Control_Background::get_type(),
|
4017 |
-
array(
|
4018 |
-
'name' => 'pa_sub_item_bg_active',
|
4019 |
-
'types' => array( 'classic', 'gradient' ),
|
4020 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item',
|
4021 |
-
)
|
4022 |
-
);
|
4023 |
-
|
4024 |
-
$this->add_group_control(
|
4025 |
-
Group_Control_Text_Shadow::get_type(),
|
4026 |
-
array(
|
4027 |
-
'name' => 'pa_sub_item_shadow_active',
|
4028 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item',
|
4029 |
-
)
|
4030 |
-
);
|
4031 |
-
|
4032 |
-
$this->add_group_control(
|
4033 |
-
Group_Control_Border::get_type(),
|
4034 |
-
array(
|
4035 |
-
'name' => 'pa_sub_item_border_active',
|
4036 |
-
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item',
|
4037 |
-
)
|
4038 |
-
);
|
4039 |
-
|
4040 |
-
$this->add_control(
|
4041 |
-
'pa_sub_item_rad_active',
|
4042 |
-
array(
|
4043 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
4044 |
-
'type' => Controls_Manager::DIMENSIONS,
|
4045 |
-
'size_units' => array( 'px', 'em', '%' ),
|
4046 |
-
'selectors' => array(
|
4047 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
4048 |
-
),
|
4049 |
-
)
|
4050 |
-
);
|
4051 |
-
|
4052 |
-
$this->add_responsive_control(
|
4053 |
-
'pa_sub_item_padding_active',
|
4054 |
-
array(
|
4055 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
4056 |
-
'type' => Controls_Manager::DIMENSIONS,
|
4057 |
-
'size_units' => array( 'px', 'em', '%' ),
|
4058 |
-
'selectors' => array(
|
4059 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4060 |
-
),
|
4061 |
-
)
|
4062 |
-
);
|
4063 |
-
|
4064 |
-
$this->add_responsive_control(
|
4065 |
-
'pa_sub_item_margin_active',
|
4066 |
-
array(
|
4067 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
4068 |
-
'type' => Controls_Manager::DIMENSIONS,
|
4069 |
-
'size_units' => array( 'px', 'em', '%' ),
|
4070 |
-
'selectors' => array(
|
4071 |
-
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4072 |
-
),
|
4073 |
-
)
|
4074 |
-
);
|
4075 |
-
|
4076 |
-
$this->end_controls_tab();
|
4077 |
-
|
4078 |
-
$this->end_controls_tabs();
|
4079 |
-
|
4080 |
-
$this->end_controls_section();
|
4081 |
-
}
|
4082 |
-
|
4083 |
-
/**
|
4084 |
-
* Get Submenu Item Extras.
|
4085 |
-
* Adds Submenu Items' Icon & Badge Style.
|
4086 |
-
*
|
4087 |
-
* @access private
|
4088 |
-
* @since 4.9.4
|
4089 |
-
*/
|
4090 |
-
private function get_sub_menu_item_extras() {
|
4091 |
-
|
4092 |
-
$this->start_controls_section(
|
4093 |
-
'premium_sub_extra_style',
|
4094 |
-
array(
|
4095 |
-
'label' => __( 'Submenu Item Icon & Badge', 'premium-addons-for-elementor' ),
|
4096 |
-
'tab' => Controls_Manager::TAB_STYLE,
|
4097 |
-
)
|
4098 |
-
);
|
4099 |
-
|
4100 |
-
$this->start_controls_tabs( 'pa_sub_items_extras' );
|
4101 |
-
|
4102 |
-
$this->start_controls_tab(
|
4103 |
-
'pa_sub_icon_style',
|
4104 |
-
array(
|
4105 |
-
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
4106 |
-
)
|
4107 |
-
);
|
4108 |
-
|
4109 |
-
$left_order = is_rtl() ? '1' : '0';
|
4110 |
-
$right_order = is_rtl() ? '0' : '1';
|
4111 |
-
$default = is_rtl() ? $right_order : $left_order;
|
4112 |
-
|
4113 |
-
$this->add_responsive_control(
|
4114 |
-
'pa_sub_icon_pos',
|
4115 |
-
array(
|
4116 |
-
'label' => __( 'Position', 'premium-addons-for-elementor' ),
|
4117 |
-
'type' => Controls_Manager::CHOOSE,
|
4118 |
-
'options' => array(
|
4119 |
-
$left_order => array(
|
4120 |
-
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
4121 |
-
'icon' => 'eicon-h-align-left',
|
4122 |
-
),
|
4123 |
-
$right_order => array(
|
4124 |
-
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
4125 |
-
'icon' => 'eicon-h-align-right',
|
4126 |
-
),
|
4127 |
-
),
|
4128 |
-
'default' => $default,
|
4129 |
-
'toggle' => false,
|
4130 |
-
'selectors' => array(
|
4131 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'order: {{VALUE}}',
|
4132 |
-
),
|
4133 |
-
)
|
4134 |
-
);
|
4135 |
-
|
4136 |
-
$this->add_control(
|
4137 |
-
'sub_item_icon_color',
|
4138 |
-
array(
|
4139 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
4140 |
-
'type' => Controls_Manager::COLOR,
|
4141 |
-
'global' => array(
|
4142 |
-
'default' => Global_Colors::COLOR_PRIMARY,
|
4143 |
-
),
|
4144 |
-
'selectors' => array(
|
4145 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'color: {{VALUE}};',
|
4146 |
-
),
|
4147 |
-
'condition' => array(
|
4148 |
-
'menu_type' => 'custom',
|
4149 |
-
),
|
4150 |
-
)
|
4151 |
-
);
|
4152 |
-
|
4153 |
-
$this->add_responsive_control(
|
4154 |
-
'pa_sub_icon_size',
|
4155 |
-
array(
|
4156 |
-
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
4157 |
-
'type' => Controls_Manager::SLIDER,
|
4158 |
-
'label_block' => true,
|
4159 |
-
'size_units' => array( 'px' ),
|
4160 |
-
'range' => array(
|
4161 |
-
'px' => array(
|
4162 |
-
'min' => 0,
|
4163 |
-
'max' => 300,
|
4164 |
-
),
|
4165 |
-
),
|
4166 |
-
'selectors' => array(
|
4167 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
4168 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon.dashicons, {{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link img.premium-sub-item-icon, {{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon.premium-lottie-animation' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
4169 |
-
),
|
4170 |
-
)
|
4171 |
-
);
|
4172 |
-
|
4173 |
-
$this->add_control(
|
4174 |
-
'sub_item_icon_back_color',
|
4175 |
-
array(
|
4176 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
4177 |
-
'type' => Controls_Manager::COLOR,
|
4178 |
-
'selectors' => array(
|
4179 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'background-color: {{VALUE}};',
|
4180 |
-
),
|
4181 |
-
)
|
4182 |
-
);
|
4183 |
-
|
4184 |
-
$this->add_control(
|
4185 |
-
'sub_item_icon_radius',
|
4186 |
-
array(
|
4187 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
4188 |
-
'type' => Controls_Manager::DIMENSIONS,
|
4189 |
-
'size_units' => array( 'px', 'em', '%' ),
|
4190 |
-
'selectors' => array(
|
4191 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
4192 |
-
),
|
4193 |
-
)
|
4194 |
-
);
|
4195 |
-
|
4196 |
-
$this->add_responsive_control(
|
4197 |
-
'pa_sub_icon_margin',
|
4198 |
-
array(
|
4199 |
-
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
4200 |
-
'type' => Controls_Manager::DIMENSIONS,
|
4201 |
-
'size_units' => array( 'px', 'em', '%' ),
|
4202 |
-
'selectors' => array(
|
4203 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4204 |
-
),
|
4205 |
-
)
|
4206 |
-
);
|
4207 |
-
|
4208 |
-
$this->add_responsive_control(
|
4209 |
-
'pa_sub_icon_padding',
|
4210 |
-
array(
|
4211 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
4212 |
-
'type' => Controls_Manager::DIMENSIONS,
|
4213 |
-
'size_units' => array( 'px', 'em', '%' ),
|
4214 |
-
'selectors' => array(
|
4215 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4216 |
-
),
|
4217 |
-
)
|
4218 |
-
);
|
4219 |
-
|
4220 |
-
$this->end_controls_tab();
|
4221 |
-
|
4222 |
-
$this->start_controls_tab(
|
4223 |
-
'pa_sub_badge_style',
|
4224 |
-
array(
|
4225 |
-
'label' => __( 'Badge', 'premium-addons-for-elementor' ),
|
4226 |
-
)
|
4227 |
-
);
|
4228 |
-
|
4229 |
-
$this->add_group_control(
|
4230 |
-
Group_Control_Typography::get_type(),
|
4231 |
-
array(
|
4232 |
-
'name' => 'pa_sub_badge_typo',
|
4233 |
-
'selector' => '{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge',
|
4234 |
-
)
|
4235 |
-
);
|
4236 |
-
|
4237 |
-
$this->add_control(
|
4238 |
-
'sub_item_badge_color',
|
4239 |
-
array(
|
4240 |
-
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
4241 |
-
'type' => Controls_Manager::COLOR,
|
4242 |
-
'selectors' => array(
|
4243 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'color: {{VALUE}};',
|
4244 |
-
),
|
4245 |
-
'condition' => array(
|
4246 |
-
'menu_type' => 'custom',
|
4247 |
-
),
|
4248 |
-
)
|
4249 |
-
);
|
4250 |
-
|
4251 |
-
$this->add_control(
|
4252 |
-
'sub_item_badge_back_color',
|
4253 |
-
array(
|
4254 |
-
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
4255 |
-
'type' => Controls_Manager::COLOR,
|
4256 |
-
'selectors' => array(
|
4257 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'background-color: {{VALUE}};',
|
4258 |
-
),
|
4259 |
-
'condition' => array(
|
4260 |
-
'menu_type' => 'custom',
|
4261 |
-
),
|
4262 |
-
)
|
4263 |
-
);
|
4264 |
-
|
4265 |
-
// TODO: check the all the badges CSS.
|
4266 |
-
$badge_pos = is_rtl() ? 'left' : 'right';
|
4267 |
-
|
4268 |
-
$this->add_responsive_control(
|
4269 |
-
'pa_sub_badge_hor',
|
4270 |
-
array(
|
4271 |
-
'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ),
|
4272 |
-
'type' => Controls_Manager::SLIDER,
|
4273 |
-
'label_block' => true,
|
4274 |
-
'size_units' => array( 'px', '%' ),
|
4275 |
-
'range' => array(
|
4276 |
-
'px' => array(
|
4277 |
-
'min' => 0,
|
4278 |
-
'max' => 1000,
|
4279 |
-
),
|
4280 |
-
),
|
4281 |
-
'selectors' => array(
|
4282 |
-
'{{WRAPPER}}:not(.premium-nav-ver) .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}}:not(.premium-nav-ver) .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => $badge_pos . ' : {{SIZE}}{{UNIT}};',
|
4283 |
-
'{{WRAPPER}}.premium-nav-ver.premium-vertical-right .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}}.premium-nav-ver.premium-vertical-right .premium-sub-menu-item .premium-rn-badge' => 'right: {{SIZE}}{{UNIT}};',
|
4284 |
-
'{{WRAPPER}}.premium-nav-ver.premium-vertical-left .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}}.premium-nav-ver.premium-vertical-left .premium-sub-menu-item .premium-rn-badge' => 'left: {{SIZE}}{{UNIT}};',
|
4285 |
-
),
|
4286 |
-
)
|
4287 |
-
);
|
4288 |
-
|
4289 |
-
$this->add_responsive_control(
|
4290 |
-
'pa_sub_badge_ver',
|
4291 |
-
array(
|
4292 |
-
'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ),
|
4293 |
-
'type' => Controls_Manager::SLIDER,
|
4294 |
-
'label_block' => true,
|
4295 |
-
'size_units' => array( 'px', '%' ),
|
4296 |
-
'range' => array(
|
4297 |
-
'px' => array(
|
4298 |
-
'min' => 0,
|
4299 |
-
'max' => 1000,
|
4300 |
-
),
|
4301 |
-
),
|
4302 |
-
'selectors' => array(
|
4303 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'top: {{SIZE}}{{UNIT}};',
|
4304 |
-
),
|
4305 |
-
)
|
4306 |
-
);
|
4307 |
-
|
4308 |
-
$this->add_group_control(
|
4309 |
-
Group_Control_Border::get_type(),
|
4310 |
-
array(
|
4311 |
-
'name' => 'pa_sub_badge_border',
|
4312 |
-
'selector' => '{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge',
|
4313 |
-
)
|
4314 |
-
);
|
4315 |
-
|
4316 |
-
$this->add_control(
|
4317 |
-
'pa_sub_badge_rad',
|
4318 |
-
array(
|
4319 |
-
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
4320 |
-
'type' => Controls_Manager::DIMENSIONS,
|
4321 |
-
'size_units' => array( 'px', 'em', '%' ),
|
4322 |
-
'selectors' => array(
|
4323 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
4324 |
-
),
|
4325 |
-
)
|
4326 |
-
);
|
4327 |
-
|
4328 |
-
$this->add_responsive_control(
|
4329 |
-
'pa_sub_badge_padding',
|
4330 |
-
array(
|
4331 |
-
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
4332 |
-
'type' => Controls_Manager::DIMENSIONS,
|
4333 |
-
'size_units' => array( 'px', 'em', '%' ),
|
4334 |
-
'selectors' => array(
|
4335 |
-
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge,
|
4336 |
-
{{WRAPPER}} .premium-sub-menu-item .premium-rn-badge,
|
4337 |
-
{{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4338 |
-
),
|
4339 |
-
)
|
4340 |
-
);
|
4341 |
-
|
4342 |
-
$this->end_controls_tab();
|
4343 |
-
$this->end_controls_tabs();
|
4344 |
-
|
4345 |
-
$this->end_controls_section();
|
4346 |
-
}
|
4347 |
-
|
4348 |
-
/**
|
4349 |
-
* Render Nav Menu widget output on the frontend.
|
4350 |
-
*
|
4351 |
-
* Written in PHP and used to generate the final HTML.
|
4352 |
-
*
|
4353 |
-
* @since 1.0.0
|
4354 |
-
* @access protected
|
4355 |
-
*/
|
4356 |
-
protected function render() {
|
4357 |
-
|
4358 |
-
$settings = $this->get_settings_for_display();
|
4359 |
-
|
4360 |
-
$menu_type = $settings['menu_type'];
|
4361 |
-
|
4362 |
-
$menu_id = 'wordpress_menu' === $menu_type ? $settings['pa_nav_menus'] : false;
|
4363 |
-
|
4364 |
-
$papro_activated = apply_filters( 'papro_activated', false ) && version_compare( PREMIUM_PRO_ADDONS_VERSION, '2.8.9', '>' );
|
4365 |
-
|
4366 |
-
$rn_badges_enabled = ( $papro_activated && 'yes' === $settings['rn_badge_enabled'] ) ? true : false;
|
4367 |
-
|
4368 |
-
if ( 'wordpress_menu' === $menu_type ) {
|
4369 |
-
|
4370 |
-
$is_valid = $this->is_valid_menu( $
|
4371 |
-
|
4372 |
-
if ( ! $is_valid ) {
|
4373 |
-
?>
|
4374 |
-
<div class="premium-error-notice">
|
4375 |
-
<?php echo esc_html( __( 'This is an empty menu. Please make sure your menu has items.', 'premium-addons-for-elementor' ) ); ?>
|
4376 |
-
</div>
|
4377 |
-
<?php
|
4378 |
-
|
4379 |
-
return;
|
4380 |
-
}
|
4381 |
-
}
|
4382 |
-
|
4383 |
-
$break_point = 'custom' === $settings['pa_mobile_menu_breakpoint'] ? $settings['pa_custom_breakpoint'] : $settings['pa_mobile_menu_breakpoint'];
|
4384 |
-
|
4385 |
-
$break_point = '' === $break_point ? '1025' : $break_point;
|
4386 |
-
|
4387 |
-
$stretch_dropdown = 'yes' === $settings['pa_toggle_full'] ? true : false;
|
4388 |
-
|
4389 |
-
$is_click = 'click' === $settings['pa_ver_toggle_event'] && 'yes' !== $settings['pa_ver_toggle_open'];
|
4390 |
-
|
4391 |
-
$is_hover = 'hover' === $settings['pa_ver_toggle_event'];
|
4392 |
-
|
4393 |
-
if ( 'wordpress_menu' === $menu_type ) {
|
4394 |
-
|
4395 |
-
$menu_list = $this->get_menu_list();
|
4396 |
-
|
4397 |
-
if ( ! $menu_list ) {
|
4398 |
-
return;
|
4399 |
-
}
|
4400 |
-
}
|
4401 |
-
|
4402 |
-
$div_end = '';
|
4403 |
-
|
4404 |
-
$menu_settings = array(
|
4405 |
-
'breakpoint' => (int) $break_point,
|
4406 |
-
'mobileLayout' => $settings['pa_mobile_menu_layout'],
|
4407 |
-
'mainLayout' => $settings['pa_nav_menu_layout'],
|
4408 |
-
'stretchDropdown' => $stretch_dropdown,
|
4409 |
-
'hoverEffect' => $settings['sub_badge_hv_effects'],
|
4410 |
-
'submenuEvent' => $settings['submenu_event'],
|
4411 |
-
'submenuTrigger' => $settings['submenu_trigger'],
|
4412 |
-
);
|
4413 |
-
|
4414 |
-
if ( 'yes' === $settings['pa_sticky_switcher'] ) {
|
4415 |
-
|
4416 |
-
$sticky_options = array(
|
4417 |
-
'targetId' => $settings['pa_sticky_target'],
|
4418 |
-
'onScroll' => 'yes' === $settings['pa_sticky_on_scroll'] ? true : false,
|
4419 |
-
'disableOn' => $settings['pa_sticky_disabled_on'],
|
4420 |
-
);
|
4421 |
-
|
4422 |
-
$menu_settings['stickyOptions'] = $sticky_options;
|
4423 |
-
}
|
4424 |
-
|
4425 |
-
if ( $rn_badges_enabled ) {
|
4426 |
-
|
4427 |
-
$rn_badges_settings = apply_filters( 'pa_get_random_badges_settings', $settings );
|
4428 |
-
|
4429 |
-
$menu_settings['rn_badges'] = $rn_badges_settings;
|
4430 |
-
}
|
4431 |
-
|
4432 |
-
$is_edit_mode = \Elementor\Plugin::$instance->editor->is_edit_mode();
|
4433 |
-
$hidden_cls = $is_edit_mode ? '' : 'elementor-invisible';
|
4434 |
-
|
4435 |
-
$this->add_render_attribute(
|
4436 |
-
'wrapper',
|
4437 |
-
array(
|
4438 |
-
'data-settings' => json_encode( $menu_settings ),
|
4439 |
-
'class' => array(
|
4440 |
-
$hidden_cls,
|
4441 |
-
'premium-nav-widget-container',
|
4442 |
-
'premium-nav-pointer-' . $settings['pointer'],
|
4443 |
-
),
|
4444 |
-
)
|
4445 |
-
);
|
4446 |
-
|
4447 |
-
if ( $stretch_dropdown ) {
|
4448 |
-
$this->add_render_attribute( 'wrapper', 'class', 'premium-stretch-dropdown' );
|
4449 |
-
}
|
4450 |
-
|
4451 |
-
if ( 'yes' === $settings['pa_ver_toggle_switcher'] && ( $is_click || $is_hover ) ) {
|
4452 |
-
$this->add_render_attribute( 'wrapper', 'class', 'premium-ver-collapsed' );
|
4453 |
-
}
|
4454 |
-
|
4455 |
-
switch ( $settings['pointer'] ) {
|
4456 |
-
case 'underline':
|
4457 |
-
case 'overline':
|
4458 |
-
case 'double-line':
|
4459 |
-
$this->add_render_attribute( 'wrapper', 'class', 'premium-nav-animation-' . $settings['animation_line'] );
|
4460 |
-
break;
|
4461 |
-
case 'framed':
|
4462 |
-
$this->add_render_attribute( 'wrapper', 'class', 'premium-nav-animation-' . $settings['animation_framed'] );
|
4463 |
-
break;
|
4464 |
-
case 'text':
|
4465 |
-
$this->add_render_attribute( 'wrapper', 'class', 'premium-nav-animation-' . $settings['animation_text'] );
|
4466 |
-
break;
|
4467 |
-
case 'background':
|
4468 |
-
$this->add_render_attribute( 'wrapper', 'class', 'premium-nav-animation-' . $settings['animation_background'] );
|
4469 |
-
break;
|
4470 |
-
}
|
4471 |
-
|
4472 |
-
/**
|
4473 |
-
* Hamburger Menu Button.
|
4474 |
-
*/
|
4475 |
-
?>
|
4476 |
-
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'wrapper' ) ); ?>>
|
4477 |
-
<div class="premium-ver-inner-container">
|
4478 |
-
<div class="premium-hamburger-toggle premium-mobile-menu-icon" role="button" aria-label="Toggle Menu">
|
4479 |
-
<span class="premium-toggle-text">
|
4480 |
-
<?php
|
4481 |
-
Icons_Manager::render_icon( $settings['pa_mobile_toggle_icon'], array( 'aria-hidden' => 'true' ) );
|
4482 |
-
echo esc_html( $settings['pa_mobile_toggle_text'] );
|
4483 |
-
?>
|
4484 |
-
</span>
|
4485 |
-
<span class="premium-toggle-close">
|
4486 |
-
<?php
|
4487 |
-
Icons_Manager::render_icon( $settings['pa_mobile_close_icon'], array( 'aria-hidden' => 'true' ) );
|
4488 |
-
echo esc_html( $settings['pa_mobile_toggle_close'] );
|
4489 |
-
?>
|
4490 |
-
</span>
|
4491 |
-
</div>
|
4492 |
-
<?php
|
4493 |
-
|
4494 |
-
if ( 'yes' === $settings['pa_ver_toggle_switcher'] ) {
|
4495 |
-
$this->add_vertical_toggler();
|
4496 |
-
}
|
4497 |
-
|
4498 |
-
if ( '
|
4499 |
-
$
|
4500 |
-
|
4501 |
-
|
4502 |
-
|
4503 |
-
|
4504 |
-
|
4505 |
-
|
4506 |
-
|
4507 |
-
|
4508 |
-
|
4509 |
-
|
4510 |
-
|
4511 |
-
|
4512 |
-
|
4513 |
-
|
4514 |
-
|
4515 |
-
|
4516 |
-
|
4517 |
-
|
4518 |
-
|
4519 |
-
|
4520 |
-
|
4521 |
-
|
4522 |
-
|
4523 |
-
|
4524 |
-
|
4525 |
-
|
4526 |
-
|
4527 |
-
|
4528 |
-
|
4529 |
-
|
4530 |
-
|
4531 |
-
|
4532 |
-
|
4533 |
-
<div class="premium-
|
4534 |
-
|
4535 |
-
|
4536 |
-
|
4537 |
-
|
4538 |
-
|
4539 |
-
|
4540 |
-
|
4541 |
-
* @param
|
4542 |
-
|
4543 |
-
|
4544 |
-
|
4545 |
-
|
4546 |
-
|
4547 |
-
|
4548 |
-
|
4549 |
-
|
4550 |
-
|
4551 |
-
|
4552 |
-
|
4553 |
-
|
4554 |
-
}
|
4555 |
-
|
4556 |
-
|
4557 |
-
|
4558 |
-
|
4559 |
-
|
4560 |
-
|
4561 |
-
|
4562 |
-
|
4563 |
-
|
4564 |
-
|
4565 |
-
|
4566 |
-
|
4567 |
-
|
4568 |
-
|
4569 |
-
|
4570 |
-
|
4571 |
-
|
4572 |
-
|
4573 |
-
|
4574 |
-
|
4575 |
-
|
4576 |
-
|
4577 |
-
|
4578 |
-
|
4579 |
-
|
4580 |
-
|
4581 |
-
|
4582 |
-
|
4583 |
-
|
4584 |
-
|
4585 |
-
|
4586 |
-
|
4587 |
-
|
4588 |
-
|
4589 |
-
|
4590 |
-
|
4591 |
-
|
4592 |
-
|
4593 |
-
|
4594 |
-
|
4595 |
-
|
4596 |
-
|
4597 |
-
|
4598 |
-
|
4599 |
-
|
4600 |
-
|
4601 |
-
|
4602 |
-
|
4603 |
-
|
4604 |
-
|
4605 |
-
|
4606 |
-
|
4607 |
-
|
4608 |
-
|
4609 |
-
|
4610 |
-
|
4611 |
-
|
4612 |
-
|
4613 |
-
|
4614 |
-
|
4615 |
-
|
4616 |
-
|
4617 |
-
|
4618 |
-
|
4619 |
-
|
4620 |
-
|
4621 |
-
|
4622 |
-
|
4623 |
-
|
4624 |
-
|
4625 |
-
|
4626 |
-
|
4627 |
-
|
4628 |
-
|
4629 |
-
|
4630 |
-
|
4631 |
-
|
4632 |
-
|
4633 |
-
|
4634 |
-
|
4635 |
-
|
4636 |
-
|
4637 |
-
|
4638 |
-
|
4639 |
-
|
4640 |
-
|
4641 |
-
|
4642 |
-
|
4643 |
-
|
4644 |
-
|
4645 |
-
|
4646 |
-
|
4647 |
-
|
4648 |
-
|
4649 |
-
|
4650 |
-
|
4651 |
-
|
4652 |
-
|
4653 |
-
|
4654 |
-
|
4655 |
-
|
4656 |
-
|
4657 |
-
|
4658 |
-
|
4659 |
-
|
4660 |
-
|
4661 |
-
|
4662 |
-
|
4663 |
-
|
4664 |
-
|
4665 |
-
|
4666 |
-
|
4667 |
-
|
4668 |
-
|
4669 |
-
|
4670 |
-
|
4671 |
-
|
4672 |
-
|
4673 |
-
|
4674 |
-
|
4675 |
-
|
4676 |
-
|
4677 |
-
|
4678 |
-
|
4679 |
-
|
4680 |
-
|
4681 |
-
|
4682 |
-
|
4683 |
-
|
4684 |
-
|
4685 |
-
|
4686 |
-
|
4687 |
-
|
4688 |
-
|
4689 |
-
|
4690 |
-
|
4691 |
-
|
4692 |
-
|
4693 |
-
|
4694 |
-
|
4695 |
-
|
4696 |
-
|
4697 |
-
|
4698 |
-
|
4699 |
-
|
4700 |
-
|
4701 |
-
|
4702 |
-
|
4703 |
-
|
4704 |
-
|
4705 |
-
|
4706 |
-
|
4707 |
-
|
4708 |
-
|
4709 |
-
|
4710 |
-
|
4711 |
-
$
|
4712 |
-
|
4713 |
-
|
4714 |
-
|
4715 |
-
|
4716 |
-
|
4717 |
-
|
4718 |
-
|
4719 |
-
|
4720 |
-
|
4721 |
-
|
4722 |
-
|
4723 |
-
|
4724 |
-
|
4725 |
-
|
4726 |
-
|
4727 |
-
|
4728 |
-
|
4729 |
-
|
4730 |
-
|
4731 |
-
|
4732 |
-
|
4733 |
-
|
4734 |
-
|
4735 |
-
|
4736 |
-
|
4737 |
-
|
4738 |
-
|
4739 |
-
|
4740 |
-
|
4741 |
-
|
4742 |
-
|
4743 |
-
|
4744 |
-
|
4745 |
-
|
4746 |
-
|
4747 |
-
|
4748 |
-
|
4749 |
-
|
4750 |
-
|
4751 |
-
|
4752 |
-
|
4753 |
-
|
4754 |
-
|
4755 |
-
|
4756 |
-
|
4757 |
-
|
4758 |
-
|
4759 |
-
|
4760 |
-
|
4761 |
-
|
4762 |
-
|
4763 |
-
|
4764 |
-
|
4765 |
-
|
4766 |
-
|
4767 |
-
|
4768 |
-
|
4769 |
-
|
4770 |
-
|
4771 |
-
|
4772 |
-
|
4773 |
-
|
4774 |
-
|
4775 |
-
|
4776 |
-
|
4777 |
-
|
4778 |
-
|
4779 |
-
|
4780 |
-
|
4781 |
-
|
4782 |
-
|
4783 |
-
$
|
4784 |
-
|
4785 |
-
|
4786 |
-
|
4787 |
-
|
4788 |
-
|
4789 |
-
|
4790 |
-
|
4791 |
-
|
4792 |
-
|
4793 |
-
|
4794 |
-
|
4795 |
-
|
4796 |
-
|
4797 |
-
|
4798 |
-
|
4799 |
-
|
4800 |
-
|
4801 |
-
|
4802 |
-
$html_output .= '
|
4803 |
-
|
4804 |
-
|
4805 |
-
|
4806 |
-
|
4807 |
-
|
4808 |
-
|
4809 |
-
|
4810 |
-
|
4811 |
-
|
4812 |
-
|
4813 |
-
|
4814 |
-
|
4815 |
-
|
4816 |
-
|
4817 |
-
|
4818 |
-
|
4819 |
-
}
|
4820 |
-
|
4821 |
-
/**
|
4822 |
-
* Get Icon HTML.
|
4823 |
-
*
|
4824 |
-
* @access private
|
4825 |
-
* @since 4.9.4
|
4826 |
-
*
|
4827 |
-
* @param array $item repeater item.
|
4828 |
-
* @param string $type type.
|
4829 |
-
*
|
4830 |
-
* @return string
|
4831 |
-
*/
|
4832 |
-
private function get_icon_html( $item, $type = '' ) {
|
4833 |
-
|
4834 |
-
$html = '';
|
4835 |
-
|
4836 |
-
if ( 'yes' !== $item['icon_switcher'] ) {
|
4837 |
-
return '';
|
4838 |
-
}
|
4839 |
-
|
4840 |
-
$class = 'premium-' . $type . 'item-icon ';
|
4841 |
-
|
4842 |
-
if ( 'icon' === $item['icon_type'] ) {
|
4843 |
-
|
4844 |
-
$icon_class = $class . $item['item_icon']['value'];
|
4845 |
-
$html .= sprintf( '<i class="%1$s"></i>', $icon_class );
|
4846 |
-
|
4847 |
-
} elseif ( 'image' === $item['icon_type'] ) {
|
4848 |
-
|
4849 |
-
$html .= '<img class="' . $class . '" src="' . $item['item_image']['url'] . '" alt="' . Control_Media::get_image_alt( $item['item_image'] ) . '">';
|
4850 |
-
|
4851 |
-
} else {
|
4852 |
-
|
4853 |
-
$html .= '<div class="premium-lottie-animation ' . $class . '" data-lottie-url="' . $item['lottie_url'] . '" data-lottie-loop="true"></div>';
|
4854 |
-
|
4855 |
-
}
|
4856 |
-
|
4857 |
-
return $html;
|
4858 |
-
|
4859 |
-
}
|
4860 |
-
|
4861 |
-
/**
|
4862 |
-
* Get Badge HTML.
|
4863 |
-
*
|
4864 |
-
* @access private
|
4865 |
-
* @since 4.9.4
|
4866 |
-
*
|
4867 |
-
* @param array $item repeater item.
|
4868 |
-
* @param string $type type.
|
4869 |
-
*
|
4870 |
-
* @return string
|
4871 |
-
*/
|
4872 |
-
private function get_badge_html( $item, $type = '' ) {
|
4873 |
-
|
4874 |
-
if ( 'yes' !== $item['badge_switcher'] ) {
|
4875 |
-
return '';
|
4876 |
-
}
|
4877 |
-
|
4878 |
-
$class = 'premium-' . $type . 'item-badge';
|
4879 |
-
|
4880 |
-
$html = '<span class="' . $class . '">' . wp_kses_post( $item['badge_text'] ) . '</span>';
|
4881 |
-
|
4882 |
-
return $html;
|
4883 |
-
|
4884 |
-
}
|
4885 |
-
}
|
1 |
+
<?php
|
2 |
+
/**
|
3 |
+
* Premium Nav Menu.
|
4 |
+
*/
|
5 |
+
|
6 |
+
namespace PremiumAddons\Widgets;
|
7 |
+
|
8 |
+
// Elementor Classes.
|
9 |
+
use Elementor\Widget_Base;
|
10 |
+
use Elementor\Utils;
|
11 |
+
use Elementor\Control_Media;
|
12 |
+
use Elementor\Icons_Manager;
|
13 |
+
use Elementor\Repeater;
|
14 |
+
use Elementor\Controls_Manager;
|
15 |
+
use Elementor\Group_Control_Border;
|
16 |
+
use Elementor\Group_Control_Typography;
|
17 |
+
use Elementor\Group_Control_Background;
|
18 |
+
use Elementor\Group_Control_Box_Shadow;
|
19 |
+
use Elementor\Group_Control_Text_Shadow;
|
20 |
+
use Elementor\Core\Kits\Documents\Tabs\Global_Colors;
|
21 |
+
use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
|
22 |
+
|
23 |
+
// PremiumAddons Classes.
|
24 |
+
use PremiumAddons\Includes\Helper_Functions;
|
25 |
+
use PremiumAddons\Includes\Pa_Nav_Menu_Walker;
|
26 |
+
use PremiumAddons\Includes\Premium_Template_Tags;
|
27 |
+
|
28 |
+
if ( ! defined( 'ABSPATH' ) ) {
|
29 |
+
exit; // If this file is called directly, abort.
|
30 |
+
}
|
31 |
+
|
32 |
+
/**
|
33 |
+
* Class Premium_Person.
|
34 |
+
*/
|
35 |
+
class Premium_Nav_Menu extends Widget_Base {
|
36 |
+
|
37 |
+
/**
|
38 |
+
* Get Elementor Helper Instance.
|
39 |
+
*
|
40 |
+
* @since 1.0.0
|
41 |
+
* @access public
|
42 |
+
*/
|
43 |
+
public function getTemplateInstance() {
|
44 |
+
$this->template_instance = Premium_Template_Tags::getInstance();
|
45 |
+
return $this->template_instance;
|
46 |
+
}
|
47 |
+
|
48 |
+
/**
|
49 |
+
* Retrieve Widget Name.
|
50 |
+
*
|
51 |
+
* @since 1.0.0
|
52 |
+
* @access public
|
53 |
+
*/
|
54 |
+
public function get_name() {
|
55 |
+
return 'premium-nav-menu';
|
56 |
+
}
|
57 |
+
|
58 |
+
/**
|
59 |
+
* Retrieve Widget Title.
|
60 |
+
*
|
61 |
+
* @since 1.0.0
|
62 |
+
* @access public
|
63 |
+
*/
|
64 |
+
public function get_title() {
|
65 |
+
return __( 'Mega Menu', 'premium-addons-for-elementor' );
|
66 |
+
}
|
67 |
+
|
68 |
+
/**
|
69 |
+
* Retrieve Widget Icon.
|
70 |
+
*
|
71 |
+
* @since 1.0.0
|
72 |
+
* @access public
|
73 |
+
*
|
74 |
+
* @return string widget icon.
|
75 |
+
*/
|
76 |
+
public function get_icon() {
|
77 |
+
return 'pa-mega-menu';
|
78 |
+
}
|
79 |
+
|
80 |
+
/**
|
81 |
+
* Retrieve Widget Dependent CSS.
|
82 |
+
*
|
83 |
+
* @since 1.0.0
|
84 |
+
* @access public
|
85 |
+
*
|
86 |
+
* @return array CSS style handles.
|
87 |
+
*/
|
88 |
+
public function get_style_depends() {
|
89 |
+
return array(
|
90 |
+
'premium-addons',
|
91 |
+
);
|
92 |
+
}
|
93 |
+
|
94 |
+
/**
|
95 |
+
* Retrieve Widget Dependent JS.
|
96 |
+
*
|
97 |
+
* @since 1.0.0
|
98 |
+
* @access public
|
99 |
+
*
|
100 |
+
* @return array JS script handles.
|
101 |
+
*/
|
102 |
+
public function get_script_depends() {
|
103 |
+
return array(
|
104 |
+
'lottie-js',
|
105 |
+
'pa-headroom',
|
106 |
+
'pa-menu',
|
107 |
+
);
|
108 |
+
}
|
109 |
+
|
110 |
+
/**
|
111 |
+
* Retrieve Widget Categories.
|
112 |
+
*
|
113 |
+
* @since 1.5.1
|
114 |
+
* @access public
|
115 |
+
*
|
116 |
+
* @return array Widget categories.
|
117 |
+
*/
|
118 |
+
public function get_categories() {
|
119 |
+
return array( 'premium-elements' );
|
120 |
+
}
|
121 |
+
|
122 |
+
/**
|
123 |
+
* Retrieve Widget Keywords.
|
124 |
+
*
|
125 |
+
* @since 1.0.0
|
126 |
+
* @access public
|
127 |
+
*
|
128 |
+
* @return string Widget keywords.
|
129 |
+
*/
|
130 |
+
public function get_keywords() {
|
131 |
+
return array( 'pa', 'premium', 'menu', 'nav', 'navigation', 'mega menu', 'header' );
|
132 |
+
}
|
133 |
+
|
134 |
+
/**
|
135 |
+
* Retrieve Widget Support URL.
|
136 |
+
*
|
137 |
+
* @access public
|
138 |
+
*
|
139 |
+
* @return string support URL.
|
140 |
+
*/
|
141 |
+
public function get_custom_help_url() {
|
142 |
+
return 'https://premiumaddons.com/support/';
|
143 |
+
}
|
144 |
+
|
145 |
+
/**
|
146 |
+
* Get Menu List.
|
147 |
+
*
|
148 |
+
* @access private
|
149 |
+
* @since 4.9.3
|
150 |
+
*
|
151 |
+
* @return array
|
152 |
+
*/
|
153 |
+
private function get_menu_list() {
|
154 |
+
|
155 |
+
$menus = wp_list_pluck( wp_get_nav_menus(), 'name', 'term_id' ); // term_id >> index key , name >> value of that index.
|
156 |
+
|
157 |
+
return $menus;
|
158 |
+
}
|
159 |
+
|
160 |
+
/**
|
161 |
+
* Register Nav Menu Controls.
|
162 |
+
*
|
163 |
+
* @since 1.0.0
|
164 |
+
* @access protected
|
165 |
+
*/
|
166 |
+
protected function register_controls() {
|
167 |
+
|
168 |
+
$this->get_menu_settings_controls();
|
169 |
+
|
170 |
+
$this->get_menu_content_controls();
|
171 |
+
|
172 |
+
$this->add_random_badges_section( $this );
|
173 |
+
|
174 |
+
$this->add_helpful_docs_section();
|
175 |
+
|
176 |
+
$this->get_menu_style_controls();
|
177 |
+
|
178 |
+
}
|
179 |
+
|
180 |
+
/**
|
181 |
+
* Get menu style controls.
|
182 |
+
*
|
183 |
+
* @access private
|
184 |
+
* @since 4.9.3
|
185 |
+
*/
|
186 |
+
private function get_menu_style_controls() {
|
187 |
+
$this->get_sticky_style();
|
188 |
+
$this->get_ver_toggler_style();
|
189 |
+
$this->get_menu_container_style();
|
190 |
+
$this->get_menu_item_style();
|
191 |
+
$this->get_menu_item_extras();
|
192 |
+
$this->get_submenu_container_style();
|
193 |
+
$this->get_submenu_item_style();
|
194 |
+
$this->get_sub_menu_item_extras();
|
195 |
+
$this->get_toggle_menu_sytle();
|
196 |
+
}
|
197 |
+
|
198 |
+
/**
|
199 |
+
* Get menu content controls.
|
200 |
+
*
|
201 |
+
* @access private
|
202 |
+
* @since 4.9.3
|
203 |
+
*/
|
204 |
+
private function get_menu_settings_controls() {
|
205 |
+
|
206 |
+
$this->start_controls_section(
|
207 |
+
'premium_nav_section',
|
208 |
+
array(
|
209 |
+
'label' => __( 'Menu Settings', 'premium-addons-for-elementor' ),
|
210 |
+
)
|
211 |
+
);
|
212 |
+
|
213 |
+
$this->add_control(
|
214 |
+
'menu_type',
|
215 |
+
array(
|
216 |
+
'label' => __( 'Menu Type', 'premium-addons-for-elementor' ),
|
217 |
+
'type' => Controls_Manager::SELECT,
|
218 |
+
'default' => 'wordpress_menu',
|
219 |
+
'options' => array(
|
220 |
+
'wordpress_menu' => __( 'WordPress Menu', 'premium-addons-for-elementor' ),
|
221 |
+
'custom' => __( 'Custom Menu', 'premium-addons-for-elementor' ),
|
222 |
+
),
|
223 |
+
)
|
224 |
+
);
|
225 |
+
|
226 |
+
$get_pro = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/pro', 'editor-page', 'wp-editor', 'get-pro' );
|
227 |
+
|
228 |
+
$papro_activated = apply_filters( 'papro_activated', false );
|
229 |
+
|
230 |
+
if ( ! $papro_activated ) {
|
231 |
+
$this->add_control(
|
232 |
+
'custom_menu_notice',
|
233 |
+
array(
|
234 |
+
'type' => Controls_Manager::RAW_HTML,
|
235 |
+
'raw' => __( 'Custom Menu can be used in Premium Addons Pro.', 'premium-addons-for-elementor' ) . '<a href="' . esc_url( $get_pro ) . '" target="_blank">' . __( ' Upgrade now!', 'premium-addons-for-elementor' ) . '</a>',
|
236 |
+
'content_classes' => 'papro-upgrade-notice',
|
237 |
+
'condition' => array(
|
238 |
+
'menu_type' => 'custom',
|
239 |
+
),
|
240 |
+
)
|
241 |
+
);
|
242 |
+
}
|
243 |
+
|
244 |
+
$menu_list = $this->get_menu_list();
|
245 |
+
|
246 |
+
if ( ! empty( $menu_list ) ) {
|
247 |
+
|
248 |
+
$this->add_control(
|
249 |
+
'pa_nav_menus',
|
250 |
+
array(
|
251 |
+
'label' => __( 'Menu', 'premium-addons-for-elementor' ),
|
252 |
+
'type' => Controls_Manager::SELECT,
|
253 |
+
'options' => $menu_list,
|
254 |
+
'default' => array_keys( $menu_list )[0],
|
255 |
+
'condition' => array(
|
256 |
+
'menu_type' => 'wordpress_menu',
|
257 |
+
),
|
258 |
+
)
|
259 |
+
);
|
260 |
+
|
261 |
+
} else {
|
262 |
+
$this->add_control(
|
263 |
+
'empty_nav_menu_notice',
|
264 |
+
array(
|
265 |
+
'raw' => '<strong>' . __( 'There are no menus in your site.', 'premium-addons-for-elementor' ) . '</strong><br>' . sprintf( __( 'Go to the <a href="%s" target="_blank">Menus screen</a> to create one.', 'premium-addons-for-elementor' ), admin_url( 'nav-menus.php?action=edit&menu=0' ) ),
|
266 |
+
'type' => Controls_Manager::RAW_HTML,
|
267 |
+
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
268 |
+
'condition' => array(
|
269 |
+
'menu_type' => 'wordpress_menu',
|
270 |
+
),
|
271 |
+
)
|
272 |
+
);
|
273 |
+
}
|
274 |
+
|
275 |
+
if ( $papro_activated ) {
|
276 |
+
$this->add_control(
|
277 |
+
'custom_nav_notice',
|
278 |
+
array(
|
279 |
+
'raw' => __( 'It\'s not recommended to use Elementor Template and Link Submenu Items together under the same menu item', 'premium-addons-for-elemeentor' ),
|
280 |
+
'type' => Controls_Manager::RAW_HTML,
|
281 |
+
'content_classes' => 'elementor-panel-alert elementor-panel-alert-warning',
|
282 |
+
'condition' => array(
|
283 |
+
'menu_type' => 'custom',
|
284 |
+
),
|
285 |
+
)
|
286 |
+
);
|
287 |
+
}
|
288 |
+
|
289 |
+
$repeater = new Repeater();
|
290 |
+
|
291 |
+
$repeater->add_control(
|
292 |
+
'item_type',
|
293 |
+
array(
|
294 |
+
'label' => __( 'Item Type', 'premium-addons-for-elementor' ),
|
295 |
+
'type' => Controls_Manager::SELECT,
|
296 |
+
'default' => 'menu',
|
297 |
+
'options' => array(
|
298 |
+
'menu' => __( 'Menu', 'premium-addons-for-elementor' ),
|
299 |
+
'submenu' => __( 'Submenu', 'premium-addons-for-elementor' ),
|
300 |
+
),
|
301 |
+
)
|
302 |
+
);
|
303 |
+
|
304 |
+
$repeater->add_control(
|
305 |
+
'menu_content_type',
|
306 |
+
array(
|
307 |
+
'label' => __( 'Content Type', 'premium-addons-for-elementor' ),
|
308 |
+
'type' => Controls_Manager::SELECT,
|
309 |
+
'options' => array(
|
310 |
+
'link' => __( 'Link', 'premium-addons-for-elementor' ),
|
311 |
+
'custom_content' => __( 'Elementor Template', 'premium-addons-for-elementor' ),
|
312 |
+
),
|
313 |
+
'default' => 'link',
|
314 |
+
'condition' => array(
|
315 |
+
'item_type' => 'submenu',
|
316 |
+
),
|
317 |
+
)
|
318 |
+
);
|
319 |
+
|
320 |
+
$repeater->add_control(
|
321 |
+
'text',
|
322 |
+
array(
|
323 |
+
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
324 |
+
'type' => Controls_Manager::TEXT,
|
325 |
+
'default' => __( 'Item', 'premium-addons-for-elementor' ),
|
326 |
+
'dynamic' => array(
|
327 |
+
'active' => true,
|
328 |
+
),
|
329 |
+
'conditions' => array(
|
330 |
+
'relation' => 'or',
|
331 |
+
'terms' => array(
|
332 |
+
array(
|
333 |
+
'name' => 'item_type',
|
334 |
+
'operator' => '==',
|
335 |
+
'value' => 'menu',
|
336 |
+
),
|
337 |
+
array(
|
338 |
+
'name' => 'menu_content_type',
|
339 |
+
'operator' => '==',
|
340 |
+
'value' => 'link',
|
341 |
+
),
|
342 |
+
),
|
343 |
+
),
|
344 |
+
)
|
345 |
+
);
|
346 |
+
|
347 |
+
$repeater->add_control(
|
348 |
+
'link',
|
349 |
+
array(
|
350 |
+
'label' => __( 'Link', 'premium-addons-for-elementor' ),
|
351 |
+
'type' => Controls_Manager::URL,
|
352 |
+
'default' => array(
|
353 |
+
'url' => '#',
|
354 |
+
'is_external' => '',
|
355 |
+
),
|
356 |
+
'dynamic' => array(
|
357 |
+
'active' => true,
|
358 |
+
),
|
359 |
+
'conditions' => array(
|
360 |
+
'relation' => 'or',
|
361 |
+
'terms' => array(
|
362 |
+
array(
|
363 |
+
'name' => 'item_type',
|
364 |
+
'operator' => '==',
|
365 |
+
'value' => 'menu',
|
366 |
+
),
|
367 |
+
array(
|
368 |
+
'name' => 'menu_content_type',
|
369 |
+
'operator' => '==',
|
370 |
+
'value' => 'link',
|
371 |
+
),
|
372 |
+
),
|
373 |
+
),
|
374 |
+
)
|
375 |
+
);
|
376 |
+
|
377 |
+
$repeater->add_control(
|
378 |
+
'live_temp_content',
|
379 |
+
array(
|
380 |
+
'label' => __( 'Template Title', 'premium-addons-for-elementor' ),
|
381 |
+
'type' => Controls_Manager::TEXT,
|
382 |
+
'classes' => 'premium-live-temp-title control-hidden',
|
383 |
+
'label_block' => true,
|
384 |
+
'condition' => array(
|
385 |
+
'item_type' => 'submenu',
|
386 |
+
'menu_content_type' => 'custom_content',
|
387 |
+
),
|
388 |
+
)
|
389 |
+
);
|
390 |
+
|
391 |
+
$repeater->add_control(
|
392 |
+
'submenu_item_live',
|
393 |
+
array(
|
394 |
+
'type' => Controls_Manager::BUTTON,
|
395 |
+
'label_block' => true,
|
396 |
+
'button_type' => 'default papro-btn-block',
|
397 |
+
'text' => __( 'Create / Edit Template', 'premium-addons-for-elementor' ),
|
398 |
+
'event' => 'createLiveTemp',
|
399 |
+
'condition' => array(
|
400 |
+
'item_type' => 'submenu',
|
401 |
+
'menu_content_type' => 'custom_content',
|
402 |
+
),
|
403 |
+
)
|
404 |
+
);
|
405 |
+
|
406 |
+
$repeater->add_control(
|
407 |
+
'submenu_item',
|
408 |
+
array(
|
409 |
+
'label' => __( 'Select Existing Template', 'premium-addons-for-elementor' ),
|
410 |
+
'type' => Controls_Manager::SELECT2,
|
411 |
+
'classes' => 'premium-live-temp-label',
|
412 |
+
'label_block' => true,
|
413 |
+
'options' => $this->getTemplateInstance()->get_elementor_page_list(),
|
414 |
+
'condition' => array(
|
415 |
+
'item_type' => 'submenu',
|
416 |
+
'menu_content_type' => 'custom_content',
|
417 |
+
),
|
418 |
+
)
|
419 |
+
);
|
420 |
+
|
421 |
+
$repeater->add_control(
|
422 |
+
'section_full_width',
|
423 |
+
array(
|
424 |
+
'label' => __( 'Full Width Dropdown', 'premium-addons-for-elementor' ),
|
425 |
+
'type' => Controls_Manager::SWITCHER,
|
426 |
+
'description' => __( 'Enable this option to set the dropdown width to the same width of the parent section', 'premium-addons-for-elementor' ),
|
427 |
+
'condition' => array(
|
428 |
+
'item_type' => 'menu',
|
429 |
+
),
|
430 |
+
)
|
431 |
+
);
|
432 |
+
|
433 |
+
$repeater->add_responsive_control(
|
434 |
+
'section_width',
|
435 |
+
array(
|
436 |
+
'label' => __( 'Dropdown Minimum Width (px)', 'premium-addons-for-elementor' ),
|
437 |
+
'type' => Controls_Manager::SLIDER,
|
438 |
+
'range' => array(
|
439 |
+
'px' => array(
|
440 |
+
'min' => 0,
|
441 |
+
'max' => 1500,
|
442 |
+
),
|
443 |
+
),
|
444 |
+
'selectors' => array(
|
445 |
+
'{{WRAPPER}} {{CURRENT_ITEM}} ul.premium-sub-menu, {{WRAPPER}} {{CURRENT_ITEM}} .premium-mega-content-container' => 'min-width: {{SIZE}}{{UNIT}}',
|
446 |
+
),
|
447 |
+
'condition' => array(
|
448 |
+
'item_type' => 'menu',
|
449 |
+
'section_full_width!' => 'yes',
|
450 |
+
),
|
451 |
+
)
|
452 |
+
);
|
453 |
+
|
454 |
+
$repeater->add_responsive_control(
|
455 |
+
'section_position',
|
456 |
+
array(
|
457 |
+
'label' => __( 'Align to Widget Center', 'premium-addons-for-elementor' ),
|
458 |
+
'type' => Controls_Manager::SWITCHER,
|
459 |
+
'description' => __( 'This option centers the mega content to the center of the widget container. <b> Only works when Full Width Dropdown option is disabled </b>', 'premium-addons-for-elementor' ),
|
460 |
+
'condition' => array(
|
461 |
+
'item_type' => 'submenu',
|
462 |
+
'menu_content_type' => 'custom_content',
|
463 |
+
),
|
464 |
+
)
|
465 |
+
);
|
466 |
+
|
467 |
+
$repeater->add_control(
|
468 |
+
'icon_switcher',
|
469 |
+
array(
|
470 |
+
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
471 |
+
'type' => Controls_Manager::SWITCHER,
|
472 |
+
'conditions' => array(
|
473 |
+
'relation' => 'or',
|
474 |
+
'terms' => array(
|
475 |
+
array(
|
476 |
+
'name' => 'item_type',
|
477 |
+
'operator' => '==',
|
478 |
+
'value' => 'menu',
|
479 |
+
),
|
480 |
+
array(
|
481 |
+
'name' => 'menu_content_type',
|
482 |
+
'operator' => '==',
|
483 |
+
'value' => 'link',
|
484 |
+
),
|
485 |
+
),
|
486 |
+
),
|
487 |
+
)
|
488 |
+
);
|
489 |
+
|
490 |
+
$repeater->add_control(
|
491 |
+
'icon_type',
|
492 |
+
array(
|
493 |
+
'label' => __( 'Icon Type', 'premium-addons-for-elementor' ),
|
494 |
+
'type' => Controls_Manager::SELECT,
|
495 |
+
'description' => __( 'Use a font awesome icon or upload a custom image', 'premium-addons-for-elementor' ),
|
496 |
+
'options' => array(
|
497 |
+
'icon' => __( 'Icon', 'premium-addons-for-elementor' ),
|
498 |
+
'image' => __( 'Image', 'premium-addons-for-elementor' ),
|
499 |
+
'animation' => __( 'Lottie Animation', 'premium-addons-for-elementor' ),
|
500 |
+
),
|
501 |
+
'default' => 'icon',
|
502 |
+
'conditions' => array(
|
503 |
+
'relation' => 'and',
|
504 |
+
'terms' => array(
|
505 |
+
array(
|
506 |
+
'name' => 'icon_switcher',
|
507 |
+
'value' => 'yes',
|
508 |
+
),
|
509 |
+
array(
|
510 |
+
'relation' => 'or',
|
511 |
+
'terms' => array(
|
512 |
+
array(
|
513 |
+
'name' => 'item_type',
|
514 |
+
'operator' => '==',
|
515 |
+
'value' => 'menu',
|
516 |
+
),
|
517 |
+
array(
|
518 |
+
'name' => 'menu_content_type',
|
519 |
+
'operator' => '==',
|
520 |
+
'value' => 'link',
|
521 |
+
),
|
522 |
+
),
|
523 |
+
),
|
524 |
+
|
525 |
+
),
|
526 |
+
),
|
527 |
+
)
|
528 |
+
);
|
529 |
+
|
530 |
+
$repeater->add_control(
|
531 |
+
'item_icon',
|
532 |
+
array(
|
533 |
+
'label' => __( 'Select an Icon', 'premium-addons-for-elementor' ),
|
534 |
+
'type' => Controls_Manager::ICONS,
|
535 |
+
'label_block' => false,
|
536 |
+
'skin' => 'inline',
|
537 |
+
'exclude_inline_options' => array( 'svg' ),
|
538 |
+
'conditions' => array(
|
539 |
+
'relation' => 'and',
|
540 |
+
'terms' => array(
|
541 |
+
array(
|
542 |
+
'name' => 'icon_switcher',
|
543 |
+
'value' => 'yes',
|
544 |
+
),
|
545 |
+
array(
|
546 |
+
'name' => 'icon_type',
|
547 |
+
'value' => 'icon',
|
548 |
+
),
|
549 |
+
array(
|
550 |
+
'relation' => 'or',
|
551 |
+
'terms' => array(
|
552 |
+
array(
|
553 |
+
'name' => 'item_type',
|
554 |
+
'operator' => '==',
|
555 |
+
'value' => 'menu',
|
556 |
+
),
|
557 |
+
array(
|
558 |
+
'name' => 'menu_content_type',
|
559 |
+
'operator' => '==',
|
560 |
+
'value' => 'link',
|
561 |
+
),
|
562 |
+
),
|
563 |
+
),
|
564 |
+
|
565 |
+
),
|
566 |
+
),
|
567 |
+
)
|
568 |
+
);
|
569 |
+
|
570 |
+
$repeater->add_control(
|
571 |
+
'item_image',
|
572 |
+
array(
|
573 |
+
'label' => __( 'Upload Image', 'premium-addons-for-elementor' ),
|
574 |
+
'type' => Controls_Manager::MEDIA,
|
575 |
+
'default' => array(
|
576 |
+
'url' => Utils::get_placeholder_image_src(),
|
577 |
+
),
|
578 |
+
'conditions' => array(
|
579 |
+
'relation' => 'and',
|
580 |
+
'terms' => array(
|
581 |
+
array(
|
582 |
+
'name' => 'icon_switcher',
|
583 |
+
'value' => 'yes',
|
584 |
+
),
|
585 |
+
array(
|
586 |
+
'name' => 'icon_type',
|
587 |
+
'value' => 'image',
|
588 |
+
),
|
589 |
+
array(
|
590 |
+
'relation' => 'or',
|
591 |
+
'terms' => array(
|
592 |
+
array(
|
593 |
+
'name' => 'item_type',
|
594 |
+
'operator' => '==',
|
595 |
+
'value' => 'menu',
|
596 |
+
),
|
597 |
+
array(
|
598 |
+
'name' => 'menu_content_type',
|
599 |
+
'operator' => '==',
|
600 |
+
'value' => 'link',
|
601 |
+
),
|
602 |
+
),
|
603 |
+
),
|
604 |
+
|
605 |
+
),
|
606 |
+
),
|
607 |
+
)
|
608 |
+
);
|
609 |
+
|
610 |
+
$repeater->add_control(
|
611 |
+
'lottie_url',
|
612 |
+
array(
|
613 |
+
'label' => __( 'Animation JSON URL', 'premium-addons-for-elementor' ),
|
614 |
+
'type' => Controls_Manager::TEXT,
|
615 |
+
'description' => 'Get JSON code URL from <a href="https://lottiefiles.com/" target="_blank">here</a>',
|
616 |
+
'label_block' => true,
|
617 |
+
'conditions' => array(
|
618 |
+
'relation' => 'and',
|
619 |
+
'terms' => array(
|
620 |
+
array(
|
621 |
+
'name' => 'icon_switcher',
|
622 |
+
'value' => 'yes',
|
623 |
+
),
|
624 |
+
array(
|
625 |
+
'name' => 'icon_type',
|
626 |
+
'value' => 'animation',
|
627 |
+
),
|
628 |
+
array(
|
629 |
+
'relation' => 'or',
|
630 |
+
'terms' => array(
|
631 |
+
array(
|
632 |
+
'name' => 'item_type',
|
633 |
+
'operator' => '==',
|
634 |
+
'value' => 'menu',
|
635 |
+
),
|
636 |
+
array(
|
637 |
+
'name' => 'menu_content_type',
|
638 |
+
'operator' => '==',
|
639 |
+
'value' => 'link',
|
640 |
+
),
|
641 |
+
),
|
642 |
+
),
|
643 |
+
|
644 |
+
),
|
645 |
+
),
|
646 |
+
)
|
647 |
+
);
|
648 |
+
|
649 |
+
$repeater->add_control(
|
650 |
+
'badge_switcher',
|
651 |
+
array(
|
652 |
+
'label' => __( 'Badge', 'premium-addons-for-elementor' ),
|
653 |
+
'type' => Controls_Manager::SWITCHER,
|
654 |
+
'separator' => 'before',
|
655 |
+
'conditions' => array(
|
656 |
+
'relation' => 'or',
|
657 |
+
'terms' => array(
|
658 |
+
array(
|
659 |
+
'name' => 'item_type',
|
660 |
+
'operator' => '==',
|
661 |
+
'value' => 'menu',
|
662 |
+
),
|
663 |
+
array(
|
664 |
+
'name' => 'menu_content_type',
|
665 |
+
'operator' => '==',
|
666 |
+
'value' => 'link',
|
667 |
+
),
|
668 |
+
),
|
669 |
+
),
|
670 |
+
)
|
671 |
+
);
|
672 |
+
|
673 |
+
$repeater->add_control(
|
674 |
+
'badge_text',
|
675 |
+
array(
|
676 |
+
'label' => __( 'Badge Text', 'premium-addons-for-elementor' ),
|
677 |
+
'type' => Controls_Manager::TEXT,
|
678 |
+
'conditions' => array(
|
679 |
+
'relation' => 'and',
|
680 |
+
'terms' => array(
|
681 |
+
array(
|
682 |
+
'name' => 'badge_switcher',
|
683 |
+
'value' => 'yes',
|
684 |
+
),
|
685 |
+
array(
|
686 |
+
'relation' => 'or',
|
687 |
+
'terms' => array(
|
688 |
+
array(
|
689 |
+
'name' => 'item_type',
|
690 |
+
'operator' => '==',
|
691 |
+
'value' => 'menu',
|
692 |
+
),
|
693 |
+
array(
|
694 |
+
'name' => 'menu_content_type',
|
695 |
+
'operator' => '==',
|
696 |
+
'value' => 'link',
|
697 |
+
),
|
698 |
+
),
|
699 |
+
),
|
700 |
+
|
701 |
+
),
|
702 |
+
),
|
703 |
+
)
|
704 |
+
);
|
705 |
+
|
706 |
+
if ( $papro_activated ) {
|
707 |
+
|
708 |
+
do_action( 'pa_custom_menu_controls', $this, $repeater );
|
709 |
+
|
710 |
+
}
|
711 |
+
|
712 |
+
$this->end_controls_section();
|
713 |
+
|
714 |
+
}
|
715 |
+
|
716 |
+
/**
|
717 |
+
* Get menu content controls.
|
718 |
+
*
|
719 |
+
* @access private
|
720 |
+
* @since 4.9.3
|
721 |
+
*/
|
722 |
+
private function get_menu_content_controls() {
|
723 |
+
|
724 |
+
$this->start_controls_section(
|
725 |
+
'display_options_section',
|
726 |
+
array(
|
727 |
+
'label' => __( 'Display Options', 'premium-addons-for-elementor' ),
|
728 |
+
)
|
729 |
+
);
|
730 |
+
|
731 |
+
$this->add_control(
|
732 |
+
'menu_heading',
|
733 |
+
array(
|
734 |
+
'label' => __( 'Menu Settings', 'premium-addons-for-elementor' ),
|
735 |
+
'type' => Controls_Manager::HEADING,
|
736 |
+
)
|
737 |
+
);
|
738 |
+
|
739 |
+
$this->add_control(
|
740 |
+
'pa_nav_menu_layout',
|
741 |
+
array(
|
742 |
+
'label' => __( 'Layout', 'premium-addons-for-elementor' ),
|
743 |
+
'type' => Controls_Manager::SELECT,
|
744 |
+
'prefix_class' => 'premium-nav-',
|
745 |
+
'options' => array(
|
746 |
+
'hor' => 'Horizontal',
|
747 |
+
'ver' => 'Vertical',
|
748 |
+
'dropdown' => 'Expand',
|
749 |
+
'slide' => 'Slide',
|
750 |
+
),
|
751 |
+
'render_type' => 'template',
|
752 |
+
'default' => 'hor',
|
753 |
+
)
|
754 |
+
);
|
755 |
+
|
756 |
+
$align_left = is_rtl() ? 'flex-end' : 'flex-start';
|
757 |
+
$align_right = is_rtl() ? 'flex-start' : 'flex-end';
|
758 |
+
$align_def = is_rtl() ? 'flex-end' : 'flex-start';
|
759 |
+
|
760 |
+
$this->add_responsive_control(
|
761 |
+
'pa_nav_menu_align',
|
762 |
+
array(
|
763 |
+
'label' => __( 'Menu Alignment', 'premium-addons-for-elementor' ),
|
764 |
+
'type' => Controls_Manager::CHOOSE,
|
765 |
+
'options' => array(
|
766 |
+
$align_left => array(
|
767 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
768 |
+
'icon' => 'eicon-h-align-left',
|
769 |
+
),
|
770 |
+
'center' => array(
|
771 |
+
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
772 |
+
'icon' => 'eicon-h-align-center',
|
773 |
+
),
|
774 |
+
$align_right => array(
|
775 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
776 |
+
'icon' => 'eicon-h-align-right',
|
777 |
+
),
|
778 |
+
'space-between' => array(
|
779 |
+
'title' => __( 'Strech', 'premium-addons-for-elementor' ),
|
780 |
+
'icon' => 'eicon-h-align-stretch',
|
781 |
+
),
|
782 |
+
),
|
783 |
+
'default' => 'center',
|
784 |
+
'toggle' => false,
|
785 |
+
'selectors' => array(
|
786 |
+
'{{WRAPPER}} .premium-main-nav-menu' => 'justify-content: {{VALUE}}',
|
787 |
+
),
|
788 |
+
'condition' => array(
|
789 |
+
'pa_nav_menu_layout' => 'hor',
|
790 |
+
),
|
791 |
+
)
|
792 |
+
);
|
793 |
+
|
794 |
+
$this->add_responsive_control(
|
795 |
+
'pa_nav_menu_align_ver',
|
796 |
+
array(
|
797 |
+
'label' => __( 'Menu Alignment', 'premium-addons-for-elementor' ),
|
798 |
+
'type' => Controls_Manager::CHOOSE,
|
799 |
+
'options' => array(
|
800 |
+
$align_left => array(
|
801 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
802 |
+
'icon' => 'eicon-text-align-left',
|
803 |
+
),
|
804 |
+
'center' => array(
|
805 |
+
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
806 |
+
'icon' => 'eicon-text-align-center',
|
807 |
+
),
|
808 |
+
$align_right => array(
|
809 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
810 |
+
'icon' => 'eicon-text-align-right',
|
811 |
+
),
|
812 |
+
),
|
813 |
+
'default' => $align_def,
|
814 |
+
'toggle' => false,
|
815 |
+
'selectors' => array(
|
816 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'justify-content: {{VALUE}}',
|
817 |
+
),
|
818 |
+
'condition' => array(
|
819 |
+
'pa_nav_menu_layout' => 'ver',
|
820 |
+
),
|
821 |
+
)
|
822 |
+
);
|
823 |
+
|
824 |
+
$this->add_control(
|
825 |
+
'pointer',
|
826 |
+
array(
|
827 |
+
'label' => __( 'Item Hover Effect', 'premium-addons-for-elementor' ),
|
828 |
+
'type' => Controls_Manager::SELECT,
|
829 |
+
'default' => 'none',
|
830 |
+
'options' => array(
|
831 |
+
'none' => __( 'None', 'premium-addons-for-elementor' ),
|
832 |
+
'underline' => __( 'Underline', 'premium-addons-for-elementor' ),
|
833 |
+
'overline' => __( 'Overline', 'premium-addons-for-elementor' ),
|
834 |
+
'double-line' => __( 'Double Line', 'premium-addons-for-elementor' ),
|
835 |
+
'framed' => __( 'Framed', 'premium-addons-for-elementor' ),
|
836 |
+
'background' => __( 'Background', 'premium-addons-for-elementor' ),
|
837 |
+
'text' => __( 'Text', 'premium-addons-for-elementor' ),
|
838 |
+
),
|
839 |
+
'style_transfer' => true,
|
840 |
+
)
|
841 |
+
);
|
842 |
+
|
843 |
+
$this->add_control(
|
844 |
+
'animation_line',
|
845 |
+
array(
|
846 |
+
'label' => __( 'Animation', 'premium-addons-for-elementor' ),
|
847 |
+
'type' => Controls_Manager::SELECT,
|
848 |
+
'default' => 'fade',
|
849 |
+
'options' => array(
|
850 |
+
'fade' => 'Fade',
|
851 |
+
'slide' => 'Slide',
|
852 |
+
'grow' => 'Grow',
|
853 |
+
'drop-in' => 'Drop In',
|
854 |
+
'drop-out' => 'Drop Out',
|
855 |
+
'none' => 'None',
|
856 |
+
),
|
857 |
+
'condition' => array(
|
858 |
+
'pointer' => array( 'underline', 'overline', 'double-line' ),
|
859 |
+
),
|
860 |
+
)
|
861 |
+
);
|
862 |
+
|
863 |
+
$this->add_control(
|
864 |
+
'animation_framed',
|
865 |
+
array(
|
866 |
+
'label' => __( 'Animation', 'premium-addons-for-elementor' ),
|
867 |
+
'type' => Controls_Manager::SELECT,
|
868 |
+
'default' => 'fade',
|
869 |
+
'options' => array(
|
870 |
+
'fade' => 'Fade',
|
871 |
+
'grow' => 'Grow',
|
872 |
+
'shrink' => 'Shrink',
|
873 |
+
'draw' => 'Draw',
|
874 |
+
'corners' => 'Corners',
|
875 |
+
'none' => 'None',
|
876 |
+
),
|
877 |
+
'condition' => array(
|
878 |
+
'pointer' => 'framed',
|
879 |
+
),
|
880 |
+
)
|
881 |
+
);
|
882 |
+
|
883 |
+
$this->add_control(
|
884 |
+
'animation_background',
|
885 |
+
array(
|
886 |
+
'label' => __( 'Animation', 'premium-addons-for-elementor' ),
|
887 |
+
'type' => Controls_Manager::SELECT,
|
888 |
+
'default' => 'fade',
|
889 |
+
'options' => array(
|
890 |
+
'fade' => 'Fade',
|
891 |
+
'grow' => 'Grow',
|
892 |
+
'shrink' => 'Shrink',
|
893 |
+
'sweep-left' => 'Sweep Left',
|
894 |
+
'sweep-right' => 'Sweep Right',
|
895 |
+
'sweep-up' => 'Sweep Up',
|
896 |
+
'sweep-down' => 'Sweep Down',
|
897 |
+
'shutter-in-vertical' => 'Shutter In Vertical',
|
898 |
+
'shutter-out-vertical' => 'Shutter Out Vertical',
|
899 |
+
'shutter-in-horizontal' => 'Shutter In Horizontal',
|
900 |
+
'shutter-out-horizontal' => 'Shutter Out Horizontal',
|
901 |
+
'none' => 'None',
|
902 |
+
),
|
903 |
+
'condition' => array(
|
904 |
+
'pointer' => 'background',
|
905 |
+
),
|
906 |
+
)
|
907 |
+
);
|
908 |
+
|
909 |
+
$this->add_control(
|
910 |
+
'animation_text',
|
911 |
+
array(
|
912 |
+
'label' => __( 'Animation', 'premium-addons-for-elementor' ),
|
913 |
+
'type' => Controls_Manager::SELECT,
|
914 |
+
'default' => 'grow',
|
915 |
+
'options' => array(
|
916 |
+
'grow' => 'Grow',
|
917 |
+
'shrink' => 'Shrink',
|
918 |
+
'sink' => 'Sink',
|
919 |
+
'float' => 'Float',
|
920 |
+
'skew' => 'Skew',
|
921 |
+
'rotate' => 'Rotate',
|
922 |
+
'none' => 'None',
|
923 |
+
),
|
924 |
+
'condition' => array(
|
925 |
+
'pointer' => 'text',
|
926 |
+
),
|
927 |
+
)
|
928 |
+
);
|
929 |
+
|
930 |
+
$this->get_vertical_toggle_settings();
|
931 |
+
|
932 |
+
$this->get_sticky_option_settings();
|
933 |
+
|
934 |
+
$this->add_control(
|
935 |
+
'submenu_heading',
|
936 |
+
array(
|
937 |
+
'label' => __( 'Submenu Settings', 'premium-addons-for-elementor' ),
|
938 |
+
'type' => Controls_Manager::HEADING,
|
939 |
+
'separator' => 'before',
|
940 |
+
)
|
941 |
+
);
|
942 |
+
|
943 |
+
$this->add_control(
|
944 |
+
'submenu_icon',
|
945 |
+
array(
|
946 |
+
'label' => __( 'Submenu Indicator Icon', 'premium-addons-for-elementor' ),
|
947 |
+
'type' => Controls_Manager::ICONS,
|
948 |
+
'default' => array(
|
949 |
+
'value' => 'fas fa-angle-down',
|
950 |
+
'library' => 'fa-solid',
|
951 |
+
),
|
952 |
+
'recommended' => array(
|
953 |
+
'fa-solid' => array(
|
954 |
+
'chevron-down',
|
955 |
+
'angle-down',
|
956 |
+
'caret-down',
|
957 |
+
'plus',
|
958 |
+
),
|
959 |
+
),
|
960 |
+
'label_block' => false,
|
961 |
+
'skin' => 'inline',
|
962 |
+
'exclude_inline_options' => array( 'svg' ),
|
963 |
+
'frontend_available' => true,
|
964 |
+
)
|
965 |
+
);
|
966 |
+
|
967 |
+
$default_pos = is_rtl() ? 'left' : 'right';
|
968 |
+
$default_align = is_rtl() ? 'flex-end' : 'flex-start';
|
969 |
+
|
970 |
+
$this->add_responsive_control(
|
971 |
+
'pa_nav_ver_submenu',
|
972 |
+
array(
|
973 |
+
'label' => __( 'Submenu Position', 'premium-addons-for-elementor' ),
|
974 |
+
'type' => Controls_Manager::CHOOSE,
|
975 |
+
'render_type' => 'template',
|
976 |
+
'prefix_class' => 'premium-vertical-',
|
977 |
+
'options' => array(
|
978 |
+
'left' => array(
|
979 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
980 |
+
'icon' => 'eicon-h-align-left',
|
981 |
+
),
|
982 |
+
'right' => array(
|
983 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
984 |
+
'icon' => 'eicon-h-align-right',
|
985 |
+
),
|
986 |
+
),
|
987 |
+
'default' => $default_pos,
|
988 |
+
'toggle' => false,
|
989 |
+
'condition' => array(
|
990 |
+
'pa_nav_menu_layout' => 'ver',
|
991 |
+
),
|
992 |
+
)
|
993 |
+
);
|
994 |
+
|
995 |
+
$this->add_responsive_control(
|
996 |
+
'pa_sub_menu_align',
|
997 |
+
array(
|
998 |
+
'label' => __( 'Content Alignment', 'premium-addons-for-elementor' ),
|
999 |
+
'type' => Controls_Manager::CHOOSE,
|
1000 |
+
'options' => array(
|
1001 |
+
'flex-start' => array(
|
1002 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1003 |
+
'icon' => 'eicon-text-align-left',
|
1004 |
+
),
|
1005 |
+
'center' => array(
|
1006 |
+
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1007 |
+
'icon' => 'eicon-text-align-center',
|
1008 |
+
),
|
1009 |
+
'flex-end' => array(
|
1010 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1011 |
+
'icon' => 'eicon-text-align-right',
|
1012 |
+
),
|
1013 |
+
),
|
1014 |
+
'default' => $default_align,
|
1015 |
+
'toggle' => false,
|
1016 |
+
'selectors' => array(
|
1017 |
+
'{{WRAPPER}} .premium-sub-menu .premium-sub-menu-link' => 'justify-content: {{VALUE}}',
|
1018 |
+
),
|
1019 |
+
)
|
1020 |
+
);
|
1021 |
+
|
1022 |
+
$this->add_control(
|
1023 |
+
'submenu_event',
|
1024 |
+
array(
|
1025 |
+
'label' => __( 'Open Submenu On', 'premium-addons-for-elementor' ),
|
1026 |
+
'type' => Controls_Manager::SELECT,
|
1027 |
+
'default' => 'hover',
|
1028 |
+
'render_type' => 'template',
|
1029 |
+
'options' => array(
|
1030 |
+
'hover' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1031 |
+
'click' => __( 'click', 'premium-addons-for-elementor' ),
|
1032 |
+
),
|
1033 |
+
'condition' => array(
|
1034 |
+
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1035 |
+
),
|
1036 |
+
)
|
1037 |
+
);
|
1038 |
+
|
1039 |
+
$this->add_control(
|
1040 |
+
'submenu_trigger',
|
1041 |
+
array(
|
1042 |
+
'label' => __( 'Submenu Trigger', 'premium-addons-for-elementor' ),
|
1043 |
+
'type' => Controls_Manager::SELECT,
|
1044 |
+
'default' => 'item',
|
1045 |
+
'render_type' => 'template',
|
1046 |
+
'options' => array(
|
1047 |
+
'icon' => __( 'Submenu Dropdwon Icon', 'premium-addons-for-elementor' ),
|
1048 |
+
'item' => __( 'Submenu Item', 'premium-addons-for-elementor' ),
|
1049 |
+
),
|
1050 |
+
'condition' => array(
|
1051 |
+
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1052 |
+
'submenu_event' => 'click',
|
1053 |
+
),
|
1054 |
+
)
|
1055 |
+
);
|
1056 |
+
|
1057 |
+
$this->add_control(
|
1058 |
+
'submenu_slide',
|
1059 |
+
array(
|
1060 |
+
'label' => __( 'Submenu Animation', 'premium-addons-for-elementor' ),
|
1061 |
+
'type' => Controls_Manager::SELECT,
|
1062 |
+
'prefix_class' => 'premium-nav-',
|
1063 |
+
'default' => 'none',
|
1064 |
+
'options' => array(
|
1065 |
+
'none' => __( 'None', 'premium-addons-for-elementor' ),
|
1066 |
+
'slide-up' => __( 'Slide Up', 'premium-addons-for-elementor' ),
|
1067 |
+
'slide-down' => __( 'Slide Down', 'premium-addons-for-elementor' ),
|
1068 |
+
'slide-left' => __( 'Slide Left', 'premium-addons-for-elementor' ),
|
1069 |
+
'slide-right' => __( 'Slide Right', 'premium-addons-for-elementor' ),
|
1070 |
+
),
|
1071 |
+
'condition' => array(
|
1072 |
+
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1073 |
+
),
|
1074 |
+
)
|
1075 |
+
);
|
1076 |
+
|
1077 |
+
// sub-items badge hover.
|
1078 |
+
$this->add_control(
|
1079 |
+
'sub_badge_hv_effects',
|
1080 |
+
array(
|
1081 |
+
'label' => __( 'Badge Effects', 'premium-addons-for-elementor' ),
|
1082 |
+
'type' => Controls_Manager::SELECT,
|
1083 |
+
'render_type' => 'template',
|
1084 |
+
'default' => '',
|
1085 |
+
'options' => array(
|
1086 |
+
'' => __( 'None', 'premium-addons-for-elementor' ),
|
1087 |
+
'dot' => __( 'Grow', 'premium-addons-for-elementor' ),
|
1088 |
+
'expand' => __( 'Expand', 'premium-addons-for-elementor' ),
|
1089 |
+
'pulse' => __( 'Pulse', 'premium-addons-for-elementor' ),
|
1090 |
+
'buzz' => __( 'Buzz', 'premium-addons-for-elementor' ),
|
1091 |
+
'slide-right' => __( 'Slide Right', 'premium-addons-for-elementor' ),
|
1092 |
+
'slide-left' => __( 'Slide Left', 'premium-addons-for-elementor' ),
|
1093 |
+
),
|
1094 |
+
)
|
1095 |
+
);
|
1096 |
+
|
1097 |
+
$this->add_responsive_control(
|
1098 |
+
'dot_size',
|
1099 |
+
array(
|
1100 |
+
'label' => __( 'Dot Size', 'premium-addons-for-elementor' ),
|
1101 |
+
'type' => Controls_Manager::SLIDER,
|
1102 |
+
'label_block' => true,
|
1103 |
+
'size_units' => array( 'px' ),
|
1104 |
+
'range' => array(
|
1105 |
+
'px' => array(
|
1106 |
+
'min' => 0,
|
1107 |
+
'max' => 10,
|
1108 |
+
),
|
1109 |
+
),
|
1110 |
+
'selectors' => array(
|
1111 |
+
'{{WRAPPER}} .premium-badge-dot .premium-sub-item-badge' => 'padding: {{SIZE}}{{UNIT}};',
|
1112 |
+
),
|
1113 |
+
'condition' => array(
|
1114 |
+
'sub_badge_hv_effects' => 'dot',
|
1115 |
+
),
|
1116 |
+
)
|
1117 |
+
);
|
1118 |
+
|
1119 |
+
// toggle menu settings.
|
1120 |
+
$this->add_control(
|
1121 |
+
'pa_toggle_heading',
|
1122 |
+
array(
|
1123 |
+
'label' => __( 'Mobile Menu Settings', 'premium-addons-for-elementor' ),
|
1124 |
+
'type' => Controls_Manager::HEADING,
|
1125 |
+
'separator' => 'before',
|
1126 |
+
'condition' => array(
|
1127 |
+
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1128 |
+
),
|
1129 |
+
)
|
1130 |
+
);
|
1131 |
+
|
1132 |
+
$this->add_control(
|
1133 |
+
'pa_mobile_menu_layout',
|
1134 |
+
array(
|
1135 |
+
'label' => __( 'Layout', 'premium-addons-for-elementor' ),
|
1136 |
+
'type' => Controls_Manager::SELECT,
|
1137 |
+
'render_type' => 'template',
|
1138 |
+
'prefix_class' => 'premium-ham-',
|
1139 |
+
'options' => array(
|
1140 |
+
'dropdown' => 'Expand',
|
1141 |
+
'slide' => 'Slide',
|
1142 |
+
),
|
1143 |
+
'default' => 'dropdown',
|
1144 |
+
'condition' => array(
|
1145 |
+
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1146 |
+
),
|
1147 |
+
)
|
1148 |
+
);
|
1149 |
+
|
1150 |
+
$this->add_control(
|
1151 |
+
'pa_mobile_menu_breakpoint',
|
1152 |
+
array(
|
1153 |
+
'label' => __( 'Breakpoint', 'premium-addons-for-elementor' ),
|
1154 |
+
'type' => Controls_Manager::SELECT,
|
1155 |
+
'options' => array(
|
1156 |
+
'767' => __( 'Mobile (<768)', 'premium-addons-for-elementor' ),
|
1157 |
+
'1024' => __( 'Tablet (<1025)', 'premium-addons-for-elementor' ),
|
1158 |
+
'custom' => __( 'Custom', 'premium-addons-for-elementor' ),
|
1159 |
+
),
|
1160 |
+
'default' => '1024',
|
1161 |
+
'condition' => array(
|
1162 |
+
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1163 |
+
),
|
1164 |
+
)
|
1165 |
+
);
|
1166 |
+
|
1167 |
+
$this->add_control(
|
1168 |
+
'pa_custom_breakpoint',
|
1169 |
+
array(
|
1170 |
+
'label' => __( 'Custom Breakpoint (px)', 'premium-addons-for-elementor' ),
|
1171 |
+
'type' => Controls_Manager::NUMBER,
|
1172 |
+
'min' => 0,
|
1173 |
+
'max' => 2000,
|
1174 |
+
'step' => 5,
|
1175 |
+
'description' => 'Use this option to control when to turn your menu into a toggle menu, Default is 1025',
|
1176 |
+
'condition' => array(
|
1177 |
+
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
1178 |
+
'pa_mobile_menu_breakpoint' => 'custom',
|
1179 |
+
),
|
1180 |
+
)
|
1181 |
+
);
|
1182 |
+
|
1183 |
+
$this->end_controls_section();
|
1184 |
+
|
1185 |
+
$this->get_dropdown_content_settings( $align_left, $align_right );
|
1186 |
+
|
1187 |
+
}
|
1188 |
+
|
1189 |
+
/**
|
1190 |
+
* Add random badges control controls.
|
1191 |
+
*
|
1192 |
+
* @access private
|
1193 |
+
* @since 4.9.34
|
1194 |
+
*/
|
1195 |
+
private function add_random_badges_section() {
|
1196 |
+
|
1197 |
+
$this->start_controls_section(
|
1198 |
+
'premium_rn_badge_section',
|
1199 |
+
array(
|
1200 |
+
'label' => __( 'Random Badges', 'premium-addons-for-elementor' ),
|
1201 |
+
)
|
1202 |
+
);
|
1203 |
+
|
1204 |
+
$papro_activated = apply_filters( 'papro_activated', false );
|
1205 |
+
|
1206 |
+
if ( $papro_activated ) {
|
1207 |
+
if ( version_compare( PREMIUM_PRO_ADDONS_VERSION, '2.8.9', '>' ) ) {
|
1208 |
+
do_action( 'pa_rn_badges_controls', $this );
|
1209 |
+
|
1210 |
+
} else {
|
1211 |
+
$this->add_control(
|
1212 |
+
'rn_badges_ver_notice',
|
1213 |
+
array(
|
1214 |
+
'type' => Controls_Manager::RAW_HTML,
|
1215 |
+
'raw' => __( 'Please update Premium Addons Pro version to 2.8.10 to use this option.', 'premium-addons-for-elementor' ),
|
1216 |
+
'content_classes' => 'elementor-panel-alert elementor-panel-alert-info',
|
1217 |
+
)
|
1218 |
+
);
|
1219 |
+
}
|
1220 |
+
} else {
|
1221 |
+
|
1222 |
+
$get_pro = Helper_Functions::get_campaign_link( 'https://premiumaddons.com/pro', 'editor-page', 'wp-editor', 'get-pro' );
|
1223 |
+
|
1224 |
+
$this->add_control(
|
1225 |
+
'rn_badges_notice',
|
1226 |
+
array(
|
1227 |
+
'type' => Controls_Manager::RAW_HTML,
|
1228 |
+
'raw' => __( 'Random Badges can be used in Premium Addons Pro.', 'premium-addons-for-elementor' ) . '<a href="' . esc_url( $get_pro ) . '" target="_blank">' . __( ' Upgrade now!', 'premium-addons-for-elementor' ) . '</a>',
|
1229 |
+
'content_classes' => 'papro-upgrade-notice',
|
1230 |
+
)
|
1231 |
+
);
|
1232 |
+
}
|
1233 |
+
|
1234 |
+
$this->end_controls_section();
|
1235 |
+
|
1236 |
+
}
|
1237 |
+
|
1238 |
+
/**
|
1239 |
+
* Add Helpful Information Section
|
1240 |
+
*
|
1241 |
+
* @access private
|
1242 |
+
* @since 4.9.35
|
1243 |
+
*/
|
1244 |
+
private function add_helpful_docs_section() {
|
1245 |
+
|
1246 |
+
$this->start_controls_section(
|
1247 |
+
'section_pa_docs',
|
1248 |
+
array(
|
1249 |
+
'label' => __( 'Helpful Documentations', 'premium-addons-for-elementor' ),
|
1250 |
+
)
|
1251 |
+
);
|
1252 |
+
|
1253 |
+
$docs = array(
|
1254 |
+
'https://premiumaddons.com/docs/elementor-mega-menu-widget-tutorial' => __( 'Getting started »', 'premium-addons-for-elementor' ),
|
1255 |
+
'https://premiumaddons.com/docs/elementor-mega-menu-widget-tutorial/#random-badges' => __( 'How to add random badges in Mega Menu widget »', 'premium-addons-for-elementor' ),
|
1256 |
+
);
|
1257 |
+
|
1258 |
+
$doc_index = 1;
|
1259 |
+
foreach ( $docs as $url => $title ) {
|
1260 |
+
|
1261 |
+
$doc_url = Helper_Functions::get_campaign_link( $url, 'editor-page', 'wp-editor', 'get-support' );
|
1262 |
+
|
1263 |
+
$this->add_control(
|
1264 |
+
'doc_' . $doc_index,
|
1265 |
+
array(
|
1266 |
+
'type' => Controls_Manager::RAW_HTML,
|
1267 |
+
'raw' => sprintf( '<a href="%s" target="_blank">%s</a>', $doc_url, $title ),
|
1268 |
+
'content_classes' => 'editor-pa-doc',
|
1269 |
+
)
|
1270 |
+
);
|
1271 |
+
|
1272 |
+
$doc_index++;
|
1273 |
+
|
1274 |
+
}
|
1275 |
+
|
1276 |
+
$this->end_controls_section();
|
1277 |
+
|
1278 |
+
}
|
1279 |
+
|
1280 |
+
/**
|
1281 |
+
* Get sticky style options.
|
1282 |
+
*
|
1283 |
+
* @access private
|
1284 |
+
* @since 4.9.15
|
1285 |
+
*/
|
1286 |
+
private function get_sticky_style() {
|
1287 |
+
|
1288 |
+
$this->start_controls_section(
|
1289 |
+
'pa_sticky_style_sec',
|
1290 |
+
array(
|
1291 |
+
'label' => __( 'Sticky Menu Style', 'premium-addons-for-elementor' ),
|
1292 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1293 |
+
'condition' => array(
|
1294 |
+
'pa_sticky_switcher' => 'yes',
|
1295 |
+
'pa_nav_menu_layout' => 'hor',
|
1296 |
+
),
|
1297 |
+
)
|
1298 |
+
);
|
1299 |
+
|
1300 |
+
$this->add_group_control(
|
1301 |
+
Group_Control_Box_Shadow::get_type(),
|
1302 |
+
array(
|
1303 |
+
'name' => 'pa_sticky_shadow',
|
1304 |
+
'label' => __( 'Shadow', 'premium-addons-for-elementor' ),
|
1305 |
+
'fields_options' => array(
|
1306 |
+
'box_shadow' => array(
|
1307 |
+
'selectors' => array(
|
1308 |
+
'.premium-sticky-parent-{{ID}}' => 'box-shadow: {{HORIZONTAL}}px {{VERTICAL}}px {{BLUR}}px {{SPREAD}}px {{COLOR}} {{box_shadow_position.VALUE}} !important;',
|
1309 |
+
),
|
1310 |
+
),
|
1311 |
+
),
|
1312 |
+
)
|
1313 |
+
);
|
1314 |
+
|
1315 |
+
$this->add_group_control(
|
1316 |
+
Group_Control_Background::get_type(),
|
1317 |
+
array(
|
1318 |
+
'name' => 'pa_sticky_bg',
|
1319 |
+
'types' => array( 'classic', 'gradient' ),
|
1320 |
+
'selector' => '.premium-sticky-parent-{{ID}}',
|
1321 |
+
)
|
1322 |
+
);
|
1323 |
+
|
1324 |
+
$this->add_group_control(
|
1325 |
+
Group_Control_Border::get_type(),
|
1326 |
+
array(
|
1327 |
+
'name' => 'pa_sticky_border',
|
1328 |
+
'selector' => '.premium-sticky-parent-{{ID}}',
|
1329 |
+
)
|
1330 |
+
);
|
1331 |
+
|
1332 |
+
$this->add_responsive_control(
|
1333 |
+
'pa_sticky_padding',
|
1334 |
+
array(
|
1335 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
1336 |
+
'type' => Controls_Manager::DIMENSIONS,
|
1337 |
+
'size_units' => array( 'px', 'em', '%' ),
|
1338 |
+
'selectors' => array(
|
1339 |
+
'.premium-sticky-parent-{{ID}}' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
1340 |
+
),
|
1341 |
+
)
|
1342 |
+
);
|
1343 |
+
|
1344 |
+
$this->end_controls_section();
|
1345 |
+
}
|
1346 |
+
|
1347 |
+
/**
|
1348 |
+
* Get sticky option settings.
|
1349 |
+
*
|
1350 |
+
* @access private
|
1351 |
+
* @since 4.9.15
|
1352 |
+
*/
|
1353 |
+
private function get_sticky_option_settings() {
|
1354 |
+
|
1355 |
+
$this->add_control(
|
1356 |
+
'pa_sticky_switcher',
|
1357 |
+
array(
|
1358 |
+
'label' => __( 'Enable Sticky Menu', 'premium-addons-for-elementor' ),
|
1359 |
+
'type' => Controls_Manager::SWITCHER,
|
1360 |
+
'frontend_available' => true,
|
1361 |
+
'separator' => 'before',
|
1362 |
+
'render_type' => 'template',
|
1363 |
+
'prefix_class' => 'premium-nav-sticky-',
|
1364 |
+
'condition' => array(
|
1365 |
+
'pa_nav_menu_layout' => 'hor',
|
1366 |
+
),
|
1367 |
+
)
|
1368 |
+
);
|
1369 |
+
|
1370 |
+
$this->add_control(
|
1371 |
+
'pa_sticky_target',
|
1372 |
+
array(
|
1373 |
+
'label' => __( 'Sticky Target ID', 'premium-addons-for-elementor' ),
|
1374 |
+
'type' => Controls_Manager::TEXT,
|
1375 |
+
'frontend_available' => true,
|
1376 |
+
'render_type' => 'template',
|
1377 |
+
'placeholder' => 'sticky-target',
|
1378 |
+
'description' => __( 'The target id to apply sticky effect on ( without the "#" ).', 'premium-addons-for-elementor' ),
|
1379 |
+
'condition' => array(
|
1380 |
+
'pa_nav_menu_layout' => 'hor',
|
1381 |
+
'pa_sticky_switcher' => 'yes',
|
1382 |
+
),
|
1383 |
+
)
|
1384 |
+
);
|
1385 |
+
|
1386 |
+
$this->add_control(
|
1387 |
+
'pa_sticky_on_scroll',
|
1388 |
+
array(
|
1389 |
+
'label' => __( 'Sticky on Scroll Up', 'premium-addons-for-elementor' ),
|
1390 |
+
'type' => Controls_Manager::SWITCHER,
|
1391 |
+
// 'prefix_class' => 'premium-sticky-scroll-',
|
1392 |
+
'frontend_available' => true,
|
1393 |
+
'render_type' => 'template',
|
1394 |
+
'condition' => array(
|
1395 |
+
'pa_nav_menu_layout' => 'hor',
|
1396 |
+
'pa_sticky_switcher' => 'yes',
|
1397 |
+
),
|
1398 |
+
)
|
1399 |
+
);
|
1400 |
+
|
1401 |
+
$this->add_control(
|
1402 |
+
'pa_sticky_disabled_on',
|
1403 |
+
array(
|
1404 |
+
'label' => __( 'Disable On', 'premium-addons-for-elementor' ),
|
1405 |
+
'type' => Controls_Manager::SELECT2,
|
1406 |
+
'frontend_available' => true,
|
1407 |
+
'options' => Helper_Functions::get_all_breakpoints(),
|
1408 |
+
'multiple' => true,
|
1409 |
+
'label_block' => true,
|
1410 |
+
'render_type' => 'template',
|
1411 |
+
'default' => array( 'tablet', 'mobile' ),
|
1412 |
+
'condition' => array(
|
1413 |
+
'pa_nav_menu_layout' => 'hor',
|
1414 |
+
'pa_sticky_switcher' => 'yes',
|
1415 |
+
),
|
1416 |
+
)
|
1417 |
+
);
|
1418 |
+
}
|
1419 |
+
|
1420 |
+
/**
|
1421 |
+
* Get vertical toggle settings.
|
1422 |
+
*
|
1423 |
+
* @access private
|
1424 |
+
* @since 4.9.15
|
1425 |
+
*/
|
1426 |
+
private function get_vertical_toggle_settings() {
|
1427 |
+
|
1428 |
+
$this->add_control(
|
1429 |
+
'pa_ver_toggle_switcher',
|
1430 |
+
array(
|
1431 |
+
'label' => __( 'Enable Collapsed Menu', 'premium-addons-for-elementor' ),
|
1432 |
+
'type' => Controls_Manager::SWITCHER,
|
1433 |
+
'separator' => 'before',
|
1434 |
+
'render_type' => 'template',
|
1435 |
+
'prefix_class' => 'premium-ver-toggle-',
|
1436 |
+
'condition' => array(
|
1437 |
+
'pa_nav_menu_layout' => 'ver',
|
1438 |
+
),
|
1439 |
+
)
|
1440 |
+
);
|
1441 |
+
|
1442 |
+
$this->add_control(
|
1443 |
+
'pa_ver_toggle_txt',
|
1444 |
+
array(
|
1445 |
+
'label' => __( 'Title', 'premium-addons-for-elementor' ),
|
1446 |
+
'type' => Controls_Manager::TEXT,
|
1447 |
+
'default' => __( 'Premium Menu', 'premium-addons-for-elementor' ),
|
1448 |
+
'condition' => array(
|
1449 |
+
'pa_nav_menu_layout' => 'ver',
|
1450 |
+
'pa_ver_toggle_switcher' => 'yes',
|
1451 |
+
),
|
1452 |
+
)
|
1453 |
+
);
|
1454 |
+
|
1455 |
+
$this->add_control(
|
1456 |
+
'pa_ver_toggle_event',
|
1457 |
+
array(
|
1458 |
+
'label' => __( 'Open On', 'premium-addons-for-elementor' ),
|
1459 |
+
'type' => Controls_Manager::SELECT,
|
1460 |
+
'default' => 'click',
|
1461 |
+
'render_type' => 'template',
|
1462 |
+
'prefix_class' => 'premium-ver-',
|
1463 |
+
'options' => array(
|
1464 |
+
'hover' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1465 |
+
'click' => __( 'Click', 'premium-addons-for-elementor' ),
|
1466 |
+
'always' => __( 'Always', 'premium-addons-for-elementor' ),
|
1467 |
+
),
|
1468 |
+
'condition' => array(
|
1469 |
+
'pa_nav_menu_layout' => 'ver',
|
1470 |
+
'pa_ver_toggle_switcher' => 'yes',
|
1471 |
+
),
|
1472 |
+
)
|
1473 |
+
);
|
1474 |
+
|
1475 |
+
$this->add_control(
|
1476 |
+
'pa_ver_toggle_open',
|
1477 |
+
array(
|
1478 |
+
'label' => __( 'Opened By Default', 'premium-addons-for-elementor' ),
|
1479 |
+
'type' => Controls_Manager::SWITCHER,
|
1480 |
+
'render_type' => 'template',
|
1481 |
+
// 'prefix_class' => 'premium-ver-',
|
1482 |
+
'condition' => array(
|
1483 |
+
'pa_nav_menu_layout' => 'ver',
|
1484 |
+
'pa_ver_toggle_switcher' => 'yes',
|
1485 |
+
'pa_ver_toggle_event' => 'click',
|
1486 |
+
),
|
1487 |
+
)
|
1488 |
+
);
|
1489 |
+
|
1490 |
+
$this->add_control(
|
1491 |
+
'pa_ver_toggle_main_icon',
|
1492 |
+
array(
|
1493 |
+
'label' => __( 'Title Icon', 'premium-addons-for-elementor' ),
|
1494 |
+
'type' => Controls_Manager::ICONS,
|
1495 |
+
'label_block' => false,
|
1496 |
+
'skin' => 'inline',
|
1497 |
+
'default' => array(
|
1498 |
+
'value' => 'fas fa-bars',
|
1499 |
+
'library' => 'solid',
|
1500 |
+
),
|
1501 |
+
'condition' => array(
|
1502 |
+
'pa_nav_menu_layout' => 'ver',
|
1503 |
+
'pa_ver_toggle_switcher' => 'yes',
|
1504 |
+
),
|
1505 |
+
)
|
1506 |
+
);
|
1507 |
+
|
1508 |
+
$this->add_control(
|
1509 |
+
'pa_ver_toggle_toggle_icon',
|
1510 |
+
array(
|
1511 |
+
'label' => __( 'Toggle Icon', 'premium-addons-for-elementor' ),
|
1512 |
+
'type' => Controls_Manager::ICONS,
|
1513 |
+
'label_block' => false,
|
1514 |
+
'skin' => 'inline',
|
1515 |
+
'default' => array(
|
1516 |
+
'value' => 'fas fa-angle-down',
|
1517 |
+
'library' => 'solid',
|
1518 |
+
),
|
1519 |
+
'condition' => array(
|
1520 |
+
'pa_nav_menu_layout' => 'ver',
|
1521 |
+
'pa_ver_toggle_switcher' => 'yes',
|
1522 |
+
),
|
1523 |
+
)
|
1524 |
+
);
|
1525 |
+
|
1526 |
+
$this->add_control(
|
1527 |
+
'pa_ver_toggle_close_icon',
|
1528 |
+
array(
|
1529 |
+
'label' => __( 'Close Icon', 'premium-addons-for-elementor' ),
|
1530 |
+
'type' => Controls_Manager::ICONS,
|
1531 |
+
'label_block' => false,
|
1532 |
+
'skin' => 'inline',
|
1533 |
+
'default' => array(
|
1534 |
+
'value' => 'fas fa-angle-up',
|
1535 |
+
'library' => 'solid',
|
1536 |
+
),
|
1537 |
+
'condition' => array(
|
1538 |
+
'pa_nav_menu_layout' => 'ver',
|
1539 |
+
'pa_ver_toggle_switcher' => 'yes',
|
1540 |
+
'pa_ver_toggle_event!' => 'always',
|
1541 |
+
),
|
1542 |
+
)
|
1543 |
+
);
|
1544 |
+
|
1545 |
+
$this->add_control(
|
1546 |
+
'premium_ver_spacing',
|
1547 |
+
array(
|
1548 |
+
'label' => __( 'Title Spacing', 'premium-addons-for-elementor' ),
|
1549 |
+
'type' => Controls_Manager::SLIDER,
|
1550 |
+
'label_block' => true,
|
1551 |
+
'size_units' => array( 'px', 'em' ),
|
1552 |
+
'description' => __( 'Use this option to control the spacing between the title icon and the title.', 'premium-addons-for-elementor' ),
|
1553 |
+
'selectors' => array(
|
1554 |
+
'{{WRAPPER}} .premium-ver-toggler-txt' => 'text-indent: {{SIZE}}{{UNIT}};',
|
1555 |
+
),
|
1556 |
+
'condition' => array(
|
1557 |
+
'pa_nav_menu_layout' => 'ver',
|
1558 |
+
'pa_ver_toggle_switcher' => 'yes',
|
1559 |
+
),
|
1560 |
+
)
|
1561 |
+
);
|
1562 |
+
}
|
1563 |
+
|
1564 |
+
/**
|
1565 |
+
* Get dropdown content settings.
|
1566 |
+
*
|
1567 |
+
* @access private
|
1568 |
+
* @since 4.9.15
|
1569 |
+
*
|
1570 |
+
* @param string $align_left align-left val.
|
1571 |
+
* @param string $align_right align-right val.
|
1572 |
+
*/
|
1573 |
+
private function get_dropdown_content_settings( $align_left, $align_right ) {
|
1574 |
+
|
1575 |
+
$this->start_controls_section(
|
1576 |
+
'premium_dropdown_section',
|
1577 |
+
array(
|
1578 |
+
'label' => __( 'Expand/Slide Menu Settings', 'premium-addons-for-elementor' ),
|
1579 |
+
)
|
1580 |
+
);
|
1581 |
+
|
1582 |
+
$this->add_control(
|
1583 |
+
'btn_toggle_heading',
|
1584 |
+
array(
|
1585 |
+
'label' => __( 'Toggle Button', 'premium-addons-for-elementor' ),
|
1586 |
+
'type' => Controls_Manager::HEADING,
|
1587 |
+
)
|
1588 |
+
);
|
1589 |
+
|
1590 |
+
$this->add_control(
|
1591 |
+
'pa_mobile_toggle_text',
|
1592 |
+
array(
|
1593 |
+
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
1594 |
+
'type' => Controls_Manager::TEXT,
|
1595 |
+
'default' => __( 'Menu', 'premium-addons-for-elementor' ),
|
1596 |
+
)
|
1597 |
+
);
|
1598 |
+
|
1599 |
+
$this->add_control(
|
1600 |
+
'pa_mobile_toggle_close',
|
1601 |
+
array(
|
1602 |
+
'label' => __( 'Close Text', 'premium-addons-for-elementor' ),
|
1603 |
+
'type' => Controls_Manager::TEXT,
|
1604 |
+
'default' => __( 'Close', 'premium-addons-for-elementor' ),
|
1605 |
+
)
|
1606 |
+
);
|
1607 |
+
|
1608 |
+
$this->add_control(
|
1609 |
+
'pa_mobile_toggle_icon',
|
1610 |
+
array(
|
1611 |
+
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
1612 |
+
'type' => Controls_Manager::ICONS,
|
1613 |
+
'label_block' => false,
|
1614 |
+
'skin' => 'inline',
|
1615 |
+
'default' => array(
|
1616 |
+
'value' => 'fas fa-bars',
|
1617 |
+
'library' => 'solid',
|
1618 |
+
),
|
1619 |
+
)
|
1620 |
+
);
|
1621 |
+
|
1622 |
+
$this->add_control(
|
1623 |
+
'pa_mobile_close_icon',
|
1624 |
+
array(
|
1625 |
+
'label' => __( 'Close Icon', 'premium-addons-for-elementor' ),
|
1626 |
+
'type' => Controls_Manager::ICONS,
|
1627 |
+
'label_block' => false,
|
1628 |
+
'skin' => 'inline',
|
1629 |
+
'default' => array(
|
1630 |
+
'value' => 'fas fa-times',
|
1631 |
+
'library' => 'solid',
|
1632 |
+
),
|
1633 |
+
)
|
1634 |
+
);
|
1635 |
+
|
1636 |
+
$this->add_responsive_control(
|
1637 |
+
'pa_mobile_toggle_pos',
|
1638 |
+
array(
|
1639 |
+
'label' => __( 'Toggle Button Position', 'premium-addons-for-elementor' ),
|
1640 |
+
'type' => Controls_Manager::CHOOSE,
|
1641 |
+
'options' => array(
|
1642 |
+
$align_left => array(
|
1643 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1644 |
+
'icon' => 'eicon-h-align-left',
|
1645 |
+
),
|
1646 |
+
'center' => array(
|
1647 |
+
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1648 |
+
'icon' => 'eicon-h-align-center',
|
1649 |
+
),
|
1650 |
+
$align_right => array(
|
1651 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1652 |
+
'icon' => 'eicon-h-align-right',
|
1653 |
+
),
|
1654 |
+
),
|
1655 |
+
'default' => 'center',
|
1656 |
+
'toggle' => false,
|
1657 |
+
'selectors' => array(
|
1658 |
+
'{{WRAPPER}} .premium-hamburger-toggle' => 'justify-content: {{VALUE}}',
|
1659 |
+
),
|
1660 |
+
)
|
1661 |
+
);
|
1662 |
+
|
1663 |
+
$this->add_control(
|
1664 |
+
'pa_mobile_menu_pos',
|
1665 |
+
array(
|
1666 |
+
'label' => __( 'Menu Position', 'premium-addons-for-elementor' ),
|
1667 |
+
'type' => Controls_Manager::CHOOSE,
|
1668 |
+
'separator' => 'before',
|
1669 |
+
'options' => array(
|
1670 |
+
'left' => array(
|
1671 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1672 |
+
'icon' => 'eicon-h-align-left',
|
1673 |
+
),
|
1674 |
+
'center' => array(
|
1675 |
+
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1676 |
+
'icon' => 'eicon-h-align-center',
|
1677 |
+
),
|
1678 |
+
'right' => array(
|
1679 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1680 |
+
'icon' => 'eicon-h-align-right',
|
1681 |
+
),
|
1682 |
+
),
|
1683 |
+
'default' => 'right',
|
1684 |
+
'toggle' => false,
|
1685 |
+
'selectors' => array(
|
1686 |
+
'{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu-container, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu-container' => 'justify-content: {{VALUE}}',
|
1687 |
+
),
|
1688 |
+
'conditions' => array(
|
1689 |
+
'relation' => 'or',
|
1690 |
+
'terms' => array(
|
1691 |
+
array(
|
1692 |
+
'name' => 'pa_nav_menu_layout',
|
1693 |
+
'value' => 'dropdown',
|
1694 |
+
),
|
1695 |
+
array(
|
1696 |
+
'relation' => 'and',
|
1697 |
+
'terms' => array(
|
1698 |
+
array(
|
1699 |
+
'name' => 'pa_mobile_menu_layout',
|
1700 |
+
'value' => 'dropdown',
|
1701 |
+
),
|
1702 |
+
array(
|
1703 |
+
'name' => 'pa_nav_menu_layout',
|
1704 |
+
'operator' => 'in',
|
1705 |
+
'value' => array( 'hor', 'ver' ),
|
1706 |
+
),
|
1707 |
+
),
|
1708 |
+
),
|
1709 |
+
),
|
1710 |
+
),
|
1711 |
+
)
|
1712 |
+
);
|
1713 |
+
|
1714 |
+
$this->add_control(
|
1715 |
+
'pa_mobile_menu_align',
|
1716 |
+
array(
|
1717 |
+
'label' => __( 'Menu Alignment', 'premium-addons-for-elementor' ),
|
1718 |
+
'type' => Controls_Manager::CHOOSE,
|
1719 |
+
'options' => array(
|
1720 |
+
$align_left => array(
|
1721 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
1722 |
+
'icon' => 'eicon-text-align-left',
|
1723 |
+
),
|
1724 |
+
'center' => array(
|
1725 |
+
'title' => __( 'Center', 'premium-addons-for-elementor' ),
|
1726 |
+
'icon' => 'eicon-text-align-center',
|
1727 |
+
),
|
1728 |
+
$align_right => array(
|
1729 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
1730 |
+
'icon' => 'eicon-text-align-right',
|
1731 |
+
),
|
1732 |
+
),
|
1733 |
+
'default' => 'flex-start',
|
1734 |
+
'toggle' => false,
|
1735 |
+
'selectors' => array(
|
1736 |
+
'{{WRAPPER}}.premium-hamburger-menu .premium-main-mobile-menu > .premium-nav-menu-item > .premium-menu-link, {{WRAPPER}}.premium-nav-dropdown .premium-main-mobile-menu > .premium-nav-menu-item > .premium-menu-link, {{WRAPPER}}.premium-nav-slide .premium-main-mobile-menu > .premium-nav-menu-item > .premium-menu-link' => 'justify-content: {{VALUE}}',
|
1737 |
+
),
|
1738 |
+
)
|
1739 |
+
);
|
1740 |
+
|
1741 |
+
$transform_sign = is_rtl() ? '' : '-';
|
1742 |
+
|
1743 |
+
$this->add_responsive_control(
|
1744 |
+
'pa_ham_menu_width',
|
1745 |
+
array(
|
1746 |
+
'label' => __( 'Toggle Menu Width', 'premium-addons-for-elementor' ),
|
1747 |
+
'type' => Controls_Manager::SLIDER,
|
1748 |
+
'separator' => 'before',
|
1749 |
+
'label_block' => true,
|
1750 |
+
'size_units' => array( 'px', 'vw' ),
|
1751 |
+
'range' => array(
|
1752 |
+
'px' => array(
|
1753 |
+
'min' => 0,
|
1754 |
+
'max' => 1000,
|
1755 |
+
),
|
1756 |
+
),
|
1757 |
+
'selectors' => array(
|
1758 |
+
'{{WRAPPER}}.premium-ham-dropdown .premium-main-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-main-mobile-menu' => 'width: {{SIZE}}{{UNIT}};',
|
1759 |
+
'{{WRAPPER}}.premium-ham-slide .premium-mobile-menu-outer-container, {{WRAPPER}}.premium-nav-slide .premium-mobile-menu-outer-container' => 'width: {{SIZE}}{{UNIT}}; transform:translateX(' . $transform_sign . '{{SIZE}}{{UNIT}} );',
|
1760 |
+
),
|
1761 |
+
'condition' => array(
|
1762 |
+
'pa_toggle_full!' => 'yes',
|
1763 |
+
),
|
1764 |
+
)
|
1765 |
+
);
|
1766 |
+
|
1767 |
+
$this->add_control(
|
1768 |
+
'pa_toggle_full',
|
1769 |
+
array(
|
1770 |
+
'label' => __( 'Full Width', 'premium-addons-for-elementor' ),
|
1771 |
+
'type' => Controls_Manager::SWITCHER,
|
1772 |
+
'render_type' => 'template',
|
1773 |
+
'conditions' => array(
|
1774 |
+
'relation' => 'or',
|
1775 |
+
'terms' => array(
|
1776 |
+
array(
|
1777 |
+
'name' => 'pa_nav_menu_layout',
|
1778 |
+
'value' => 'dropdown',
|
1779 |
+
),
|
1780 |
+
array(
|
1781 |
+
'relation' => 'and',
|
1782 |
+
'terms' => array(
|
1783 |
+
array(
|
1784 |
+
'name' => 'pa_mobile_menu_layout',
|
1785 |
+
'value' => 'dropdown',
|
1786 |
+
),
|
1787 |
+
array(
|
1788 |
+
'name' => 'pa_nav_menu_layout',
|
1789 |
+
'operator' => 'in',
|
1790 |
+
'value' => array( 'hor', 'ver' ),
|
1791 |
+
),
|
1792 |
+
),
|
1793 |
+
),
|
1794 |
+
),
|
1795 |
+
),
|
1796 |
+
)
|
1797 |
+
);
|
1798 |
+
|
1799 |
+
$this->add_control(
|
1800 |
+
'pa_mobile_hide_icon',
|
1801 |
+
array(
|
1802 |
+
'label' => __( 'Hide Items Icon', 'premium-addons-for-elementor' ),
|
1803 |
+
'type' => Controls_Manager::SWITCHER,
|
1804 |
+
'prefix_class' => 'premium-hidden-icon-',
|
1805 |
+
)
|
1806 |
+
);
|
1807 |
+
|
1808 |
+
$this->add_control(
|
1809 |
+
'pa_mobile_hide_badge',
|
1810 |
+
array(
|
1811 |
+
'label' => __( 'Hide Items Badge', 'premium-addons-for-elementor' ),
|
1812 |
+
'type' => Controls_Manager::SWITCHER,
|
1813 |
+
'prefix_class' => 'premium-hidden-badge-',
|
1814 |
+
)
|
1815 |
+
);
|
1816 |
+
|
1817 |
+
$this->add_control(
|
1818 |
+
'pa_disable_page_scroll',
|
1819 |
+
array(
|
1820 |
+
'label' => __( 'Disable Page Scroll', 'premium-addons-for-elementor' ),
|
1821 |
+
'type' => Controls_Manager::SWITCHER,
|
1822 |
+
'prefix_class' => 'premium-disable-scroll-',
|
1823 |
+
'description' => __( 'Enable this option to disable page scroll when the slide menu is opened', 'premium-addons-for-elementor' ),
|
1824 |
+
'render_type' => 'template',
|
1825 |
+
'conditions' => array(
|
1826 |
+
'relation' => 'or',
|
1827 |
+
'terms' => array(
|
1828 |
+
array(
|
1829 |
+
'name' => 'pa_nav_menu_layout',
|
1830 |
+
'operator' => '===',
|
1831 |
+
'value' => 'slide',
|
1832 |
+
),
|
1833 |
+
array(
|
1834 |
+
'name' => 'pa_mobile_menu_layout',
|
1835 |
+
'operator' => '===',
|
1836 |
+
'value' => 'slide',
|
1837 |
+
),
|
1838 |
+
),
|
1839 |
+
),
|
1840 |
+
)
|
1841 |
+
);
|
1842 |
+
|
1843 |
+
$this->end_controls_section();
|
1844 |
+
}
|
1845 |
+
|
1846 |
+
/**
|
1847 |
+
* Get Vertical toggler style.
|
1848 |
+
*
|
1849 |
+
* @access private
|
1850 |
+
* @since 4.9.15
|
1851 |
+
*/
|
1852 |
+
private function get_ver_toggler_style() {
|
1853 |
+
|
1854 |
+
$this->start_controls_section(
|
1855 |
+
'pa_ver_toggler_style_section',
|
1856 |
+
array(
|
1857 |
+
'label' => __( 'Collapsed Menu Style', 'premium-addons-for-elementor' ),
|
1858 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
1859 |
+
'condition' => array(
|
1860 |
+
'pa_ver_toggle_switcher' => 'yes',
|
1861 |
+
'pa_nav_menu_layout' => 'ver',
|
1862 |
+
),
|
1863 |
+
)
|
1864 |
+
);
|
1865 |
+
|
1866 |
+
$this->add_control(
|
1867 |
+
'pa_ver_title_heading',
|
1868 |
+
array(
|
1869 |
+
'label' => __( 'Title', 'premium-addons-for-elementor' ),
|
1870 |
+
'type' => Controls_Manager::HEADING,
|
1871 |
+
)
|
1872 |
+
);
|
1873 |
+
|
1874 |
+
$this->add_group_control(
|
1875 |
+
Group_Control_Typography::get_type(),
|
1876 |
+
array(
|
1877 |
+
'name' => 'pa_ver_title_typo',
|
1878 |
+
'selector' => '{{WRAPPER}} .premium-ver-toggler-txt',
|
1879 |
+
)
|
1880 |
+
);
|
1881 |
+
|
1882 |
+
$this->add_control(
|
1883 |
+
'pa_ver_title_icon_size',
|
1884 |
+
array(
|
1885 |
+
'label' => __( 'Icon Size', 'premium-addons-for-elementor' ),
|
1886 |
+
'type' => Controls_Manager::SLIDER,
|
1887 |
+
'size_units' => array( 'px' ),
|
1888 |
+
'selectors' => array(
|
1889 |
+
'{{WRAPPER}} .premium-ver-title-icon i' => 'font-size: {{SIZE}}{{UNIT}};',
|
1890 |
+
'{{WRAPPER}} .premium-ver-title-icon svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
|
1891 |
+
),
|
1892 |
+
'condition' => array(
|
1893 |
+
'pa_ver_toggle_main_icon[value]!' => '',
|
1894 |
+
),
|
1895 |
+
)
|
1896 |
+
);
|
1897 |
+
|
1898 |
+
$this->start_controls_tabs( 'pa_ver_title_tabs' );
|
1899 |
+
|
1900 |
+
$this->start_controls_tab(
|
1901 |
+
'pa_ver_title_tab_normal',
|
1902 |
+
array(
|
1903 |
+
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
1904 |
+
)
|
1905 |
+
);
|
1906 |
+
|
1907 |
+
$this->add_control(
|
1908 |
+
'pa_ver_title_color',
|
1909 |
+
array(
|
1910 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1911 |
+
'type' => Controls_Manager::COLOR,
|
1912 |
+
'selectors' => array(
|
1913 |
+
'{{WRAPPER}} .premium-ver-toggler-txt' => 'color: {{VALUE}};',
|
1914 |
+
),
|
1915 |
+
)
|
1916 |
+
);
|
1917 |
+
|
1918 |
+
$this->add_control(
|
1919 |
+
'pa_ver_title_icon_color',
|
1920 |
+
array(
|
1921 |
+
'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
|
1922 |
+
'type' => Controls_Manager::COLOR,
|
1923 |
+
'selectors' => array(
|
1924 |
+
'{{WRAPPER}} .premium-ver-title-icon i' => 'color: {{VALUE}};',
|
1925 |
+
'{{WRAPPER}} .premium-ver-title-icon svg, {{WRAPPER}} .premium-ver-title-icon svg path' => 'fill: {{VALUE}};',
|
1926 |
+
),
|
1927 |
+
'condition' => array(
|
1928 |
+
'pa_ver_toggle_main_icon[value]!' => '',
|
1929 |
+
),
|
1930 |
+
)
|
1931 |
+
);
|
1932 |
+
|
1933 |
+
$this->end_controls_tab();
|
1934 |
+
|
1935 |
+
$this->start_controls_tab(
|
1936 |
+
'pa_ver_title_tab_hov',
|
1937 |
+
array(
|
1938 |
+
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
1939 |
+
)
|
1940 |
+
);
|
1941 |
+
|
1942 |
+
$this->add_control(
|
1943 |
+
'pa_ver_title_color_hov',
|
1944 |
+
array(
|
1945 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
1946 |
+
'type' => Controls_Manager::COLOR,
|
1947 |
+
'selectors' => array(
|
1948 |
+
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-toggler-txt' => 'color: {{VALUE}};',
|
1949 |
+
),
|
1950 |
+
)
|
1951 |
+
);
|
1952 |
+
|
1953 |
+
$this->add_control(
|
1954 |
+
'pa_ver_title_icon_color_hov',
|
1955 |
+
array(
|
1956 |
+
'label' => __( 'Icon Color', 'premium-addons-for-elementor' ),
|
1957 |
+
'type' => Controls_Manager::COLOR,
|
1958 |
+
'selectors' => array(
|
1959 |
+
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-title-icon i' => 'color: {{VALUE}};',
|
1960 |
+
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-title-icon svg, {{WRAPPER}} .premium-ver-toggler:hover .premium-ver-title-icon svg path' => 'fill: {{VALUE}};',
|
1961 |
+
),
|
1962 |
+
'condition' => array(
|
1963 |
+
'pa_ver_toggle_main_icon[value]!' => '',
|
1964 |
+
),
|
1965 |
+
)
|
1966 |
+
);
|
1967 |
+
|
1968 |
+
$this->end_controls_tab();
|
1969 |
+
|
1970 |
+
$this->end_controls_tabs();
|
1971 |
+
|
1972 |
+
$this->add_control(
|
1973 |
+
'pa_ver_toggle_heading',
|
1974 |
+
array(
|
1975 |
+
'label' => __( 'Toggle Icon', 'premium-addons-for-elementor' ),
|
1976 |
+
'type' => Controls_Manager::HEADING,
|
1977 |
+
'separator' => 'before',
|
1978 |
+
'conditions' => array(
|
1979 |
+
'relation' => 'or',
|
1980 |
+
'terms' => array(
|
1981 |
+
array(
|
1982 |
+
'name' => 'pa_ver_toggle_toggle_icon[value]',
|
1983 |
+
'operator' => '!==',
|
1984 |
+
'value' => '',
|
1985 |
+
),
|
1986 |
+
array(
|
1987 |
+
'name' => 'pa_ver_toggle_close_icon[value]',
|
1988 |
+
'operator' => '!==',
|
1989 |
+
'value' => '',
|
1990 |
+
),
|
1991 |
+
),
|
1992 |
+
),
|
1993 |
+
)
|
1994 |
+
);
|
1995 |
+
|
1996 |
+
$this->add_control(
|
1997 |
+
'pa_ver_toggle_icon_size',
|
1998 |
+
array(
|
1999 |
+
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
2000 |
+
'type' => Controls_Manager::SLIDER,
|
2001 |
+
'size_units' => array( 'px' ),
|
2002 |
+
'selectors' => array(
|
2003 |
+
'{{WRAPPER}} .premium-ver-toggler-btn i' => 'font-size: {{SIZE}}{{UNIT}};',
|
2004 |
+
'{{WRAPPER}} .premium-ver-toggler-btn svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}}',
|
2005 |
+
),
|
2006 |
+
'conditions' => array(
|
2007 |
+
'relation' => 'or',
|
2008 |
+
'terms' => array(
|
2009 |
+
array(
|
2010 |
+
'name' => 'pa_ver_toggle_toggle_icon[value]',
|
2011 |
+
'operator' => '!==',
|
2012 |
+
'value' => '',
|
2013 |
+
),
|
2014 |
+
array(
|
2015 |
+
'name' => 'pa_ver_toggle_close_icon[value]',
|
2016 |
+
'operator' => '!==',
|
2017 |
+
'value' => '',
|
2018 |
+
),
|
2019 |
+
),
|
2020 |
+
),
|
2021 |
+
)
|
2022 |
+
);
|
2023 |
+
|
2024 |
+
$this->start_controls_tabs( 'pa_ver_toggle_icon_tabs' );
|
2025 |
+
|
2026 |
+
$this->start_controls_tab(
|
2027 |
+
'pa_ver_toggle_tab_normal',
|
2028 |
+
array(
|
2029 |
+
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
2030 |
+
'conditions' => array(
|
2031 |
+
'relation' => 'or',
|
2032 |
+
'terms' => array(
|
2033 |
+
array(
|
2034 |
+
'name' => 'pa_ver_toggle_toggle_icon[value]',
|
2035 |
+
'operator' => '!==',
|
2036 |
+
'value' => '',
|
2037 |
+
),
|
2038 |
+
array(
|
2039 |
+
'name' => 'pa_ver_toggle_close_icon[value]',
|
2040 |
+
'operator' => '!==',
|
2041 |
+
'value' => '',
|
2042 |
+
),
|
2043 |
+
),
|
2044 |
+
),
|
2045 |
+
)
|
2046 |
+
);
|
2047 |
+
|
2048 |
+
$this->add_control(
|
2049 |
+
'pa_ver_toggle_icon_color',
|
2050 |
+
array(
|
2051 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2052 |
+
'type' => Controls_Manager::COLOR,
|
2053 |
+
'selectors' => array(
|
2054 |
+
'{{WRAPPER}} .premium-ver-toggler-btn i' => 'color: {{VALUE}};',
|
2055 |
+
'{{WRAPPER}} .premium-ver-toggler-btn svg, {{WRAPPER}} .premium-ver-toggler-btn svg path' => 'fill: {{VALUE}};',
|
2056 |
+
),
|
2057 |
+
)
|
2058 |
+
);
|
2059 |
+
|
2060 |
+
$this->end_controls_tab();
|
2061 |
+
|
2062 |
+
$this->start_controls_tab(
|
2063 |
+
'pa_ver_toggle_tab_hov',
|
2064 |
+
array(
|
2065 |
+
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
2066 |
+
'conditions' => array(
|
2067 |
+
'relation' => 'or',
|
2068 |
+
'terms' => array(
|
2069 |
+
array(
|
2070 |
+
'name' => 'pa_ver_toggle_toggle_icon[value]',
|
2071 |
+
'operator' => '!==',
|
2072 |
+
'value' => '',
|
2073 |
+
),
|
2074 |
+
array(
|
2075 |
+
'name' => 'pa_ver_toggle_close_icon[value]',
|
2076 |
+
'operator' => '!==',
|
2077 |
+
'value' => '',
|
2078 |
+
),
|
2079 |
+
),
|
2080 |
+
),
|
2081 |
+
)
|
2082 |
+
);
|
2083 |
+
|
2084 |
+
$this->add_control(
|
2085 |
+
'pa_ver_toggle_icon_color_hov',
|
2086 |
+
array(
|
2087 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2088 |
+
'type' => Controls_Manager::COLOR,
|
2089 |
+
'selectors' => array(
|
2090 |
+
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-toggler-btn i' => 'color: {{VALUE}};',
|
2091 |
+
'{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-toggler-btn svg,
|
2092 |
+
{{WRAPPER}} .premium-ver-toggler:hover .premium-ver-toggler-btn svg path' => 'fill: {{VALUE}};',
|
2093 |
+
),
|
2094 |
+
)
|
2095 |
+
);
|
2096 |
+
|
2097 |
+
$this->end_controls_tab();
|
2098 |
+
|
2099 |
+
$this->end_controls_tabs();
|
2100 |
+
|
2101 |
+
$this->add_control(
|
2102 |
+
'pa_ver_container_heading',
|
2103 |
+
array(
|
2104 |
+
'label' => __( 'Container', 'premium-addons-for-elementor' ),
|
2105 |
+
'type' => Controls_Manager::HEADING,
|
2106 |
+
'separator' => 'before',
|
2107 |
+
)
|
2108 |
+
);
|
2109 |
+
|
2110 |
+
$this->start_controls_tabs( 'pa_ver_toggler_tabs' );
|
2111 |
+
|
2112 |
+
$this->start_controls_tab(
|
2113 |
+
'pa_ver_toggler_tab_normal',
|
2114 |
+
array(
|
2115 |
+
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
2116 |
+
)
|
2117 |
+
);
|
2118 |
+
|
2119 |
+
$this->add_group_control(
|
2120 |
+
Group_Control_Background::get_type(),
|
2121 |
+
array(
|
2122 |
+
'name' => 'pa_ver_toggler_bg',
|
2123 |
+
'types' => array( 'classic', 'gradient' ),
|
2124 |
+
'selector' => '{{WRAPPER}} .premium-ver-toggler',
|
2125 |
+
)
|
2126 |
+
);
|
2127 |
+
|
2128 |
+
$this->add_group_control(
|
2129 |
+
Group_Control_Box_Shadow::get_type(),
|
2130 |
+
array(
|
2131 |
+
'name' => 'pa_ver_toggler_shadow',
|
2132 |
+
'selector' => '{{WRAPPER}} .premium-ver-toggler',
|
2133 |
+
)
|
2134 |
+
);
|
2135 |
+
|
2136 |
+
$this->end_controls_tab();
|
2137 |
+
|
2138 |
+
$this->start_controls_tab(
|
2139 |
+
'pa_ver_toggler_tab_hov',
|
2140 |
+
array(
|
2141 |
+
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
2142 |
+
)
|
2143 |
+
);
|
2144 |
+
|
2145 |
+
$this->add_group_control(
|
2146 |
+
Group_Control_Background::get_type(),
|
2147 |
+
array(
|
2148 |
+
'name' => 'pa_ver_toggler_bg_hov',
|
2149 |
+
'types' => array( 'classic', 'gradient' ),
|
2150 |
+
'selector' => '{{WRAPPER}} .premium-ver-toggler:hover',
|
2151 |
+
)
|
2152 |
+
);
|
2153 |
+
|
2154 |
+
$this->add_group_control(
|
2155 |
+
Group_Control_Box_Shadow::get_type(),
|
2156 |
+
array(
|
2157 |
+
'name' => 'pa_ver_toggler_shadow_hov',
|
2158 |
+
'selector' => '{{WRAPPER}} .premium-ver-toggler:hover',
|
2159 |
+
)
|
2160 |
+
);
|
2161 |
+
|
2162 |
+
$this->end_controls_tab();
|
2163 |
+
|
2164 |
+
$this->end_controls_tabs();
|
2165 |
+
|
2166 |
+
$this->add_group_control(
|
2167 |
+
Group_Control_Border::get_type(),
|
2168 |
+
array(
|
2169 |
+
'name' => 'pa_ver_toggler_border',
|
2170 |
+
'selector' => '{{WRAPPER}} .premium-ver-toggler',
|
2171 |
+
'separator' => 'before',
|
2172 |
+
)
|
2173 |
+
);
|
2174 |
+
|
2175 |
+
$this->add_control(
|
2176 |
+
'pa_ver_toggler_rad',
|
2177 |
+
array(
|
2178 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2179 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2180 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2181 |
+
'selectors' => array(
|
2182 |
+
'{{WRAPPER}} .premium-ver-toggler' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2183 |
+
),
|
2184 |
+
)
|
2185 |
+
);
|
2186 |
+
|
2187 |
+
$this->add_responsive_control(
|
2188 |
+
'pa_ver_toggler_padding',
|
2189 |
+
array(
|
2190 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2191 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2192 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2193 |
+
'selectors' => array(
|
2194 |
+
'{{WRAPPER}} .premium-ver-toggler' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2195 |
+
),
|
2196 |
+
)
|
2197 |
+
);
|
2198 |
+
|
2199 |
+
$this->end_controls_section();
|
2200 |
+
}
|
2201 |
+
|
2202 |
+
/**
|
2203 |
+
* Get menu container style.
|
2204 |
+
*
|
2205 |
+
* @access private
|
2206 |
+
* @since 4.9.3
|
2207 |
+
*/
|
2208 |
+
private function get_menu_container_style() {
|
2209 |
+
|
2210 |
+
$this->start_controls_section(
|
2211 |
+
'premium_nav_style_section',
|
2212 |
+
array(
|
2213 |
+
'label' => __( 'Desktop Menu Style', 'premium-addons-for-elementor' ),
|
2214 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
2215 |
+
'condition' => array(
|
2216 |
+
'pa_nav_menu_layout' => array( 'hor', 'ver' ),
|
2217 |
+
),
|
2218 |
+
)
|
2219 |
+
);
|
2220 |
+
|
2221 |
+
$this->add_responsive_control(
|
2222 |
+
'pa_nav_menu_height',
|
2223 |
+
array(
|
2224 |
+
'label' => __( 'Height', 'premium-addons-for-elementor' ),
|
2225 |
+
'type' => Controls_Manager::SLIDER,
|
2226 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2227 |
+
'label_block' => true,
|
2228 |
+
'selectors' => array(
|
2229 |
+
'{{WRAPPER}}.premium-nav-hor > .elementor-widget-container > .premium-nav-widget-container > .premium-ver-inner-container > .premium-nav-menu-container' => 'height: {{SIZE}}{{UNIT}};',
|
2230 |
+
),
|
2231 |
+
'condition' => array(
|
2232 |
+
'pa_nav_menu_layout' => 'hor',
|
2233 |
+
),
|
2234 |
+
)
|
2235 |
+
);
|
2236 |
+
|
2237 |
+
$this->add_responsive_control(
|
2238 |
+
'pa_nav_menu_width',
|
2239 |
+
array(
|
2240 |
+
'label' => __( 'Width', 'premium-addons-for-elementor' ),
|
2241 |
+
'type' => Controls_Manager::SLIDER,
|
2242 |
+
'size_units' => array( 'px', '%' ),
|
2243 |
+
'range' => array(
|
2244 |
+
'px' => array(
|
2245 |
+
'min' => 0,
|
2246 |
+
'max' => 1000,
|
2247 |
+
),
|
2248 |
+
),
|
2249 |
+
'label_block' => true,
|
2250 |
+
'selectors' => array(
|
2251 |
+
// '{{WRAPPER}}.premium-nav-ver .premium-nav-menu-container, {{WRAPPER}}.premium-nav-ver .premium-ver-toggler' => 'width: {{SIZE}}{{UNIT}};',
|
2252 |
+
'{{WRAPPER}}.premium-nav-ver .premium-ver-inner-container' => 'width: {{SIZE}}{{UNIT}};',
|
2253 |
+
),
|
2254 |
+
'condition' => array(
|
2255 |
+
'pa_nav_menu_layout' => 'ver',
|
2256 |
+
),
|
2257 |
+
)
|
2258 |
+
);
|
2259 |
+
|
2260 |
+
$this->add_group_control(
|
2261 |
+
Group_Control_Box_Shadow::get_type(),
|
2262 |
+
array(
|
2263 |
+
'name' => 'pa_nav_menu_shadow',
|
2264 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container',
|
2265 |
+
)
|
2266 |
+
);
|
2267 |
+
|
2268 |
+
$this->add_group_control(
|
2269 |
+
Group_Control_Background::get_type(),
|
2270 |
+
array(
|
2271 |
+
'name' => 'pa_nav_menu_background',
|
2272 |
+
'types' => array( 'classic', 'gradient' ),
|
2273 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container',
|
2274 |
+
)
|
2275 |
+
);
|
2276 |
+
|
2277 |
+
$this->add_group_control(
|
2278 |
+
Group_Control_Border::get_type(),
|
2279 |
+
array(
|
2280 |
+
'name' => 'pa_nav_menu_border',
|
2281 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container',
|
2282 |
+
)
|
2283 |
+
);
|
2284 |
+
|
2285 |
+
$this->add_control(
|
2286 |
+
'pa_nav_menu_rad',
|
2287 |
+
array(
|
2288 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2289 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2290 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2291 |
+
'selectors' => array(
|
2292 |
+
'{{WRAPPER}} .premium-nav-menu-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2293 |
+
),
|
2294 |
+
)
|
2295 |
+
);
|
2296 |
+
|
2297 |
+
$this->add_responsive_control(
|
2298 |
+
'pa_nav_menu_padding',
|
2299 |
+
array(
|
2300 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2301 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2302 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2303 |
+
'selectors' => array(
|
2304 |
+
'{{WRAPPER}} .premium-nav-menu-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2305 |
+
),
|
2306 |
+
)
|
2307 |
+
);
|
2308 |
+
|
2309 |
+
$this->end_controls_section();
|
2310 |
+
}
|
2311 |
+
|
2312 |
+
/**
|
2313 |
+
* Get toggle menu container style.
|
2314 |
+
*
|
2315 |
+
* @access private
|
2316 |
+
* @since 4.9.3
|
2317 |
+
*/
|
2318 |
+
private function get_toggle_menu_sytle() {
|
2319 |
+
|
2320 |
+
$this->start_controls_section(
|
2321 |
+
'premium_toggle_mene_style_section',
|
2322 |
+
array(
|
2323 |
+
'label' => __( 'Expand/Slide Menu Style', 'premium-addons-for-elementor' ),
|
2324 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
2325 |
+
)
|
2326 |
+
);
|
2327 |
+
|
2328 |
+
$this->add_control(
|
2329 |
+
'pa_ham_toggle_style',
|
2330 |
+
array(
|
2331 |
+
'label' => __( 'Toggle Button', 'premium-addons-for-elementor' ),
|
2332 |
+
'type' => Controls_Manager::HEADING,
|
2333 |
+
)
|
2334 |
+
);
|
2335 |
+
|
2336 |
+
$this->start_controls_tabs( 'pa_ham_toggle_style_tabs' );
|
2337 |
+
|
2338 |
+
$this->start_controls_tab(
|
2339 |
+
'pa_ham_toggle_icon_tab',
|
2340 |
+
array(
|
2341 |
+
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
2342 |
+
)
|
2343 |
+
);
|
2344 |
+
|
2345 |
+
$this->add_responsive_control(
|
2346 |
+
'pa_ham_toggle_icon_size',
|
2347 |
+
array(
|
2348 |
+
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
2349 |
+
'type' => Controls_Manager::SLIDER,
|
2350 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2351 |
+
'label_block' => true,
|
2352 |
+
'selectors' => array(
|
2353 |
+
'{{WRAPPER}} .premium-hamburger-toggle i' => 'font-size: {{SIZE}}{{UNIT}};',
|
2354 |
+
'{{WRAPPER}} .premium-hamburger-toggle svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
2355 |
+
),
|
2356 |
+
)
|
2357 |
+
);
|
2358 |
+
|
2359 |
+
$this->add_control(
|
2360 |
+
'pa_ham_toggle_color',
|
2361 |
+
array(
|
2362 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2363 |
+
'type' => Controls_Manager::COLOR,
|
2364 |
+
'selectors' => array(
|
2365 |
+
'{{WRAPPER}} .premium-hamburger-toggle i' => 'color: {{VALUE}};',
|
2366 |
+
'{{WRAPPER}} .premium-hamburger-toggle svg, {{WRAPPER}} .premium-hamburger-toggle svg path' => 'fill: {{VALUE}};',
|
2367 |
+
),
|
2368 |
+
)
|
2369 |
+
);
|
2370 |
+
|
2371 |
+
$this->add_control(
|
2372 |
+
'pa_ham_toggle_color_hover',
|
2373 |
+
array(
|
2374 |
+
'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
|
2375 |
+
'type' => Controls_Manager::COLOR,
|
2376 |
+
'selectors' => array(
|
2377 |
+
'{{WRAPPER}} .premium-hamburger-toggle:hover i' => 'color: {{VALUE}};',
|
2378 |
+
'{{WRAPPER}} .premium-hamburger-toggle:hover svg, {{WRAPPER}} .premium-hamburger-toggle:hover svg path' => 'fill: {{VALUE}};',
|
2379 |
+
),
|
2380 |
+
)
|
2381 |
+
);
|
2382 |
+
|
2383 |
+
$this->end_controls_tab();
|
2384 |
+
|
2385 |
+
$this->start_controls_tab(
|
2386 |
+
'pa_ham_toggle_label_tab',
|
2387 |
+
array(
|
2388 |
+
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
2389 |
+
)
|
2390 |
+
);
|
2391 |
+
|
2392 |
+
$this->add_group_control(
|
2393 |
+
Group_Control_Typography::get_type(),
|
2394 |
+
array(
|
2395 |
+
'name' => 'pa_ham_toggle_txt_typo',
|
2396 |
+
'selector' => '{{WRAPPER}} .premium-hamburger-toggle .premium-toggle-text, {{WRAPPER}}.premium-ham-dropdown .premium-hamburger-toggle .premium-toggle-close',
|
2397 |
+
)
|
2398 |
+
);
|
2399 |
+
|
2400 |
+
$this->add_control(
|
2401 |
+
'pa_ham_toggle_txt_color',
|
2402 |
+
array(
|
2403 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2404 |
+
'type' => Controls_Manager::COLOR,
|
2405 |
+
'selectors' => array(
|
2406 |
+
'{{WRAPPER}} .premium-hamburger-toggle .premium-toggle-text, {{WRAPPER}}.premium-ham-dropdown .premium-hamburger-toggle .premium-toggle-close' => 'color: {{VALUE}};',
|
2407 |
+
),
|
2408 |
+
)
|
2409 |
+
);
|
2410 |
+
|
2411 |
+
$this->add_control(
|
2412 |
+
'pa_ham_toggle_txt_color_hover',
|
2413 |
+
array(
|
2414 |
+
'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
|
2415 |
+
'type' => Controls_Manager::COLOR,
|
2416 |
+
'selectors' => array(
|
2417 |
+
'{{WRAPPER}} .premium-hamburger-toggle:hover .premium-toggle-text, {{WRAPPER}}.premium-ham-dropdown .premium-hamburger-toggle:hover .premium-toggle-close' => 'color: {{VALUE}};',
|
2418 |
+
),
|
2419 |
+
)
|
2420 |
+
);
|
2421 |
+
|
2422 |
+
$this->add_responsive_control(
|
2423 |
+
'pa_ham_toggle_txt_margin',
|
2424 |
+
array(
|
2425 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2426 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2427 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2428 |
+
'selectors' => array(
|
2429 |
+
'{{WRAPPER}} .premium-hamburger-toggle .premium-toggle-text, {{WRAPPER}}.premium-ham-dropdown .premium-hamburger-toggle .premium-toggle-close' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2430 |
+
),
|
2431 |
+
)
|
2432 |
+
);
|
2433 |
+
|
2434 |
+
$this->end_controls_tab();
|
2435 |
+
|
2436 |
+
$this->end_controls_tabs();
|
2437 |
+
|
2438 |
+
$this->add_control(
|
2439 |
+
'pa_ham_toggle_bg',
|
2440 |
+
array(
|
2441 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
2442 |
+
'separator' => 'before',
|
2443 |
+
'type' => Controls_Manager::COLOR,
|
2444 |
+
'selectors' => array(
|
2445 |
+
'{{WRAPPER}} .premium-hamburger-toggle' => 'background-color: {{VALUE}};',
|
2446 |
+
),
|
2447 |
+
)
|
2448 |
+
);
|
2449 |
+
|
2450 |
+
$this->add_control(
|
2451 |
+
'pa_ham_toggle_bg_hover',
|
2452 |
+
array(
|
2453 |
+
'label' => __( 'Hover Background Color', 'premium-addons-for-elementor' ),
|
2454 |
+
'type' => Controls_Manager::COLOR,
|
2455 |
+
'selectors' => array(
|
2456 |
+
'{{WRAPPER}} .premium-hamburger-toggle:hover' => 'background-color: {{VALUE}};',
|
2457 |
+
),
|
2458 |
+
)
|
2459 |
+
);
|
2460 |
+
|
2461 |
+
$this->add_group_control(
|
2462 |
+
Group_Control_Box_Shadow::get_type(),
|
2463 |
+
array(
|
2464 |
+
'name' => 'pa_ham_toggle_shadow',
|
2465 |
+
'selector' => '{{WRAPPER}} .premium-hamburger-toggle',
|
2466 |
+
)
|
2467 |
+
);
|
2468 |
+
|
2469 |
+
$this->add_group_control(
|
2470 |
+
Group_Control_Border::get_type(),
|
2471 |
+
array(
|
2472 |
+
'name' => 'pa_ham_toggle_border',
|
2473 |
+
'selector' => '{{WRAPPER}} .premium-hamburger-toggle',
|
2474 |
+
)
|
2475 |
+
);
|
2476 |
+
|
2477 |
+
$this->add_control(
|
2478 |
+
'pa_ham_toggle_rad',
|
2479 |
+
array(
|
2480 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2481 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2482 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2483 |
+
'selectors' => array(
|
2484 |
+
'{{WRAPPER}} .premium-hamburger-toggle' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2485 |
+
),
|
2486 |
+
)
|
2487 |
+
);
|
2488 |
+
|
2489 |
+
$this->add_responsive_control(
|
2490 |
+
'pa_ham_toggle_padding',
|
2491 |
+
array(
|
2492 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2493 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2494 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2495 |
+
'selectors' => array(
|
2496 |
+
'{{WRAPPER}} .premium-hamburger-toggle' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2497 |
+
),
|
2498 |
+
)
|
2499 |
+
);
|
2500 |
+
|
2501 |
+
$this->add_responsive_control(
|
2502 |
+
'pa_ham_toggle_margin',
|
2503 |
+
array(
|
2504 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2505 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2506 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2507 |
+
'selectors' => array(
|
2508 |
+
'{{WRAPPER}} .premium-hamburger-toggle' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2509 |
+
),
|
2510 |
+
)
|
2511 |
+
);
|
2512 |
+
|
2513 |
+
$this->add_control(
|
2514 |
+
'pa_ham_menu_style',
|
2515 |
+
array(
|
2516 |
+
'label' => __( 'Toggle Menu', 'premium-addons-for-elementor' ),
|
2517 |
+
'type' => Controls_Manager::HEADING,
|
2518 |
+
'separator' => 'before',
|
2519 |
+
)
|
2520 |
+
);
|
2521 |
+
|
2522 |
+
$this->add_control(
|
2523 |
+
'pa_ham_menu_item_color',
|
2524 |
+
array(
|
2525 |
+
'label' => __( 'Menu Item Color', 'premium-addons-for-elementor' ),
|
2526 |
+
'type' => Controls_Manager::COLOR,
|
2527 |
+
'selectors' => array(
|
2528 |
+
'{{WRAPPER}} .premium-main-mobile-menu.premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'color: {{VALUE}};',
|
2529 |
+
),
|
2530 |
+
)
|
2531 |
+
);
|
2532 |
+
|
2533 |
+
$this->add_control(
|
2534 |
+
'pa_ham_menu_overlay',
|
2535 |
+
array(
|
2536 |
+
'label' => __( 'Overlay Color', 'premium-addons-for-elementor' ),
|
2537 |
+
'type' => Controls_Manager::COLOR,
|
2538 |
+
'selectors' => array(
|
2539 |
+
'{{WRAPPER}} .premium-nav-slide-overlay' => 'background: {{VALUE}};',
|
2540 |
+
),
|
2541 |
+
'conditions' => array(
|
2542 |
+
'relation' => 'or',
|
2543 |
+
'terms' => array(
|
2544 |
+
array(
|
2545 |
+
'name' => 'pa_nav_menu_layout',
|
2546 |
+
'value' => 'slide',
|
2547 |
+
),
|
2548 |
+
array(
|
2549 |
+
'relation' => 'and',
|
2550 |
+
'terms' => array(
|
2551 |
+
array(
|
2552 |
+
'name' => 'pa_mobile_menu_layout',
|
2553 |
+
'value' => 'slide',
|
2554 |
+
),
|
2555 |
+
array(
|
2556 |
+
'name' => 'pa_nav_menu_layout',
|
2557 |
+
'operator' => 'in',
|
2558 |
+
'value' => array( 'hor', 'ver' ),
|
2559 |
+
),
|
2560 |
+
),
|
2561 |
+
),
|
2562 |
+
),
|
2563 |
+
),
|
2564 |
+
)
|
2565 |
+
);
|
2566 |
+
|
2567 |
+
$this->add_group_control(
|
2568 |
+
Group_Control_Box_Shadow::get_type(),
|
2569 |
+
array(
|
2570 |
+
'name' => 'pa_ham_menu_shadow',
|
2571 |
+
'selector' => '{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu, {{WRAPPER}} .premium-mobile-menu-outer-container',
|
2572 |
+
)
|
2573 |
+
);
|
2574 |
+
|
2575 |
+
$this->add_group_control(
|
2576 |
+
Group_Control_Background::get_type(),
|
2577 |
+
array(
|
2578 |
+
'name' => 'pa_ham_menu_background',
|
2579 |
+
'types' => array( 'classic', 'gradient' ),
|
2580 |
+
'selector' => '{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu,
|
2581 |
+
{{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu,
|
2582 |
+
{{WRAPPER}} .premium-mobile-menu-outer-container,
|
2583 |
+
{{WRAPPER}} .premium-mobile-menu-container',
|
2584 |
+
|
2585 |
+
)
|
2586 |
+
);
|
2587 |
+
|
2588 |
+
$this->add_group_control(
|
2589 |
+
Group_Control_Border::get_type(),
|
2590 |
+
array(
|
2591 |
+
'name' => 'pa_ham_menu_border',
|
2592 |
+
'selector' => '{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu, {{WRAPPER}} .premium-mobile-menu-outer-container',
|
2593 |
+
)
|
2594 |
+
);
|
2595 |
+
|
2596 |
+
$this->add_control(
|
2597 |
+
'pa_ham_menu_rad',
|
2598 |
+
array(
|
2599 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2600 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2601 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2602 |
+
'selectors' => array(
|
2603 |
+
'{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2604 |
+
),
|
2605 |
+
'condition' => array(
|
2606 |
+
'pa_mobile_menu_layout' => 'dropdown',
|
2607 |
+
),
|
2608 |
+
)
|
2609 |
+
);
|
2610 |
+
|
2611 |
+
$this->add_responsive_control(
|
2612 |
+
'pa_ham_menu_padding',
|
2613 |
+
array(
|
2614 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2615 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2616 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2617 |
+
'selectors' => array(
|
2618 |
+
'{{WRAPPER}}.premium-ham-dropdown .premium-mobile-menu, {{WRAPPER}}.premium-nav-dropdown .premium-mobile-menu, {{WRAPPER}} .premium-mobile-menu-outer-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2619 |
+
),
|
2620 |
+
)
|
2621 |
+
);
|
2622 |
+
|
2623 |
+
$this->end_controls_section();
|
2624 |
+
|
2625 |
+
// Show close button style if desktop or mobile menu is set to slide.
|
2626 |
+
$close_btn_conditions = array(
|
2627 |
+
'relation' => 'or',
|
2628 |
+
'terms' => array(
|
2629 |
+
array(
|
2630 |
+
'name' => 'pa_nav_menu_layout',
|
2631 |
+
'value' => 'slide',
|
2632 |
+
),
|
2633 |
+
array(
|
2634 |
+
'name' => 'pa_mobile_menu_layout',
|
2635 |
+
'value' => 'slide',
|
2636 |
+
),
|
2637 |
+
),
|
2638 |
+
);
|
2639 |
+
|
2640 |
+
$this->start_controls_section(
|
2641 |
+
'ham_close_style_section',
|
2642 |
+
array(
|
2643 |
+
'label' => __( 'Close Button Style', 'premium-addons-for-elementor' ),
|
2644 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
2645 |
+
'conditions' => array_merge(
|
2646 |
+
$close_btn_conditions,
|
2647 |
+
array()
|
2648 |
+
),
|
2649 |
+
)
|
2650 |
+
);
|
2651 |
+
|
2652 |
+
$this->start_controls_tabs( 'pa_ham_close_style_tabs' );
|
2653 |
+
|
2654 |
+
$this->start_controls_tab(
|
2655 |
+
'pa_ham_close_icon_tab',
|
2656 |
+
array(
|
2657 |
+
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
2658 |
+
)
|
2659 |
+
);
|
2660 |
+
|
2661 |
+
$this->add_responsive_control(
|
2662 |
+
'pa_ham_close_size',
|
2663 |
+
array(
|
2664 |
+
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
2665 |
+
'type' => Controls_Manager::SLIDER,
|
2666 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2667 |
+
'label_block' => true,
|
2668 |
+
'selectors' => array(
|
2669 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close i' => 'font-size: {{SIZE}}{{UNIT}};',
|
2670 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close svg' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
2671 |
+
),
|
2672 |
+
)
|
2673 |
+
);
|
2674 |
+
|
2675 |
+
$this->add_control(
|
2676 |
+
'pa_ham_close_color',
|
2677 |
+
array(
|
2678 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2679 |
+
'type' => Controls_Manager::COLOR,
|
2680 |
+
'selectors' => array(
|
2681 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close i' => 'color: {{VALUE}};',
|
2682 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close svg, {{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close svg path' => 'fill: {{VALUE}};',
|
2683 |
+
),
|
2684 |
+
)
|
2685 |
+
);
|
2686 |
+
|
2687 |
+
$this->add_control(
|
2688 |
+
'pa_ham_close_color_hover',
|
2689 |
+
array(
|
2690 |
+
'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
|
2691 |
+
'type' => Controls_Manager::COLOR,
|
2692 |
+
'selectors' => array(
|
2693 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover i' => 'color: {{VALUE}};',
|
2694 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover svg, {{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover svg path' => 'fill: {{VALUE}};',
|
2695 |
+
),
|
2696 |
+
)
|
2697 |
+
);
|
2698 |
+
|
2699 |
+
$this->end_controls_tab();
|
2700 |
+
|
2701 |
+
$this->start_controls_tab(
|
2702 |
+
'pa_ham_close_txt_tab',
|
2703 |
+
array(
|
2704 |
+
'label' => __( 'Text', 'premium-addons-for-elementor' ),
|
2705 |
+
)
|
2706 |
+
);
|
2707 |
+
|
2708 |
+
$this->add_group_control(
|
2709 |
+
Group_Control_Typography::get_type(),
|
2710 |
+
array(
|
2711 |
+
'name' => 'pa_ham_close_txt_typo',
|
2712 |
+
'selector' => '{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close .premium-toggle-close',
|
2713 |
+
)
|
2714 |
+
);
|
2715 |
+
|
2716 |
+
$this->add_control(
|
2717 |
+
'pa_ham_close_txt_color',
|
2718 |
+
array(
|
2719 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2720 |
+
'type' => Controls_Manager::COLOR,
|
2721 |
+
'selectors' => array(
|
2722 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close .premium-toggle-close' => 'color: {{VALUE}};',
|
2723 |
+
),
|
2724 |
+
)
|
2725 |
+
);
|
2726 |
+
|
2727 |
+
$this->add_control(
|
2728 |
+
'pa_ham_close_txt_color_hover',
|
2729 |
+
array(
|
2730 |
+
'label' => __( 'Hover Color', 'premium-addons-for-elementor' ),
|
2731 |
+
'type' => Controls_Manager::COLOR,
|
2732 |
+
'selectors' => array(
|
2733 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover .premium-toggle-close' => 'color: {{VALUE}};',
|
2734 |
+
),
|
2735 |
+
)
|
2736 |
+
);
|
2737 |
+
|
2738 |
+
$this->add_responsive_control(
|
2739 |
+
'pa_ham_close_txt_margin',
|
2740 |
+
array(
|
2741 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2742 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2743 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2744 |
+
'selectors' => array(
|
2745 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close .premium-toggle-close' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2746 |
+
),
|
2747 |
+
)
|
2748 |
+
);
|
2749 |
+
|
2750 |
+
$this->end_controls_tab();
|
2751 |
+
|
2752 |
+
$this->end_controls_tabs();
|
2753 |
+
|
2754 |
+
$this->add_control(
|
2755 |
+
'pa_ham_close_bg',
|
2756 |
+
array(
|
2757 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
2758 |
+
'type' => Controls_Manager::COLOR,
|
2759 |
+
'separator' => 'before',
|
2760 |
+
'selectors' => array(
|
2761 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close' => 'background-color: {{VALUE}};',
|
2762 |
+
),
|
2763 |
+
)
|
2764 |
+
);
|
2765 |
+
|
2766 |
+
$this->add_control(
|
2767 |
+
'pa_ham_close_bg_hover',
|
2768 |
+
array(
|
2769 |
+
'label' => __( 'Hover Background Color', 'premium-addons-for-elementor' ),
|
2770 |
+
'type' => Controls_Manager::COLOR,
|
2771 |
+
'selectors' => array(
|
2772 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close:hover' => 'background-color: {{VALUE}};',
|
2773 |
+
),
|
2774 |
+
)
|
2775 |
+
);
|
2776 |
+
|
2777 |
+
$this->add_group_control(
|
2778 |
+
Group_Control_Box_Shadow::get_type(),
|
2779 |
+
array(
|
2780 |
+
'name' => 'pa_ham_close_shadow',
|
2781 |
+
'selector' => '{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close',
|
2782 |
+
)
|
2783 |
+
);
|
2784 |
+
|
2785 |
+
$this->add_group_control(
|
2786 |
+
Group_Control_Border::get_type(),
|
2787 |
+
array(
|
2788 |
+
'name' => 'pa_ham_close_border',
|
2789 |
+
'selector' => '{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close',
|
2790 |
+
)
|
2791 |
+
);
|
2792 |
+
|
2793 |
+
$this->add_control(
|
2794 |
+
'pa_ham_close_rad',
|
2795 |
+
array(
|
2796 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2797 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2798 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2799 |
+
'selectors' => array(
|
2800 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2801 |
+
),
|
2802 |
+
)
|
2803 |
+
);
|
2804 |
+
|
2805 |
+
$this->add_responsive_control(
|
2806 |
+
'pa_ham_close_padding',
|
2807 |
+
array(
|
2808 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2809 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2810 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2811 |
+
'selectors' => array(
|
2812 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2813 |
+
),
|
2814 |
+
)
|
2815 |
+
);
|
2816 |
+
|
2817 |
+
$this->add_responsive_control(
|
2818 |
+
'pa_ham_close_margin',
|
2819 |
+
array(
|
2820 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2821 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2822 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2823 |
+
'selectors' => array(
|
2824 |
+
'{{WRAPPER}} .premium-mobile-menu-outer-container .premium-mobile-menu-close' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2825 |
+
),
|
2826 |
+
)
|
2827 |
+
);
|
2828 |
+
|
2829 |
+
$this->end_controls_section();
|
2830 |
+
}
|
2831 |
+
|
2832 |
+
/**
|
2833 |
+
* Get Menu Item Extras.
|
2834 |
+
* Adds Menu Items' Icon & Badge Style.
|
2835 |
+
*
|
2836 |
+
* @access private
|
2837 |
+
* @since 4.9.4
|
2838 |
+
*/
|
2839 |
+
private function get_menu_item_extras() {
|
2840 |
+
|
2841 |
+
$this->start_controls_section(
|
2842 |
+
'premium_nav_item_extra_style',
|
2843 |
+
array(
|
2844 |
+
'label' => __( 'Menu Item Icon & Badge', 'premium-addons-for-elementor' ),
|
2845 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
2846 |
+
)
|
2847 |
+
);
|
2848 |
+
|
2849 |
+
$this->start_controls_tabs( 'pa_nav_items_extras' );
|
2850 |
+
|
2851 |
+
$this->start_controls_tab(
|
2852 |
+
'pa_nav_item_icon_style',
|
2853 |
+
array(
|
2854 |
+
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
2855 |
+
)
|
2856 |
+
);
|
2857 |
+
|
2858 |
+
$left_order = is_rtl() ? '1' : '0';
|
2859 |
+
$right_order = is_rtl() ? '0' : '1';
|
2860 |
+
$default = is_rtl() ? $right_order : $left_order;
|
2861 |
+
|
2862 |
+
$this->add_responsive_control(
|
2863 |
+
'pa_nav_item_icon_pos',
|
2864 |
+
array(
|
2865 |
+
'label' => __( 'Position', 'premium-addons-for-elementor' ),
|
2866 |
+
'type' => Controls_Manager::CHOOSE,
|
2867 |
+
'options' => array(
|
2868 |
+
$left_order => array(
|
2869 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
2870 |
+
'icon' => 'eicon-h-align-left',
|
2871 |
+
),
|
2872 |
+
$right_order => array(
|
2873 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
2874 |
+
'icon' => 'eicon-h-align-right',
|
2875 |
+
),
|
2876 |
+
),
|
2877 |
+
'default' => $default,
|
2878 |
+
'toggle' => false,
|
2879 |
+
'selectors' => array(
|
2880 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'order: {{VALUE}}',
|
2881 |
+
),
|
2882 |
+
)
|
2883 |
+
);
|
2884 |
+
|
2885 |
+
$this->add_control(
|
2886 |
+
'menu_item_icon_color',
|
2887 |
+
array(
|
2888 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2889 |
+
'type' => Controls_Manager::COLOR,
|
2890 |
+
'global' => array(
|
2891 |
+
'default' => Global_Colors::COLOR_PRIMARY,
|
2892 |
+
),
|
2893 |
+
'selectors' => array(
|
2894 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'color: {{VALUE}};',
|
2895 |
+
),
|
2896 |
+
'condition' => array(
|
2897 |
+
'menu_type' => 'custom',
|
2898 |
+
),
|
2899 |
+
)
|
2900 |
+
);
|
2901 |
+
|
2902 |
+
$this->add_responsive_control(
|
2903 |
+
'pa_nav_item_icon_size',
|
2904 |
+
array(
|
2905 |
+
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
2906 |
+
'type' => Controls_Manager::SLIDER,
|
2907 |
+
'label_block' => true,
|
2908 |
+
'size_units' => array( 'px' ),
|
2909 |
+
'range' => array(
|
2910 |
+
'px' => array(
|
2911 |
+
'min' => 0,
|
2912 |
+
'max' => 300,
|
2913 |
+
),
|
2914 |
+
),
|
2915 |
+
'selectors' => array(
|
2916 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
2917 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon.dashicons, {{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > img.premium-item-icon, {{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon.premium-lottie-animation' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
2918 |
+
),
|
2919 |
+
)
|
2920 |
+
);
|
2921 |
+
|
2922 |
+
$this->add_control(
|
2923 |
+
'menu_item_icon_back_color',
|
2924 |
+
array(
|
2925 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
2926 |
+
'type' => Controls_Manager::COLOR,
|
2927 |
+
'selectors' => array(
|
2928 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'background-color: {{VALUE}};',
|
2929 |
+
),
|
2930 |
+
)
|
2931 |
+
);
|
2932 |
+
|
2933 |
+
$this->add_control(
|
2934 |
+
'menu_item_icon_radius',
|
2935 |
+
array(
|
2936 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
2937 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2938 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2939 |
+
'selectors' => array(
|
2940 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
2941 |
+
),
|
2942 |
+
)
|
2943 |
+
);
|
2944 |
+
|
2945 |
+
$this->add_responsive_control(
|
2946 |
+
'pa_nav_item_icon_margin',
|
2947 |
+
array(
|
2948 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
2949 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2950 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2951 |
+
'selectors' => array(
|
2952 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2953 |
+
),
|
2954 |
+
)
|
2955 |
+
);
|
2956 |
+
|
2957 |
+
$this->add_responsive_control(
|
2958 |
+
'pa_nav_item_icon_padding',
|
2959 |
+
array(
|
2960 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
2961 |
+
'type' => Controls_Manager::DIMENSIONS,
|
2962 |
+
'size_units' => array( 'px', 'em', '%' ),
|
2963 |
+
'selectors' => array(
|
2964 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
2965 |
+
),
|
2966 |
+
)
|
2967 |
+
);
|
2968 |
+
|
2969 |
+
$this->end_controls_tab();
|
2970 |
+
|
2971 |
+
$this->start_controls_tab(
|
2972 |
+
'pa_nav_item_badge_style',
|
2973 |
+
array(
|
2974 |
+
'label' => __( 'Badge', 'premium-addons-for-elementor' ),
|
2975 |
+
)
|
2976 |
+
);
|
2977 |
+
|
2978 |
+
$this->add_group_control(
|
2979 |
+
Group_Control_Typography::get_type(),
|
2980 |
+
array(
|
2981 |
+
'name' => 'pa_nav_item_badge_typo',
|
2982 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
2983 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
2984 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge',
|
2985 |
+
)
|
2986 |
+
);
|
2987 |
+
|
2988 |
+
$this->add_control(
|
2989 |
+
'item_badge_color',
|
2990 |
+
array(
|
2991 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
2992 |
+
'type' => Controls_Manager::COLOR,
|
2993 |
+
'selectors' => array(
|
2994 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
2995 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
2996 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'color: {{VALUE}};',
|
2997 |
+
),
|
2998 |
+
'condition' => array(
|
2999 |
+
'menu_type' => 'custom',
|
3000 |
+
),
|
3001 |
+
)
|
3002 |
+
);
|
3003 |
+
|
3004 |
+
$this->add_control(
|
3005 |
+
'item_badge_back_color',
|
3006 |
+
array(
|
3007 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
3008 |
+
'type' => Controls_Manager::COLOR,
|
3009 |
+
'selectors' => array(
|
3010 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3011 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3012 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'background-color: {{VALUE}};',
|
3013 |
+
),
|
3014 |
+
'condition' => array(
|
3015 |
+
'menu_type' => 'custom',
|
3016 |
+
),
|
3017 |
+
)
|
3018 |
+
);
|
3019 |
+
|
3020 |
+
$this->add_group_control(
|
3021 |
+
Group_Control_Border::get_type(),
|
3022 |
+
array(
|
3023 |
+
'name' => 'pa_nav_item_badge_border',
|
3024 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3025 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3026 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge',
|
3027 |
+
)
|
3028 |
+
);
|
3029 |
+
|
3030 |
+
$this->add_control(
|
3031 |
+
'pa_nav_item_badge_rad',
|
3032 |
+
array(
|
3033 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3034 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3035 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3036 |
+
'selectors' => array(
|
3037 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3038 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3039 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3040 |
+
),
|
3041 |
+
)
|
3042 |
+
);
|
3043 |
+
|
3044 |
+
$this->add_responsive_control(
|
3045 |
+
'pa_nav_item_badge_padding',
|
3046 |
+
array(
|
3047 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3048 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3049 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3050 |
+
'selectors' => array(
|
3051 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3052 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3053 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3054 |
+
),
|
3055 |
+
)
|
3056 |
+
);
|
3057 |
+
|
3058 |
+
$this->add_responsive_control(
|
3059 |
+
'pa_nav_item_badge_margin',
|
3060 |
+
array(
|
3061 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3062 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3063 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3064 |
+
'selectors' => array(
|
3065 |
+
'{{WRAPPER}} .premium-nav-menu-item > .premium-menu-link > .premium-item-badge,
|
3066 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-rn-badge,
|
3067 |
+
{{WRAPPER}} .premium-ver-inner-container > div .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link > .premium-rn-badge' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3068 |
+
),
|
3069 |
+
)
|
3070 |
+
);
|
3071 |
+
|
3072 |
+
$this->end_controls_tab();
|
3073 |
+
$this->end_controls_tabs();
|
3074 |
+
|
3075 |
+
$this->end_controls_section();
|
3076 |
+
}
|
3077 |
+
|
3078 |
+
/**
|
3079 |
+
* Get menu item style.
|
3080 |
+
*
|
3081 |
+
* @access private
|
3082 |
+
* @since 4.9.3
|
3083 |
+
*/
|
3084 |
+
private function get_menu_item_style() {
|
3085 |
+
|
3086 |
+
$this->start_controls_section(
|
3087 |
+
'premium_nav_item_style_section',
|
3088 |
+
array(
|
3089 |
+
'label' => __( 'Menu Item Style', 'premium-addons-for-elementor' ),
|
3090 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
3091 |
+
)
|
3092 |
+
);
|
3093 |
+
|
3094 |
+
$this->add_group_control(
|
3095 |
+
Group_Control_Typography::get_type(),
|
3096 |
+
array(
|
3097 |
+
'name' => 'pa_nav_item_typo',
|
3098 |
+
'global' => array(
|
3099 |
+
'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
|
3100 |
+
),
|
3101 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link',
|
3102 |
+
)
|
3103 |
+
);
|
3104 |
+
|
3105 |
+
$this->add_responsive_control(
|
3106 |
+
'pa_nav_item_drop_icon_size',
|
3107 |
+
array(
|
3108 |
+
'label' => __( 'Dropdown Icon Size', 'premium-addons-for-elementor' ),
|
3109 |
+
'type' => Controls_Manager::SLIDER,
|
3110 |
+
'size_units' => array( 'px', 'em' ),
|
3111 |
+
'selectors' => array(
|
3112 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link .premium-dropdown-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
3113 |
+
),
|
3114 |
+
)
|
3115 |
+
);
|
3116 |
+
|
3117 |
+
$this->add_responsive_control(
|
3118 |
+
'pa_pointer_thinkness',
|
3119 |
+
array(
|
3120 |
+
'label' => __( 'Pointer Thickness', 'premium-addons-for-elementor' ),
|
3121 |
+
'type' => Controls_Manager::SLIDER,
|
3122 |
+
'size_units' => array( 'px' ),
|
3123 |
+
'range' => array(
|
3124 |
+
'px' => array(
|
3125 |
+
'min' => 0,
|
3126 |
+
'max' => 50,
|
3127 |
+
),
|
3128 |
+
),
|
3129 |
+
'selectors' => array(
|
3130 |
+
'{{WRAPPER}} .premium-nav-pointer-underline .premium-menu-link-parent::after,
|
3131 |
+
{{WRAPPER}} .premium-nav-pointer-overline .premium-menu-link-parent::before,
|
3132 |
+
{{WRAPPER}} .premium-nav-pointer-double-line .premium-menu-link-parent::before,
|
3133 |
+
{{WRAPPER}} .premium-nav-pointer-double-line .premium-menu-link-parent::after' => 'height: {{SIZE}}px;',
|
3134 |
+
'{{WRAPPER}} .premium-nav-pointer-framed:not(.premium-nav-animation-draw):not(.premium-nav-animation-corners) .premium-menu-link-parent::before' => 'border-width: {{SIZE}}px;',
|
3135 |
+
'{{WRAPPER}} .premium-nav-pointer-framed.premium-nav-animation-draw .premium-menu-link-parent::before' => 'border-width: 0 0 {{SIZE}}px {{SIZE}}px;',
|
3136 |
+
'{{WRAPPER}} .premium-nav-pointer-framed.premium-nav-animation-draw .premium-menu-link-parent::after' => 'border-width: {{SIZE}}px {{SIZE}}px 0 0;',
|
3137 |
+
'{{WRAPPER}} .premium-nav-pointer-framed.premium-nav-animation-corners .premium-menu-link-parent::before' => 'border-width: {{SIZE}}px 0 0 {{SIZE}}px',
|
3138 |
+
'{{WRAPPER}} .premium-nav-pointer-framed.premium-nav-animation-corners .premium-menu-link-parent::after' => 'border-width: 0 {{SIZE}}px {{SIZE}}px 0',
|
3139 |
+
),
|
3140 |
+
'condition' => array(
|
3141 |
+
'pointer!' => array( 'none', 'text', 'background' ),
|
3142 |
+
),
|
3143 |
+
|
3144 |
+
)
|
3145 |
+
);
|
3146 |
+
|
3147 |
+
$this->add_responsive_control(
|
3148 |
+
'pa_nav_item_drop_icon_margin',
|
3149 |
+
array(
|
3150 |
+
'label' => __( 'Dropdown Icon Margin', 'premium-addons-for-elementor' ),
|
3151 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3152 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3153 |
+
'selectors' => array(
|
3154 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link .premium-dropdown-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3155 |
+
),
|
3156 |
+
)
|
3157 |
+
);
|
3158 |
+
|
3159 |
+
$this->start_controls_tabs( 'pa_nav_items_styles' );
|
3160 |
+
|
3161 |
+
$this->start_controls_tab(
|
3162 |
+
'pa_nav_item_normal',
|
3163 |
+
array(
|
3164 |
+
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
3165 |
+
)
|
3166 |
+
);
|
3167 |
+
|
3168 |
+
$this->add_control(
|
3169 |
+
'pa_nav_item_color',
|
3170 |
+
array(
|
3171 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3172 |
+
'type' => Controls_Manager::COLOR,
|
3173 |
+
'global' => array(
|
3174 |
+
'default' => Global_Colors::COLOR_TEXT,
|
3175 |
+
),
|
3176 |
+
'selectors' => array(
|
3177 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'color: {{VALUE}};',
|
3178 |
+
),
|
3179 |
+
)
|
3180 |
+
);
|
3181 |
+
|
3182 |
+
$this->add_control(
|
3183 |
+
'pa_nav_item_drop_icon_color',
|
3184 |
+
array(
|
3185 |
+
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3186 |
+
'type' => Controls_Manager::COLOR,
|
3187 |
+
'global' => array(
|
3188 |
+
'default' => Global_Colors::COLOR_TEXT,
|
3189 |
+
),
|
3190 |
+
'selectors' => array(
|
3191 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3192 |
+
),
|
3193 |
+
)
|
3194 |
+
);
|
3195 |
+
|
3196 |
+
$this->add_group_control(
|
3197 |
+
Group_Control_Background::get_type(),
|
3198 |
+
array(
|
3199 |
+
'name' => 'pa_nav_item_bg',
|
3200 |
+
'types' => array( 'classic', 'gradient' ),
|
3201 |
+
// 'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item',
|
3202 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link',
|
3203 |
+
)
|
3204 |
+
);
|
3205 |
+
|
3206 |
+
$this->add_group_control(
|
3207 |
+
Group_Control_Text_Shadow::get_type(),
|
3208 |
+
array(
|
3209 |
+
'name' => 'pa_nav_item_shadow',
|
3210 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link',
|
3211 |
+
)
|
3212 |
+
);
|
3213 |
+
|
3214 |
+
$this->add_group_control(
|
3215 |
+
Group_Control_Border::get_type(),
|
3216 |
+
array(
|
3217 |
+
'name' => 'pa_nav_item_border',
|
3218 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link',
|
3219 |
+
)
|
3220 |
+
);
|
3221 |
+
|
3222 |
+
$this->add_control(
|
3223 |
+
'pa_nav_item_rad',
|
3224 |
+
array(
|
3225 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3226 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3227 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3228 |
+
'selectors' => array(
|
3229 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3230 |
+
),
|
3231 |
+
)
|
3232 |
+
);
|
3233 |
+
|
3234 |
+
$this->add_responsive_control(
|
3235 |
+
'pa_nav_item_padding',
|
3236 |
+
array(
|
3237 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3238 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3239 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3240 |
+
'selectors' => array(
|
3241 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item > .premium-menu-link' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3242 |
+
),
|
3243 |
+
)
|
3244 |
+
);
|
3245 |
+
|
3246 |
+
$this->add_responsive_control(
|
3247 |
+
'pa_nav_item_margin',
|
3248 |
+
array(
|
3249 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3250 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3251 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3252 |
+
'selectors' => array(
|
3253 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3254 |
+
),
|
3255 |
+
)
|
3256 |
+
);
|
3257 |
+
|
3258 |
+
$this->end_controls_tab();
|
3259 |
+
|
3260 |
+
$this->start_controls_tab(
|
3261 |
+
'pa_nav_item_hover',
|
3262 |
+
array(
|
3263 |
+
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
3264 |
+
)
|
3265 |
+
);
|
3266 |
+
|
3267 |
+
$this->add_control(
|
3268 |
+
'pa_nav_item_color_hover',
|
3269 |
+
array(
|
3270 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3271 |
+
'type' => Controls_Manager::COLOR,
|
3272 |
+
'global' => array(
|
3273 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
3274 |
+
),
|
3275 |
+
'selectors' => array(
|
3276 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link' => 'color: {{VALUE}};',
|
3277 |
+
),
|
3278 |
+
)
|
3279 |
+
);
|
3280 |
+
|
3281 |
+
$this->add_control(
|
3282 |
+
'pa_nav_item_drop_icon_hover',
|
3283 |
+
array(
|
3284 |
+
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3285 |
+
'type' => Controls_Manager::COLOR,
|
3286 |
+
'global' => array(
|
3287 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
3288 |
+
),
|
3289 |
+
'selectors' => array(
|
3290 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3291 |
+
),
|
3292 |
+
)
|
3293 |
+
);
|
3294 |
+
|
3295 |
+
$this->add_group_control(
|
3296 |
+
Group_Control_Background::get_type(),
|
3297 |
+
array(
|
3298 |
+
'name' => 'pa_nav_item_bg_hover',
|
3299 |
+
'types' => array( 'classic', 'gradient' ),
|
3300 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link',
|
3301 |
+
)
|
3302 |
+
);
|
3303 |
+
|
3304 |
+
$this->add_control(
|
3305 |
+
'menu_item_pointer_color_hover',
|
3306 |
+
array(
|
3307 |
+
'label' => __( 'Item Hover Effect Color', 'premium-addons-for-elementor' ),
|
3308 |
+
'type' => Controls_Manager::COLOR,
|
3309 |
+
'global' => array(
|
3310 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
3311 |
+
),
|
3312 |
+
'selectors' => array(
|
3313 |
+
'{{WRAPPER}} .premium-nav-widget-container:not(.premium-nav-pointer-framed) .premium-menu-link-parent:before,
|
3314 |
+
{{WRAPPER}} .premium-nav-widget-container:not(.premium-nav-pointer-framed) .premium-menu-link-parent:after' => 'background-color: {{VALUE}}',
|
3315 |
+
'{{WRAPPER}} .premium-nav-pointer-framed .premium-menu-link-parent:before,
|
3316 |
+
{{WRAPPER}} .premium-nav-pointer-framed .premium-menu-link-parent:after' => 'border-color: {{VALUE}}',
|
3317 |
+
),
|
3318 |
+
'condition' => array(
|
3319 |
+
'pointer!' => array( 'none', 'text' ),
|
3320 |
+
),
|
3321 |
+
)
|
3322 |
+
);
|
3323 |
+
|
3324 |
+
$this->add_group_control(
|
3325 |
+
Group_Control_Text_Shadow::get_type(),
|
3326 |
+
array(
|
3327 |
+
'name' => 'pa_nav_item_shadow_hover',
|
3328 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link',
|
3329 |
+
)
|
3330 |
+
);
|
3331 |
+
|
3332 |
+
$this->add_group_control(
|
3333 |
+
Group_Control_Border::get_type(),
|
3334 |
+
array(
|
3335 |
+
'name' => 'pa_nav_item_border_hover',
|
3336 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link',
|
3337 |
+
)
|
3338 |
+
);
|
3339 |
+
|
3340 |
+
$this->add_control(
|
3341 |
+
'pa_nav_item_rad_hover',
|
3342 |
+
array(
|
3343 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3344 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3345 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3346 |
+
'selectors' => array(
|
3347 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3348 |
+
),
|
3349 |
+
)
|
3350 |
+
);
|
3351 |
+
|
3352 |
+
$this->add_responsive_control(
|
3353 |
+
'pa_nav_item_padding_hover',
|
3354 |
+
array(
|
3355 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3356 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3357 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3358 |
+
'selectors' => array(
|
3359 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover > .premium-menu-link' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3360 |
+
),
|
3361 |
+
)
|
3362 |
+
);
|
3363 |
+
|
3364 |
+
$this->add_responsive_control(
|
3365 |
+
'pa_nav_item_margin_hover',
|
3366 |
+
array(
|
3367 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3368 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3369 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3370 |
+
'selectors' => array(
|
3371 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-nav-menu-item:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3372 |
+
),
|
3373 |
+
)
|
3374 |
+
);
|
3375 |
+
|
3376 |
+
$this->end_controls_tab();
|
3377 |
+
|
3378 |
+
$this->start_controls_tab(
|
3379 |
+
'pa_nav_item_active',
|
3380 |
+
array(
|
3381 |
+
'label' => __( 'Active', 'premium-addons-for-elementor' ),
|
3382 |
+
)
|
3383 |
+
);
|
3384 |
+
|
3385 |
+
$this->add_control(
|
3386 |
+
'pa_nav_item_color_active',
|
3387 |
+
array(
|
3388 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3389 |
+
'type' => Controls_Manager::COLOR,
|
3390 |
+
'global' => array(
|
3391 |
+
'default' => Global_Colors::COLOR_ACCENT,
|
3392 |
+
),
|
3393 |
+
'selectors' => array(
|
3394 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item > .premium-menu-link' => 'color: {{VALUE}};',
|
3395 |
+
),
|
3396 |
+
)
|
3397 |
+
);
|
3398 |
+
|
3399 |
+
$this->add_control(
|
3400 |
+
'pa_nav_item_drop_icon_active',
|
3401 |
+
array(
|
3402 |
+
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3403 |
+
'type' => Controls_Manager::COLOR,
|
3404 |
+
'global' => array(
|
3405 |
+
'default' => Global_Colors::COLOR_ACCENT,
|
3406 |
+
),
|
3407 |
+
'selectors' => array(
|
3408 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item > .premium-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3409 |
+
),
|
3410 |
+
)
|
3411 |
+
);
|
3412 |
+
|
3413 |
+
$this->add_group_control(
|
3414 |
+
Group_Control_Background::get_type(),
|
3415 |
+
array(
|
3416 |
+
'name' => 'pa_nav_item_bg_active',
|
3417 |
+
'types' => array( 'classic', 'gradient' ),
|
3418 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-active-item > .premium-menu-link',
|
3419 |
+
)
|
3420 |
+
);
|
3421 |
+
|
3422 |
+
$this->add_control(
|
3423 |
+
'menu_item_pointer_color_active',
|
3424 |
+
array(
|
3425 |
+
'label' => __( 'Item Hover Effect Color', 'premium-addons-for-elementor' ),
|
3426 |
+
'type' => Controls_Manager::COLOR,
|
3427 |
+
'selectors' => array(
|
3428 |
+
'{{WRAPPER}} .premium-nav-widget-container:not(.premium-nav-pointer-framed) .premium-active-item .premium-menu-link-parent:before,
|
3429 |
+
{{WRAPPER}} .premium-nav-widget-container:not(.premium-nav-pointer-framed) .premium-active-item .premium-menu-link-parent:after' => 'background-color: {{VALUE}}',
|
3430 |
+
'{{WRAPPER}} .premium-nav-pointer-framed .premium-active-item .premium-menu-link-parent:before,
|
3431 |
+
{{WRAPPER}} .premium-nav-pointer-framed .premium-active-item .premium-menu-link-parent:after' => 'border-color: {{VALUE}}',
|
3432 |
+
),
|
3433 |
+
'condition' => array(
|
3434 |
+
'pointer!' => array( 'none', 'text' ),
|
3435 |
+
),
|
3436 |
+
)
|
3437 |
+
);
|
3438 |
+
|
3439 |
+
$this->add_group_control(
|
3440 |
+
Group_Control_Text_Shadow::get_type(),
|
3441 |
+
array(
|
3442 |
+
'name' => 'pa_nav_item_shadow_active',
|
3443 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-active-item',
|
3444 |
+
)
|
3445 |
+
);
|
3446 |
+
|
3447 |
+
$this->add_group_control(
|
3448 |
+
Group_Control_Border::get_type(),
|
3449 |
+
array(
|
3450 |
+
'name' => 'pa_nav_item_border_active',
|
3451 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu > .premium-active-item',
|
3452 |
+
)
|
3453 |
+
);
|
3454 |
+
|
3455 |
+
$this->add_control(
|
3456 |
+
'pa_nav_item_rad_active',
|
3457 |
+
array(
|
3458 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3459 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3460 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3461 |
+
'selectors' => array(
|
3462 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3463 |
+
),
|
3464 |
+
)
|
3465 |
+
);
|
3466 |
+
|
3467 |
+
$this->add_responsive_control(
|
3468 |
+
'pa_nav_item_padding_active',
|
3469 |
+
array(
|
3470 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3471 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3472 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3473 |
+
'selectors' => array(
|
3474 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3475 |
+
),
|
3476 |
+
)
|
3477 |
+
);
|
3478 |
+
|
3479 |
+
$this->add_responsive_control(
|
3480 |
+
'pa_nav_item_margin_active',
|
3481 |
+
array(
|
3482 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3483 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3484 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3485 |
+
'selectors' => array(
|
3486 |
+
'{{WRAPPER}} .premium-main-nav-menu > .premium-active-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3487 |
+
),
|
3488 |
+
)
|
3489 |
+
);
|
3490 |
+
|
3491 |
+
$this->end_controls_tab();
|
3492 |
+
$this->end_controls_tabs();
|
3493 |
+
|
3494 |
+
$this->end_controls_section();
|
3495 |
+
}
|
3496 |
+
|
3497 |
+
/**
|
3498 |
+
* Get submenu container style.
|
3499 |
+
*
|
3500 |
+
* @access private
|
3501 |
+
* @since 4.9.3
|
3502 |
+
*/
|
3503 |
+
private function get_submenu_container_style() {
|
3504 |
+
|
3505 |
+
$this->start_controls_section(
|
3506 |
+
'premium_submenu_style_section',
|
3507 |
+
array(
|
3508 |
+
'label' => __( 'Submenu Style', 'premium-addons-for-elementor' ),
|
3509 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
3510 |
+
)
|
3511 |
+
);
|
3512 |
+
|
3513 |
+
$this->start_controls_tabs( 'pa_sub_menus_style' );
|
3514 |
+
|
3515 |
+
$this->start_controls_tab(
|
3516 |
+
'pa_sub_simple',
|
3517 |
+
array(
|
3518 |
+
'label' => __( 'Simple Panel', 'premium-addons-for-elementor' ),
|
3519 |
+
)
|
3520 |
+
);
|
3521 |
+
|
3522 |
+
$this->add_responsive_control(
|
3523 |
+
'pa_sub_minwidth',
|
3524 |
+
array(
|
3525 |
+
'label' => __( 'Minimum Width', 'premium-addons-for-elementor' ),
|
3526 |
+
'type' => Controls_Manager::SLIDER,
|
3527 |
+
'label_block' => true,
|
3528 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3529 |
+
'range' => array(
|
3530 |
+
'px' => array(
|
3531 |
+
'min' => 0,
|
3532 |
+
'max' => 1000,
|
3533 |
+
),
|
3534 |
+
),
|
3535 |
+
'selectors' => array(
|
3536 |
+
'{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu' => 'min-width: {{SIZE}}{{UNIT}};',
|
3537 |
+
),
|
3538 |
+
'condition' => array(
|
3539 |
+
'menu_type!' => 'custom',
|
3540 |
+
),
|
3541 |
+
)
|
3542 |
+
);
|
3543 |
+
|
3544 |
+
$this->add_group_control(
|
3545 |
+
Group_Control_Box_Shadow::get_type(),
|
3546 |
+
array(
|
3547 |
+
'name' => 'pa_sub_shadow',
|
3548 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu',
|
3549 |
+
)
|
3550 |
+
);
|
3551 |
+
|
3552 |
+
$this->add_group_control(
|
3553 |
+
Group_Control_Background::get_type(),
|
3554 |
+
array(
|
3555 |
+
'name' => 'pa_sub_bg',
|
3556 |
+
'types' => array( 'classic', 'gradient' ),
|
3557 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu',
|
3558 |
+
)
|
3559 |
+
);
|
3560 |
+
|
3561 |
+
$this->add_group_control(
|
3562 |
+
Group_Control_Border::get_type(),
|
3563 |
+
array(
|
3564 |
+
'name' => 'pa_sub_border',
|
3565 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu',
|
3566 |
+
)
|
3567 |
+
);
|
3568 |
+
|
3569 |
+
$this->add_control(
|
3570 |
+
'pa_sub_rad',
|
3571 |
+
array(
|
3572 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3573 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3574 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3575 |
+
'selectors' => array(
|
3576 |
+
'{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3577 |
+
),
|
3578 |
+
)
|
3579 |
+
);
|
3580 |
+
|
3581 |
+
$this->add_responsive_control(
|
3582 |
+
'pa_sub_padding',
|
3583 |
+
array(
|
3584 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3585 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3586 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3587 |
+
'selectors' => array(
|
3588 |
+
'{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3589 |
+
),
|
3590 |
+
)
|
3591 |
+
);
|
3592 |
+
|
3593 |
+
$this->add_responsive_control(
|
3594 |
+
'pa_sub_margin',
|
3595 |
+
array(
|
3596 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3597 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3598 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3599 |
+
'selectors' => array(
|
3600 |
+
'{{WRAPPER}} .premium-nav-menu-container .premium-sub-menu, {{WRAPPER}} .premium-mobile-menu-container .premium-sub-menu' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3601 |
+
),
|
3602 |
+
)
|
3603 |
+
);
|
3604 |
+
|
3605 |
+
$this->end_controls_tab();
|
3606 |
+
|
3607 |
+
$this->start_controls_tab(
|
3608 |
+
'pa_sub_mega',
|
3609 |
+
array(
|
3610 |
+
'label' => __( 'Mega Panel', 'premium-addons-for-elementor' ),
|
3611 |
+
)
|
3612 |
+
);
|
3613 |
+
|
3614 |
+
$mega_pos = is_rtl() ? 'right' : 'left';
|
3615 |
+
|
3616 |
+
$this->add_responsive_control(
|
3617 |
+
'pa_sub_mega_offset',
|
3618 |
+
array(
|
3619 |
+
'label' => __( 'Offset', 'premium-addons-for-elementor' ),
|
3620 |
+
'type' => Controls_Manager::SLIDER,
|
3621 |
+
'label_block' => true,
|
3622 |
+
'size_units' => array( 'px', '%' ),
|
3623 |
+
'range' => array(
|
3624 |
+
'px' => array(
|
3625 |
+
'min' => -1000,
|
3626 |
+
'max' => 2000,
|
3627 |
+
),
|
3628 |
+
'%' => array(
|
3629 |
+
'min' => -100,
|
3630 |
+
'max' => 100,
|
3631 |
+
),
|
3632 |
+
),
|
3633 |
+
'selectors' => array(
|
3634 |
+
'{{WRAPPER}}.premium-nav-hor .premium-nav-menu-container .premium-mega-content-container' => $mega_pos . ': {{SIZE}}{{UNIT}}; transform: translateX(0)',
|
3635 |
+
'{{WRAPPER}}.premium-nav-ver .premium-nav-menu-container .premium-mega-content-container' => 'top: {{SIZE}}{{UNIT}};',
|
3636 |
+
),
|
3637 |
+
'condition' => array(
|
3638 |
+
'menu_type!' => 'custom',
|
3639 |
+
),
|
3640 |
+
)
|
3641 |
+
);
|
3642 |
+
|
3643 |
+
$this->add_group_control(
|
3644 |
+
Group_Control_Box_Shadow::get_type(),
|
3645 |
+
array(
|
3646 |
+
'name' => 'pa_sub_mega_shadow',
|
3647 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container',
|
3648 |
+
)
|
3649 |
+
);
|
3650 |
+
|
3651 |
+
$this->add_group_control(
|
3652 |
+
Group_Control_Background::get_type(),
|
3653 |
+
array(
|
3654 |
+
'name' => 'pa_sub_mega_bg',
|
3655 |
+
'types' => array( 'classic', 'gradient' ),
|
3656 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container',
|
3657 |
+
)
|
3658 |
+
);
|
3659 |
+
|
3660 |
+
$this->add_group_control(
|
3661 |
+
Group_Control_Border::get_type(),
|
3662 |
+
array(
|
3663 |
+
'name' => 'pa_sub_mega_border',
|
3664 |
+
'selector' => '{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container',
|
3665 |
+
)
|
3666 |
+
);
|
3667 |
+
|
3668 |
+
$this->add_control(
|
3669 |
+
'pa_sub_mega_rad',
|
3670 |
+
array(
|
3671 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3672 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3673 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3674 |
+
'selectors' => array(
|
3675 |
+
'{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3676 |
+
),
|
3677 |
+
)
|
3678 |
+
);
|
3679 |
+
|
3680 |
+
$this->add_responsive_control(
|
3681 |
+
'pa_sub_mega_padding',
|
3682 |
+
array(
|
3683 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3684 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3685 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3686 |
+
'selectors' => array(
|
3687 |
+
'{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3688 |
+
),
|
3689 |
+
)
|
3690 |
+
);
|
3691 |
+
|
3692 |
+
$this->add_responsive_control(
|
3693 |
+
'pa_sub_mega_margin',
|
3694 |
+
array(
|
3695 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3696 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3697 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3698 |
+
'selectors' => array(
|
3699 |
+
'{{WRAPPER}} .premium-nav-menu-container .premium-mega-content-container, {{WRAPPER}} .premium-mobile-menu-container .premium-mega-content-container' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3700 |
+
),
|
3701 |
+
)
|
3702 |
+
);
|
3703 |
+
|
3704 |
+
$this->end_controls_tab();
|
3705 |
+
$this->end_controls_tabs();
|
3706 |
+
|
3707 |
+
$this->end_controls_section();
|
3708 |
+
}
|
3709 |
+
|
3710 |
+
/**
|
3711 |
+
* Get submenu item style.
|
3712 |
+
*
|
3713 |
+
* @access private
|
3714 |
+
* @since 4.9.3
|
3715 |
+
*/
|
3716 |
+
private function get_submenu_item_style() {
|
3717 |
+
|
3718 |
+
$this->start_controls_section(
|
3719 |
+
'premium_submenu_item_style_section',
|
3720 |
+
array(
|
3721 |
+
'label' => __( 'Submenu Item Style', 'premium-addons-for-elementor' ),
|
3722 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
3723 |
+
)
|
3724 |
+
);
|
3725 |
+
|
3726 |
+
$this->add_group_control(
|
3727 |
+
Group_Control_Typography::get_type(),
|
3728 |
+
array(
|
3729 |
+
'name' => 'pa_sub_item_typo',
|
3730 |
+
'global' => array(
|
3731 |
+
'default' => Global_Typography::TYPOGRAPHY_TEXT,
|
3732 |
+
),
|
3733 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link',
|
3734 |
+
)
|
3735 |
+
);
|
3736 |
+
|
3737 |
+
$this->add_responsive_control(
|
3738 |
+
'pa_sub_item_drop_icon_size',
|
3739 |
+
array(
|
3740 |
+
'label' => __( 'Dropdown Icon Size', 'premium-addons-for-elementor' ),
|
3741 |
+
'type' => Controls_Manager::SLIDER,
|
3742 |
+
'size_units' => array( 'px', 'em' ),
|
3743 |
+
'selectors' => array(
|
3744 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link .premium-dropdown-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
3745 |
+
),
|
3746 |
+
'condition' => array(
|
3747 |
+
'menu_type!' => 'custom',
|
3748 |
+
),
|
3749 |
+
)
|
3750 |
+
);
|
3751 |
+
|
3752 |
+
$this->add_responsive_control(
|
3753 |
+
'pa_sub_item_drop_icon_margin',
|
3754 |
+
array(
|
3755 |
+
'label' => __( 'Dropdown Icon Margin', 'premium-addons-for-elementor' ),
|
3756 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3757 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3758 |
+
'selectors' => array(
|
3759 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link .premium-dropdown-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3760 |
+
),
|
3761 |
+
'condition' => array(
|
3762 |
+
'menu_type!' => 'custom',
|
3763 |
+
),
|
3764 |
+
)
|
3765 |
+
);
|
3766 |
+
|
3767 |
+
$this->start_controls_tabs( 'pa_sub_items_styles' );
|
3768 |
+
|
3769 |
+
$this->start_controls_tab(
|
3770 |
+
'pa_sub_item_normal',
|
3771 |
+
array(
|
3772 |
+
'label' => __( 'Normal', 'premium-addons-for-elementor' ),
|
3773 |
+
)
|
3774 |
+
);
|
3775 |
+
|
3776 |
+
$this->add_control(
|
3777 |
+
'pa_sub_item_color',
|
3778 |
+
array(
|
3779 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3780 |
+
'type' => Controls_Manager::COLOR,
|
3781 |
+
'global' => array(
|
3782 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
3783 |
+
),
|
3784 |
+
'selectors' => array(
|
3785 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link' => 'color: {{VALUE}};',
|
3786 |
+
),
|
3787 |
+
)
|
3788 |
+
);
|
3789 |
+
|
3790 |
+
$this->add_control(
|
3791 |
+
'pa_sub_item_drop_icon_color',
|
3792 |
+
array(
|
3793 |
+
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3794 |
+
'type' => Controls_Manager::COLOR,
|
3795 |
+
'global' => array(
|
3796 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
3797 |
+
),
|
3798 |
+
'selectors' => array(
|
3799 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3800 |
+
),
|
3801 |
+
'condition' => array(
|
3802 |
+
'menu_type!' => 'custom',
|
3803 |
+
),
|
3804 |
+
)
|
3805 |
+
);
|
3806 |
+
|
3807 |
+
$this->add_group_control(
|
3808 |
+
Group_Control_Background::get_type(),
|
3809 |
+
array(
|
3810 |
+
'name' => 'pa_sub_item_bg',
|
3811 |
+
'types' => array( 'classic', 'gradient' ),
|
3812 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item',
|
3813 |
+
)
|
3814 |
+
);
|
3815 |
+
|
3816 |
+
$this->add_group_control(
|
3817 |
+
Group_Control_Text_Shadow::get_type(),
|
3818 |
+
array(
|
3819 |
+
'name' => 'pa_sub_item_shadow',
|
3820 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item',
|
3821 |
+
)
|
3822 |
+
);
|
3823 |
+
|
3824 |
+
$this->add_group_control(
|
3825 |
+
Group_Control_Border::get_type(),
|
3826 |
+
array(
|
3827 |
+
'name' => 'pa_sub_item_border',
|
3828 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item',
|
3829 |
+
)
|
3830 |
+
);
|
3831 |
+
|
3832 |
+
$this->add_control(
|
3833 |
+
'pa_sub_item_rad',
|
3834 |
+
array(
|
3835 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3836 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3837 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3838 |
+
'selectors' => array(
|
3839 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3840 |
+
),
|
3841 |
+
)
|
3842 |
+
);
|
3843 |
+
|
3844 |
+
$this->add_responsive_control(
|
3845 |
+
'pa_sub_item_padding',
|
3846 |
+
array(
|
3847 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3848 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3849 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3850 |
+
'selectors' => array(
|
3851 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3852 |
+
),
|
3853 |
+
)
|
3854 |
+
);
|
3855 |
+
|
3856 |
+
$this->add_responsive_control(
|
3857 |
+
'pa_sub_item_margin',
|
3858 |
+
array(
|
3859 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3860 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3861 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3862 |
+
'selectors' => array(
|
3863 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3864 |
+
),
|
3865 |
+
)
|
3866 |
+
);
|
3867 |
+
|
3868 |
+
$this->end_controls_tab();
|
3869 |
+
|
3870 |
+
$this->start_controls_tab(
|
3871 |
+
'pa_sub_item_hover',
|
3872 |
+
array(
|
3873 |
+
'label' => __( 'Hover', 'premium-addons-for-elementor' ),
|
3874 |
+
)
|
3875 |
+
);
|
3876 |
+
|
3877 |
+
$this->add_control(
|
3878 |
+
'pa_sub_item_color_hover',
|
3879 |
+
array(
|
3880 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3881 |
+
'type' => Controls_Manager::COLOR,
|
3882 |
+
'default' => '#fff',
|
3883 |
+
'selectors' => array(
|
3884 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu-item:hover > .premium-sub-menu-link' => 'color: {{VALUE}};',
|
3885 |
+
),
|
3886 |
+
)
|
3887 |
+
);
|
3888 |
+
|
3889 |
+
$this->add_control(
|
3890 |
+
'pa_sub_item_drop_icon_hover',
|
3891 |
+
array(
|
3892 |
+
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
3893 |
+
'type' => Controls_Manager::COLOR,
|
3894 |
+
'default' => '#fff',
|
3895 |
+
'selectors' => array(
|
3896 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu-item:hover > .premium-sub-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
3897 |
+
),
|
3898 |
+
'condition' => array(
|
3899 |
+
'menu_type!' => 'custom',
|
3900 |
+
),
|
3901 |
+
)
|
3902 |
+
);
|
3903 |
+
|
3904 |
+
$this->add_group_control(
|
3905 |
+
Group_Control_Background::get_type(),
|
3906 |
+
array(
|
3907 |
+
'name' => 'pa_sub_item_bg_hover',
|
3908 |
+
'types' => array( 'classic', 'gradient' ),
|
3909 |
+
'selector' => '{{WRAPPER}}:not(.premium-hamburger-menu):not(.premium-nav-slide):not(.premium-nav-dropdown) .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover,
|
3910 |
+
{{WRAPPER}}.premium-hamburger-menu .premium-main-nav-menu .premium-sub-menu > .premium-sub-menu-item:hover > .premium-sub-menu-link,
|
3911 |
+
{{WRAPPER}}.premium-nav-slide .premium-main-nav-menu .premium-sub-menu > .premium-sub-menu-item:hover > .premium-sub-menu-link,
|
3912 |
+
{{WRAPPER}}.premium-nav-dropdown .premium-main-nav-menu .premium-sub-menu > .premium-sub-menu-item:hover > .premium-sub-menu-link',
|
3913 |
+
'fields_options' => array(
|
3914 |
+
'background' => array(
|
3915 |
+
'default' => 'classic',
|
3916 |
+
),
|
3917 |
+
'color' => array(
|
3918 |
+
'global' => array(
|
3919 |
+
'default' => Global_Colors::COLOR_SECONDARY,
|
3920 |
+
),
|
3921 |
+
),
|
3922 |
+
),
|
3923 |
+
)
|
3924 |
+
);
|
3925 |
+
|
3926 |
+
$this->add_group_control(
|
3927 |
+
Group_Control_Text_Shadow::get_type(),
|
3928 |
+
array(
|
3929 |
+
'name' => 'pa_sub_item_shadow_hover',
|
3930 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover',
|
3931 |
+
)
|
3932 |
+
);
|
3933 |
+
|
3934 |
+
$this->add_group_control(
|
3935 |
+
Group_Control_Border::get_type(),
|
3936 |
+
array(
|
3937 |
+
'name' => 'pa_sub_item_border_hover',
|
3938 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover',
|
3939 |
+
)
|
3940 |
+
);
|
3941 |
+
|
3942 |
+
$this->add_control(
|
3943 |
+
'pa_sub_item_rad_hover',
|
3944 |
+
array(
|
3945 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
3946 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3947 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3948 |
+
'selectors' => array(
|
3949 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
3950 |
+
),
|
3951 |
+
)
|
3952 |
+
);
|
3953 |
+
|
3954 |
+
$this->add_responsive_control(
|
3955 |
+
'pa_sub_item_padding_hover',
|
3956 |
+
array(
|
3957 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
3958 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3959 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3960 |
+
'selectors' => array(
|
3961 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3962 |
+
),
|
3963 |
+
)
|
3964 |
+
);
|
3965 |
+
|
3966 |
+
$this->add_responsive_control(
|
3967 |
+
'pa_sub_item_margin_hover',
|
3968 |
+
array(
|
3969 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
3970 |
+
'type' => Controls_Manager::DIMENSIONS,
|
3971 |
+
'size_units' => array( 'px', 'em', '%' ),
|
3972 |
+
'selectors' => array(
|
3973 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-sub-menu-item:hover' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
3974 |
+
),
|
3975 |
+
)
|
3976 |
+
);
|
3977 |
+
|
3978 |
+
$this->end_controls_tab();
|
3979 |
+
|
3980 |
+
$this->start_controls_tab(
|
3981 |
+
'pa_sub_item_active',
|
3982 |
+
array(
|
3983 |
+
'label' => __( 'Active', 'premium-addons-for-elementor' ),
|
3984 |
+
)
|
3985 |
+
);
|
3986 |
+
|
3987 |
+
$this->add_control(
|
3988 |
+
'pa_sub_item_color_active',
|
3989 |
+
array(
|
3990 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
3991 |
+
'type' => Controls_Manager::COLOR,
|
3992 |
+
'selectors' => array(
|
3993 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item .premium-sub-menu-link' => 'color: {{VALUE}};',
|
3994 |
+
),
|
3995 |
+
)
|
3996 |
+
);
|
3997 |
+
|
3998 |
+
$this->add_control(
|
3999 |
+
'pa_sub_item_drop_icon_active',
|
4000 |
+
array(
|
4001 |
+
'label' => __( 'Dropdown Icon Color', 'premium-addons-for-elementor' ),
|
4002 |
+
'type' => Controls_Manager::COLOR,
|
4003 |
+
'global' => array(
|
4004 |
+
'default' => Global_Colors::COLOR_PRIMARY,
|
4005 |
+
),
|
4006 |
+
'selectors' => array(
|
4007 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item .premium-sub-menu-link .premium-dropdown-icon' => 'color: {{VALUE}};',
|
4008 |
+
),
|
4009 |
+
'condition' => array(
|
4010 |
+
'menu_type!' => 'custom',
|
4011 |
+
),
|
4012 |
+
)
|
4013 |
+
);
|
4014 |
+
|
4015 |
+
$this->add_group_control(
|
4016 |
+
Group_Control_Background::get_type(),
|
4017 |
+
array(
|
4018 |
+
'name' => 'pa_sub_item_bg_active',
|
4019 |
+
'types' => array( 'classic', 'gradient' ),
|
4020 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item',
|
4021 |
+
)
|
4022 |
+
);
|
4023 |
+
|
4024 |
+
$this->add_group_control(
|
4025 |
+
Group_Control_Text_Shadow::get_type(),
|
4026 |
+
array(
|
4027 |
+
'name' => 'pa_sub_item_shadow_active',
|
4028 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item',
|
4029 |
+
)
|
4030 |
+
);
|
4031 |
+
|
4032 |
+
$this->add_group_control(
|
4033 |
+
Group_Control_Border::get_type(),
|
4034 |
+
array(
|
4035 |
+
'name' => 'pa_sub_item_border_active',
|
4036 |
+
'selector' => '{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item',
|
4037 |
+
)
|
4038 |
+
);
|
4039 |
+
|
4040 |
+
$this->add_control(
|
4041 |
+
'pa_sub_item_rad_active',
|
4042 |
+
array(
|
4043 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
4044 |
+
'type' => Controls_Manager::DIMENSIONS,
|
4045 |
+
'size_units' => array( 'px', 'em', '%' ),
|
4046 |
+
'selectors' => array(
|
4047 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
4048 |
+
),
|
4049 |
+
)
|
4050 |
+
);
|
4051 |
+
|
4052 |
+
$this->add_responsive_control(
|
4053 |
+
'pa_sub_item_padding_active',
|
4054 |
+
array(
|
4055 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
4056 |
+
'type' => Controls_Manager::DIMENSIONS,
|
4057 |
+
'size_units' => array( 'px', 'em', '%' ),
|
4058 |
+
'selectors' => array(
|
4059 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4060 |
+
),
|
4061 |
+
)
|
4062 |
+
);
|
4063 |
+
|
4064 |
+
$this->add_responsive_control(
|
4065 |
+
'pa_sub_item_margin_active',
|
4066 |
+
array(
|
4067 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
4068 |
+
'type' => Controls_Manager::DIMENSIONS,
|
4069 |
+
'size_units' => array( 'px', 'em', '%' ),
|
4070 |
+
'selectors' => array(
|
4071 |
+
'{{WRAPPER}} .premium-main-nav-menu .premium-sub-menu .premium-active-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4072 |
+
),
|
4073 |
+
)
|
4074 |
+
);
|
4075 |
+
|
4076 |
+
$this->end_controls_tab();
|
4077 |
+
|
4078 |
+
$this->end_controls_tabs();
|
4079 |
+
|
4080 |
+
$this->end_controls_section();
|
4081 |
+
}
|
4082 |
+
|
4083 |
+
/**
|
4084 |
+
* Get Submenu Item Extras.
|
4085 |
+
* Adds Submenu Items' Icon & Badge Style.
|
4086 |
+
*
|
4087 |
+
* @access private
|
4088 |
+
* @since 4.9.4
|
4089 |
+
*/
|
4090 |
+
private function get_sub_menu_item_extras() {
|
4091 |
+
|
4092 |
+
$this->start_controls_section(
|
4093 |
+
'premium_sub_extra_style',
|
4094 |
+
array(
|
4095 |
+
'label' => __( 'Submenu Item Icon & Badge', 'premium-addons-for-elementor' ),
|
4096 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
4097 |
+
)
|
4098 |
+
);
|
4099 |
+
|
4100 |
+
$this->start_controls_tabs( 'pa_sub_items_extras' );
|
4101 |
+
|
4102 |
+
$this->start_controls_tab(
|
4103 |
+
'pa_sub_icon_style',
|
4104 |
+
array(
|
4105 |
+
'label' => __( 'Icon', 'premium-addons-for-elementor' ),
|
4106 |
+
)
|
4107 |
+
);
|
4108 |
+
|
4109 |
+
$left_order = is_rtl() ? '1' : '0';
|
4110 |
+
$right_order = is_rtl() ? '0' : '1';
|
4111 |
+
$default = is_rtl() ? $right_order : $left_order;
|
4112 |
+
|
4113 |
+
$this->add_responsive_control(
|
4114 |
+
'pa_sub_icon_pos',
|
4115 |
+
array(
|
4116 |
+
'label' => __( 'Position', 'premium-addons-for-elementor' ),
|
4117 |
+
'type' => Controls_Manager::CHOOSE,
|
4118 |
+
'options' => array(
|
4119 |
+
$left_order => array(
|
4120 |
+
'title' => __( 'Left', 'premium-addons-for-elementor' ),
|
4121 |
+
'icon' => 'eicon-h-align-left',
|
4122 |
+
),
|
4123 |
+
$right_order => array(
|
4124 |
+
'title' => __( 'Right', 'premium-addons-for-elementor' ),
|
4125 |
+
'icon' => 'eicon-h-align-right',
|
4126 |
+
),
|
4127 |
+
),
|
4128 |
+
'default' => $default,
|
4129 |
+
'toggle' => false,
|
4130 |
+
'selectors' => array(
|
4131 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'order: {{VALUE}}',
|
4132 |
+
),
|
4133 |
+
)
|
4134 |
+
);
|
4135 |
+
|
4136 |
+
$this->add_control(
|
4137 |
+
'sub_item_icon_color',
|
4138 |
+
array(
|
4139 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
4140 |
+
'type' => Controls_Manager::COLOR,
|
4141 |
+
'global' => array(
|
4142 |
+
'default' => Global_Colors::COLOR_PRIMARY,
|
4143 |
+
),
|
4144 |
+
'selectors' => array(
|
4145 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'color: {{VALUE}};',
|
4146 |
+
),
|
4147 |
+
'condition' => array(
|
4148 |
+
'menu_type' => 'custom',
|
4149 |
+
),
|
4150 |
+
)
|
4151 |
+
);
|
4152 |
+
|
4153 |
+
$this->add_responsive_control(
|
4154 |
+
'pa_sub_icon_size',
|
4155 |
+
array(
|
4156 |
+
'label' => __( 'Size', 'premium-addons-for-elementor' ),
|
4157 |
+
'type' => Controls_Manager::SLIDER,
|
4158 |
+
'label_block' => true,
|
4159 |
+
'size_units' => array( 'px' ),
|
4160 |
+
'range' => array(
|
4161 |
+
'px' => array(
|
4162 |
+
'min' => 0,
|
4163 |
+
'max' => 300,
|
4164 |
+
),
|
4165 |
+
),
|
4166 |
+
'selectors' => array(
|
4167 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'font-size: {{SIZE}}{{UNIT}};',
|
4168 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon.dashicons, {{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link img.premium-sub-item-icon, {{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon.premium-lottie-animation' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
|
4169 |
+
),
|
4170 |
+
)
|
4171 |
+
);
|
4172 |
+
|
4173 |
+
$this->add_control(
|
4174 |
+
'sub_item_icon_back_color',
|
4175 |
+
array(
|
4176 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
4177 |
+
'type' => Controls_Manager::COLOR,
|
4178 |
+
'selectors' => array(
|
4179 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'background-color: {{VALUE}};',
|
4180 |
+
),
|
4181 |
+
)
|
4182 |
+
);
|
4183 |
+
|
4184 |
+
$this->add_control(
|
4185 |
+
'sub_item_icon_radius',
|
4186 |
+
array(
|
4187 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
4188 |
+
'type' => Controls_Manager::DIMENSIONS,
|
4189 |
+
'size_units' => array( 'px', 'em', '%' ),
|
4190 |
+
'selectors' => array(
|
4191 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
4192 |
+
),
|
4193 |
+
)
|
4194 |
+
);
|
4195 |
+
|
4196 |
+
$this->add_responsive_control(
|
4197 |
+
'pa_sub_icon_margin',
|
4198 |
+
array(
|
4199 |
+
'label' => __( 'Margin', 'premium-addons-for-elementor' ),
|
4200 |
+
'type' => Controls_Manager::DIMENSIONS,
|
4201 |
+
'size_units' => array( 'px', 'em', '%' ),
|
4202 |
+
'selectors' => array(
|
4203 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4204 |
+
),
|
4205 |
+
)
|
4206 |
+
);
|
4207 |
+
|
4208 |
+
$this->add_responsive_control(
|
4209 |
+
'pa_sub_icon_padding',
|
4210 |
+
array(
|
4211 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
4212 |
+
'type' => Controls_Manager::DIMENSIONS,
|
4213 |
+
'size_units' => array( 'px', 'em', '%' ),
|
4214 |
+
'selectors' => array(
|
4215 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-icon' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4216 |
+
),
|
4217 |
+
)
|
4218 |
+
);
|
4219 |
+
|
4220 |
+
$this->end_controls_tab();
|
4221 |
+
|
4222 |
+
$this->start_controls_tab(
|
4223 |
+
'pa_sub_badge_style',
|
4224 |
+
array(
|
4225 |
+
'label' => __( 'Badge', 'premium-addons-for-elementor' ),
|
4226 |
+
)
|
4227 |
+
);
|
4228 |
+
|
4229 |
+
$this->add_group_control(
|
4230 |
+
Group_Control_Typography::get_type(),
|
4231 |
+
array(
|
4232 |
+
'name' => 'pa_sub_badge_typo',
|
4233 |
+
'selector' => '{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge',
|
4234 |
+
)
|
4235 |
+
);
|
4236 |
+
|
4237 |
+
$this->add_control(
|
4238 |
+
'sub_item_badge_color',
|
4239 |
+
array(
|
4240 |
+
'label' => __( 'Color', 'premium-addons-for-elementor' ),
|
4241 |
+
'type' => Controls_Manager::COLOR,
|
4242 |
+
'selectors' => array(
|
4243 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'color: {{VALUE}};',
|
4244 |
+
),
|
4245 |
+
'condition' => array(
|
4246 |
+
'menu_type' => 'custom',
|
4247 |
+
),
|
4248 |
+
)
|
4249 |
+
);
|
4250 |
+
|
4251 |
+
$this->add_control(
|
4252 |
+
'sub_item_badge_back_color',
|
4253 |
+
array(
|
4254 |
+
'label' => __( 'Background Color', 'premium-addons-for-elementor' ),
|
4255 |
+
'type' => Controls_Manager::COLOR,
|
4256 |
+
'selectors' => array(
|
4257 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'background-color: {{VALUE}};',
|
4258 |
+
),
|
4259 |
+
'condition' => array(
|
4260 |
+
'menu_type' => 'custom',
|
4261 |
+
),
|
4262 |
+
)
|
4263 |
+
);
|
4264 |
+
|
4265 |
+
// TODO: check the all the badges CSS.
|
4266 |
+
$badge_pos = is_rtl() ? 'left' : 'right';
|
4267 |
+
|
4268 |
+
$this->add_responsive_control(
|
4269 |
+
'pa_sub_badge_hor',
|
4270 |
+
array(
|
4271 |
+
'label' => __( 'Horizontal Offset', 'premium-addons-for-elementor' ),
|
4272 |
+
'type' => Controls_Manager::SLIDER,
|
4273 |
+
'label_block' => true,
|
4274 |
+
'size_units' => array( 'px', '%' ),
|
4275 |
+
'range' => array(
|
4276 |
+
'px' => array(
|
4277 |
+
'min' => 0,
|
4278 |
+
'max' => 1000,
|
4279 |
+
),
|
4280 |
+
),
|
4281 |
+
'selectors' => array(
|
4282 |
+
'{{WRAPPER}}:not(.premium-nav-ver) .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}}:not(.premium-nav-ver) .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => $badge_pos . ' : {{SIZE}}{{UNIT}};',
|
4283 |
+
'{{WRAPPER}}.premium-nav-ver.premium-vertical-right .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}}.premium-nav-ver.premium-vertical-right .premium-sub-menu-item .premium-rn-badge' => 'right: {{SIZE}}{{UNIT}};',
|
4284 |
+
'{{WRAPPER}}.premium-nav-ver.premium-vertical-left .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}}.premium-nav-ver.premium-vertical-left .premium-sub-menu-item .premium-rn-badge' => 'left: {{SIZE}}{{UNIT}};',
|
4285 |
+
),
|
4286 |
+
)
|
4287 |
+
);
|
4288 |
+
|
4289 |
+
$this->add_responsive_control(
|
4290 |
+
'pa_sub_badge_ver',
|
4291 |
+
array(
|
4292 |
+
'label' => __( 'Vertical Offset', 'premium-addons-for-elementor' ),
|
4293 |
+
'type' => Controls_Manager::SLIDER,
|
4294 |
+
'label_block' => true,
|
4295 |
+
'size_units' => array( 'px', '%' ),
|
4296 |
+
'range' => array(
|
4297 |
+
'px' => array(
|
4298 |
+
'min' => 0,
|
4299 |
+
'max' => 1000,
|
4300 |
+
),
|
4301 |
+
),
|
4302 |
+
'selectors' => array(
|
4303 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'top: {{SIZE}}{{UNIT}};',
|
4304 |
+
),
|
4305 |
+
)
|
4306 |
+
);
|
4307 |
+
|
4308 |
+
$this->add_group_control(
|
4309 |
+
Group_Control_Border::get_type(),
|
4310 |
+
array(
|
4311 |
+
'name' => 'pa_sub_badge_border',
|
4312 |
+
'selector' => '{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge',
|
4313 |
+
)
|
4314 |
+
);
|
4315 |
+
|
4316 |
+
$this->add_control(
|
4317 |
+
'pa_sub_badge_rad',
|
4318 |
+
array(
|
4319 |
+
'label' => __( 'Border Radius', 'premium-addons-for-elementor' ),
|
4320 |
+
'type' => Controls_Manager::DIMENSIONS,
|
4321 |
+
'size_units' => array( 'px', 'em', '%' ),
|
4322 |
+
'selectors' => array(
|
4323 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge, {{WRAPPER}} .premium-sub-menu-item .premium-rn-badge, {{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}}',
|
4324 |
+
),
|
4325 |
+
)
|
4326 |
+
);
|
4327 |
+
|
4328 |
+
$this->add_responsive_control(
|
4329 |
+
'pa_sub_badge_padding',
|
4330 |
+
array(
|
4331 |
+
'label' => __( 'Padding', 'premium-addons-for-elementor' ),
|
4332 |
+
'type' => Controls_Manager::DIMENSIONS,
|
4333 |
+
'size_units' => array( 'px', 'em', '%' ),
|
4334 |
+
'selectors' => array(
|
4335 |
+
'{{WRAPPER}} .premium-sub-menu-item .premium-sub-menu-link .premium-sub-item-badge,
|
4336 |
+
{{WRAPPER}} .premium-sub-menu-item .premium-rn-badge,
|
4337 |
+
{{WRAPPER}} .premium-mega-content-container .premium-rn-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
4338 |
+
),
|
4339 |
+
)
|
4340 |
+
);
|
4341 |
+
|
4342 |
+
$this->end_controls_tab();
|
4343 |
+
$this->end_controls_tabs();
|
4344 |
+
|
4345 |
+
$this->end_controls_section();
|
4346 |
+
}
|
4347 |
+
|
4348 |
+
/**
|
4349 |
+
* Render Nav Menu widget output on the frontend.
|
4350 |
+
*
|
4351 |
+
* Written in PHP and used to generate the final HTML.
|
4352 |
+
*
|
4353 |
+
* @since 1.0.0
|
4354 |
+
* @access protected
|
4355 |
+
*/
|
4356 |
+
protected function render() {
|
4357 |
+
|
4358 |
+
$settings = $this->get_settings_for_display();
|
4359 |
+
|
4360 |
+
$menu_type = $settings['menu_type'];
|
4361 |
+
|
4362 |
+
$menu_id = 'wordpress_menu' === $menu_type ? $settings['pa_nav_menus'] : false;
|
4363 |
+
|
4364 |
+
$papro_activated = apply_filters( 'papro_activated', false ) && version_compare( PREMIUM_PRO_ADDONS_VERSION, '2.8.9', '>' );
|
4365 |
+
|
4366 |
+
$rn_badges_enabled = ( $papro_activated && 'yes' === $settings['rn_badge_enabled'] ) ? true : false;
|
4367 |
+
|
4368 |
+
if ( 'wordpress_menu' === $menu_type ) {
|
4369 |
+
|
4370 |
+
$is_valid = $this->is_valid_menu( $menu_id );
|
4371 |
+
|
4372 |
+
if ( ! $is_valid ) {
|
4373 |
+
?>
|
4374 |
+
<div class="premium-error-notice">
|
4375 |
+
<?php echo esc_html( __( 'This is an empty menu. Please make sure your menu has items.', 'premium-addons-for-elementor' ) ); ?>
|
4376 |
+
</div>
|
4377 |
+
<?php
|
4378 |
+
|
4379 |
+
return;
|
4380 |
+
}
|
4381 |
+
}
|
4382 |
+
|
4383 |
+
$break_point = 'custom' === $settings['pa_mobile_menu_breakpoint'] ? $settings['pa_custom_breakpoint'] : $settings['pa_mobile_menu_breakpoint'];
|
4384 |
+
|
4385 |
+
$break_point = '' === $break_point ? '1025' : $break_point;
|
4386 |
+
|
4387 |
+
$stretch_dropdown = 'yes' === $settings['pa_toggle_full'] ? true : false;
|
4388 |
+
|
4389 |
+
$is_click = 'click' === $settings['pa_ver_toggle_event'] && 'yes' !== $settings['pa_ver_toggle_open'];
|
4390 |
+
|
4391 |
+
$is_hover = 'hover' === $settings['pa_ver_toggle_event'];
|
4392 |
+
|
4393 |
+
if ( 'wordpress_menu' === $menu_type ) {
|
4394 |
+
|
4395 |
+
$menu_list = $this->get_menu_list();
|
4396 |
+
|
4397 |
+
if ( ! $menu_list ) {
|
4398 |
+
return;
|
4399 |
+
}
|
4400 |
+
}
|
4401 |
+
|
4402 |
+
$div_end = '';
|
4403 |
+
|
4404 |
+
$menu_settings = array(
|
4405 |
+
'breakpoint' => (int) $break_point,
|
4406 |
+
'mobileLayout' => $settings['pa_mobile_menu_layout'],
|
4407 |
+
'mainLayout' => $settings['pa_nav_menu_layout'],
|
4408 |
+
'stretchDropdown' => $stretch_dropdown,
|
4409 |
+
'hoverEffect' => $settings['sub_badge_hv_effects'],
|
4410 |
+
'submenuEvent' => $settings['submenu_event'],
|
4411 |
+
'submenuTrigger' => $settings['submenu_trigger'],
|
4412 |
+
);
|
4413 |
+
|
4414 |
+
if ( 'yes' === $settings['pa_sticky_switcher'] ) {
|
4415 |
+
|
4416 |
+
$sticky_options = array(
|
4417 |
+
'targetId' => $settings['pa_sticky_target'],
|
4418 |
+
'onScroll' => 'yes' === $settings['pa_sticky_on_scroll'] ? true : false,
|
4419 |
+
'disableOn' => $settings['pa_sticky_disabled_on'],
|
4420 |
+
);
|
4421 |
+
|
4422 |
+
$menu_settings['stickyOptions'] = $sticky_options;
|
4423 |
+
}
|
4424 |
+
|
4425 |
+
if ( $rn_badges_enabled ) {
|
4426 |
+
|
4427 |
+
$rn_badges_settings = apply_filters( 'pa_get_random_badges_settings', $settings );
|
4428 |
+
|
4429 |
+
$menu_settings['rn_badges'] = $rn_badges_settings;
|
4430 |
+
}
|
4431 |
+
|
4432 |
+
$is_edit_mode = \Elementor\Plugin::$instance->editor->is_edit_mode();
|
4433 |
+
$hidden_cls = $is_edit_mode ? '' : 'elementor-invisible';
|
4434 |
+
|
4435 |
+
$this->add_render_attribute(
|
4436 |
+
'wrapper',
|
4437 |
+
array(
|
4438 |
+
'data-settings' => json_encode( $menu_settings ),
|
4439 |
+
'class' => array(
|
4440 |
+
$hidden_cls,
|
4441 |
+
'premium-nav-widget-container',
|
4442 |
+
'premium-nav-pointer-' . $settings['pointer'],
|
4443 |
+
),
|
4444 |
+
)
|
4445 |
+
);
|
4446 |
+
|
4447 |
+
if ( $stretch_dropdown ) {
|
4448 |
+
$this->add_render_attribute( 'wrapper', 'class', 'premium-stretch-dropdown' );
|
4449 |
+
}
|
4450 |
+
|
4451 |
+
if ( 'yes' === $settings['pa_ver_toggle_switcher'] && ( $is_click || $is_hover ) ) {
|
4452 |
+
$this->add_render_attribute( 'wrapper', 'class', 'premium-ver-collapsed' );
|
4453 |
+
}
|
4454 |
+
|
4455 |
+
switch ( $settings['pointer'] ) {
|
4456 |
+
case 'underline':
|
4457 |
+
case 'overline':
|
4458 |
+
case 'double-line':
|
4459 |
+
$this->add_render_attribute( 'wrapper', 'class', 'premium-nav-animation-' . $settings['animation_line'] );
|
4460 |
+
break;
|
4461 |
+
case 'framed':
|
4462 |
+
$this->add_render_attribute( 'wrapper', 'class', 'premium-nav-animation-' . $settings['animation_framed'] );
|
4463 |
+
break;
|
4464 |
+
case 'text':
|
4465 |
+
$this->add_render_attribute( 'wrapper', 'class', 'premium-nav-animation-' . $settings['animation_text'] );
|
4466 |
+
break;
|
4467 |
+
case 'background':
|
4468 |
+
$this->add_render_attribute( 'wrapper', 'class', 'premium-nav-animation-' . $settings['animation_background'] );
|
4469 |
+
break;
|
4470 |
+
}
|
4471 |
+
|
4472 |
+
/**
|
4473 |
+
* Hamburger Menu Button.
|
4474 |
+
*/
|
4475 |
+
?>
|
4476 |
+
<div <?php echo wp_kses_post( $this->get_render_attribute_string( 'wrapper' ) ); ?>>
|
4477 |
+
<div class="premium-ver-inner-container">
|
4478 |
+
<div class="premium-hamburger-toggle premium-mobile-menu-icon" role="button" aria-label="Toggle Menu">
|
4479 |
+
<span class="premium-toggle-text">
|
4480 |
+
<?php
|
4481 |
+
Icons_Manager::render_icon( $settings['pa_mobile_toggle_icon'], array( 'aria-hidden' => 'true' ) );
|
4482 |
+
echo esc_html( $settings['pa_mobile_toggle_text'] );
|
4483 |
+
?>
|
4484 |
+
</span>
|
4485 |
+
<span class="premium-toggle-close">
|
4486 |
+
<?php
|
4487 |
+
Icons_Manager::render_icon( $settings['pa_mobile_close_icon'], array( 'aria-hidden' => 'true' ) );
|
4488 |
+
echo esc_html( $settings['pa_mobile_toggle_close'] );
|
4489 |
+
?>
|
4490 |
+
</span>
|
4491 |
+
</div>
|
4492 |
+
<?php
|
4493 |
+
|
4494 |
+
if ( 'yes' === $settings['pa_ver_toggle_switcher'] ) {
|
4495 |
+
$this->add_vertical_toggler();
|
4496 |
+
}
|
4497 |
+
|
4498 |
+
if ( 'wordpress_menu' === $menu_type ) {
|
4499 |
+
$args = array(
|
4500 |
+
'container' => '',
|
4501 |
+
'menu' => $menu_id,
|
4502 |
+
'menu_class' => 'premium-nav-menu premium-main-nav-menu',
|
4503 |
+
'echo' => false,
|
4504 |
+
'fallback_cb' => 'wp_page_menu',
|
4505 |
+
'walker' => new Pa_Nav_Menu_Walker( $settings ),
|
4506 |
+
);
|
4507 |
+
|
4508 |
+
$menu_html = wp_nav_menu( $args );
|
4509 |
+
|
4510 |
+
if ( in_array( $settings['pa_nav_menu_layout'], array( 'hor', 'ver' ), true ) ) {
|
4511 |
+
?>
|
4512 |
+
<div class="premium-nav-menu-container premium-nav-default">
|
4513 |
+
<?php echo $menu_html; ?>
|
4514 |
+
</div>
|
4515 |
+
<?php
|
4516 |
+
}
|
4517 |
+
} else {
|
4518 |
+
?>
|
4519 |
+
<div class="premium-nav-menu-container">
|
4520 |
+
<ul class="premium-nav-menu premium-main-nav-menu">
|
4521 |
+
<?php
|
4522 |
+
$menu_html = $this->get_custom_menu();
|
4523 |
+
echo $menu_html;
|
4524 |
+
?>
|
4525 |
+
</ul>
|
4526 |
+
</div>
|
4527 |
+
<?php
|
4528 |
+
}
|
4529 |
+
|
4530 |
+
if ( 'slide' === $settings['pa_mobile_menu_layout'] || 'slide' === $settings['pa_nav_menu_layout'] ) {
|
4531 |
+
$div_end = '</div>';
|
4532 |
+
?>
|
4533 |
+
<div class="premium-nav-slide-overlay"></div>
|
4534 |
+
<div class="premium-mobile-menu-outer-container">
|
4535 |
+
<div class="premium-mobile-menu-close" role="button" aria-label="Close Menu">
|
4536 |
+
<?php Icons_Manager::render_icon( $settings['pa_mobile_close_icon'], array( 'aria-hidden' => 'true' ) ); ?>
|
4537 |
+
<span class="premium-toggle-close"><?php echo esc_html( $settings['pa_mobile_toggle_close'] ); ?></span>
|
4538 |
+
</div>
|
4539 |
+
<?php
|
4540 |
+
/**
|
4541 |
+
* @param int|bool $menu_id WordPress menu id | false if it's a custom menu.
|
4542 |
+
* @param array $settings menu settings.
|
4543 |
+
*/
|
4544 |
+
do_action( 'pa_slide_menu_top_template', $menu_id, $settings );
|
4545 |
+
}
|
4546 |
+
|
4547 |
+
if ( 'wordpress_menu' === $menu_type ) {
|
4548 |
+
?>
|
4549 |
+
<div class="premium-mobile-menu-container">
|
4550 |
+
<?php echo $this->mobile_menu_filter( $menu_html, $menu_id ); ?>
|
4551 |
+
</div>
|
4552 |
+
<?php
|
4553 |
+
|
4554 |
+
} else {
|
4555 |
+
?>
|
4556 |
+
<div class="premium-mobile-menu-container">
|
4557 |
+
<ul class="premium-mobile-menu premium-main-mobile-menu premium-main-nav-menu">
|
4558 |
+
<?php
|
4559 |
+
echo $menu_html;
|
4560 |
+
?>
|
4561 |
+
</ul>
|
4562 |
+
</div>
|
4563 |
+
<?php
|
4564 |
+
}
|
4565 |
+
|
4566 |
+
if ( 'slide' === $settings['pa_mobile_menu_layout'] || 'slide' === $settings['pa_nav_menu_layout'] ) {
|
4567 |
+
do_action( 'pa_slide_menu_bottom_template', $menu_id, $settings );
|
4568 |
+
}
|
4569 |
+
|
4570 |
+
echo wp_kses_post( $div_end );
|
4571 |
+
?>
|
4572 |
+
</div>
|
4573 |
+
</div>
|
4574 |
+
<?php
|
4575 |
+
|
4576 |
+
}
|
4577 |
+
|
4578 |
+
/**
|
4579 |
+
* Add Collapsed Menu.
|
4580 |
+
*
|
4581 |
+
* @access private
|
4582 |
+
* @since 4.9.15
|
4583 |
+
*/
|
4584 |
+
private function add_vertical_toggler() {
|
4585 |
+
|
4586 |
+
$settings = $this->get_settings_for_display();
|
4587 |
+
$id = $this->get_id();
|
4588 |
+
|
4589 |
+
?>
|
4590 |
+
<div class="premium-ver-toggler premium-ver-toggler-<?php echo esc_attr( $id ); ?>">
|
4591 |
+
<div class="premium-ver-toggler-title">
|
4592 |
+
<span class="premium-ver-title-icon">
|
4593 |
+
<?php Icons_Manager::render_icon( $settings['pa_ver_toggle_main_icon'], array( 'aria-hidden' => 'true' ) ); ?>
|
4594 |
+
</span>
|
4595 |
+
<span class="premium-ver-toggler-txt">
|
4596 |
+
<?php echo esc_html( $settings['pa_ver_toggle_txt'] ); ?>
|
4597 |
+
</span>
|
4598 |
+
</div>
|
4599 |
+
<div class="premium-ver-toggler-btn">
|
4600 |
+
<span class="premium-ver-open">
|
4601 |
+
<?php Icons_Manager::render_icon( $settings['pa_ver_toggle_toggle_icon'], array( 'aria-hidden' => 'true' ) ); ?>
|
4602 |
+
</span>
|
4603 |
+
<?php if ( 'always' !== $settings['pa_ver_toggle_event'] ) : ?>
|
4604 |
+
<span class="premium-ver-close">
|
4605 |
+
<?php Icons_Manager::render_icon( $settings['pa_ver_toggle_close_icon'], array( 'aria-hidden' => 'true' ) ); ?>
|
4606 |
+
</span>
|
4607 |
+
<?php endif; ?>
|
4608 |
+
</div>
|
4609 |
+
</div>
|
4610 |
+
<?php
|
4611 |
+
|
4612 |
+
}
|
4613 |
+
|
4614 |
+
/**
|
4615 |
+
* Is Valid Menu.
|
4616 |
+
*
|
4617 |
+
* @access private
|
4618 |
+
* @since 4.9.10
|
4619 |
+
*
|
4620 |
+
* @param string|int $id menu id.
|
4621 |
+
*
|
4622 |
+
* @return bool true if the menu has items.
|
4623 |
+
*/
|
4624 |
+
private function is_valid_menu( $id ) {
|
4625 |
+
|
4626 |
+
$is_valid = false;
|
4627 |
+
|
4628 |
+
$item_count = wp_get_nav_menu_object( $id )->count;
|
4629 |
+
|
4630 |
+
if ( 0 < $item_count ) {
|
4631 |
+
$is_valid = true;
|
4632 |
+
}
|
4633 |
+
|
4634 |
+
return $is_valid;
|
4635 |
+
}
|
4636 |
+
|
4637 |
+
private function mobile_menu_filter( $menu_html, $menu_id ) {
|
4638 |
+
|
4639 |
+
// Increment the mobile menu id & change its classes to mobile menu classes.
|
4640 |
+
$slug = 'menu-' . wp_get_nav_menu_object( $menu_id )->slug;
|
4641 |
+
$search = array( 'id="' . $slug . '"', 'class="premium-nav-menu premium-main-nav-menu"' );
|
4642 |
+
$replace = array( 'id="' . $slug . '-1"', 'class="premium-mobile-menu premium-main-mobile-menu premium-main-nav-menu"' );
|
4643 |
+
|
4644 |
+
return str_replace( $search, $replace, $menu_html );
|
4645 |
+
}
|
4646 |
+
|
4647 |
+
/**
|
4648 |
+
* Get Custom Menu.
|
4649 |
+
*
|
4650 |
+
* @access private
|
4651 |
+
* @since 4.9.4
|
4652 |
+
*/
|
4653 |
+
private function get_custom_menu() {
|
4654 |
+
|
4655 |
+
$settings = $this->get_settings_for_display();
|
4656 |
+
|
4657 |
+
$papro_activated = apply_filters( 'papro_activated', false );
|
4658 |
+
|
4659 |
+
$badge_effect = $settings['sub_badge_hv_effects'];
|
4660 |
+
|
4661 |
+
if ( ! $papro_activated ) {
|
4662 |
+
return;
|
4663 |
+
}
|
4664 |
+
|
4665 |
+
$menu_items = $settings['menu_items'];
|
4666 |
+
|
4667 |
+
$is_sub_menu = false;
|
4668 |
+
$i = 0;
|
4669 |
+
$is_child = false;
|
4670 |
+
$is_link = false;
|
4671 |
+
$html_output = '';
|
4672 |
+
|
4673 |
+
foreach ( $menu_items as $index => $item ) {
|
4674 |
+
|
4675 |
+
$item_link = $this->get_repeater_setting_key( 'link', 'menu_items', $index );
|
4676 |
+
|
4677 |
+
if ( ! empty( $item['link']['url'] ) ) {
|
4678 |
+
|
4679 |
+
$this->add_link_attributes( $item_link, $item['link'] );
|
4680 |
+
}
|
4681 |
+
|
4682 |
+
$this->add_render_attribute(
|
4683 |
+
'menu-item-' . $index,
|
4684 |
+
array(
|
4685 |
+
// 'id' => 'premium-nav-menu-item-' . $item['_id'],
|
4686 |
+
'class' => array(
|
4687 |
+
'menu-item',
|
4688 |
+
'premium-nav-menu-item',
|
4689 |
+
'elementor-repeater',
|
4690 |
+
'elementor-repeater-item-' . $item['_id'],
|
4691 |
+
),
|
4692 |
+
)
|
4693 |
+
);
|
4694 |
+
|
4695 |
+
if ( 'submenu' === $item['item_type'] ) {
|
4696 |
+
|
4697 |
+
if ( 'link' === $item['menu_content_type'] ) {
|
4698 |
+
|
4699 |
+
// If no submenu items was rendered before.
|
4700 |
+
if ( false === $is_child ) {
|
4701 |
+
$html_output .= "<ul class='premium-sub-menu'>";
|
4702 |
+
$is_link = true;
|
4703 |
+
}
|
4704 |
+
|
4705 |
+
$this->add_render_attribute( 'menu-item-' . $index, 'class', 'premium-sub-menu-item' );
|
4706 |
+
|
4707 |
+
if ( 'yes' === $item['badge_switcher'] ) {
|
4708 |
+
$this->add_render_attribute( 'menu-item-' . $index, 'class', 'has-pa-badge' );
|
4709 |
+
|
4710 |
+
if ( '' !== $badge_effect ) {
|
4711 |
+
$this->add_render_attribute( 'menu-item-' . $index, 'class', 'premium-badge-' . $badge_effect );
|
4712 |
+
}
|
4713 |
+
}
|
4714 |
+
|
4715 |
+
$html_output .= '<li ' . $this->get_render_attribute_string( 'menu-item-' . $index ) . '>';
|
4716 |
+
|
4717 |
+
$html_output .= '<a ' . $this->get_render_attribute_string( $item_link ) . " class='premium-menu-link premium-sub-menu-link'>";
|
4718 |
+
|
4719 |
+
$html_output .= $this->get_icon_html( $item, 'sub-' );
|
4720 |
+
|
4721 |
+
$html_output .= $item['text'];
|
4722 |
+
|
4723 |
+
$html_output .= $this->get_badge_html( $item, 'sub-' );
|
4724 |
+
|
4725 |
+
$html_output .= '</a>';
|
4726 |
+
$html_output .= '</li>';
|
4727 |
+
} else {
|
4728 |
+
|
4729 |
+
$this->add_render_attribute(
|
4730 |
+
'menu-content-item-' . $item['_id'],
|
4731 |
+
array(
|
4732 |
+
// 'id' => 'premium-mega-content-' . $item['_id'],
|
4733 |
+
'class' => 'premium-mega-content-container',
|
4734 |
+
)
|
4735 |
+
);
|
4736 |
+
|
4737 |
+
if ( 'yes' === $item['section_position'] ) {
|
4738 |
+
$this->add_render_attribute( 'menu-content-item-' . $item['_id'], 'class', 'premium-mega-content-centered' );
|
4739 |
+
}
|
4740 |
+
|
4741 |
+
$html_output .= '<div ' . $this->get_render_attribute_string( 'menu-content-item-' . $item['_id'] ) . '>';
|
4742 |
+
|
4743 |
+
$temp_id = empty( $item['submenu_item'] ) ? $item['live_temp_content'] : $item['submenu_item'];
|
4744 |
+
$html_output .= $this->getTemplateInstance()->get_template_content( $temp_id ); // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
4745 |
+
$html_output .= '</div>';
|
4746 |
+
|
4747 |
+
}
|
4748 |
+
|
4749 |
+
$is_child = true;
|
4750 |
+
$is_sub_menu = true;
|
4751 |
+
|
4752 |
+
} else {
|
4753 |
+
|
4754 |
+
$next_item_exists = array_key_exists( $index + 1, $menu_items );
|
4755 |
+
$next_item_is_child = $next_item_exists && 'submenu' === $menu_items[ $index + 1 ]['item_type'];
|
4756 |
+
|
4757 |
+
if ( $next_item_is_child ) {
|
4758 |
+
$this->add_render_attribute( 'menu-item-' . $index, 'class', 'menu-item-has-children' );
|
4759 |
+
}
|
4760 |
+
|
4761 |
+
if ( 'yes' === $item['badge_switcher'] ) {
|
4762 |
+
$this->add_render_attribute( 'menu-item-' . $index, 'class', 'has-pa-badge' );
|
4763 |
+
}
|
4764 |
+
|
4765 |
+
if ( 'yes' === $item['section_full_width'] ) {
|
4766 |
+
$this->add_render_attribute( 'menu-item-' . $index, 'data-full-width', 'true' );
|
4767 |
+
}
|
4768 |
+
|
4769 |
+
if ( $next_item_exists ) {
|
4770 |
+
if ( 'submenu' === $menu_items[ $index + 1 ]['item_type'] && 'custom_content' === $menu_items[ $index + 1 ]['menu_content_type'] ) {
|
4771 |
+
$this->add_render_attribute( 'menu-item-' . $index, 'class', 'premium-mega-nav-item' );
|
4772 |
+
}
|
4773 |
+
}
|
4774 |
+
|
4775 |
+
$is_child = false;
|
4776 |
+
|
4777 |
+
// If we need to create a new main item.
|
4778 |
+
if ( true === $is_sub_menu ) {
|
4779 |
+
$is_sub_menu = false;
|
4780 |
+
|
4781 |
+
if ( $is_link ) {
|
4782 |
+
$html_output .= '</ul>';
|
4783 |
+
$is_link = false;
|
4784 |
+
}
|
4785 |
+
|
4786 |
+
$html_output .= '</li>';
|
4787 |
+
}
|
4788 |
+
|
4789 |
+
$html_output .= '<li ' . $this->get_render_attribute_string( 'menu-item-' . $index ) . '>';
|
4790 |
+
|
4791 |
+
$html_output .= '<a ' . $this->get_render_attribute_string( $item_link ) . " class='premium-menu-link premium-menu-link-parent'>";
|
4792 |
+
|
4793 |
+
$html_output .= $this->get_icon_html( $item );
|
4794 |
+
|
4795 |
+
$html_output .= $item['text'];
|
4796 |
+
|
4797 |
+
if ( array_key_exists( $index + 1, $menu_items ) ) {
|
4798 |
+
$has_icon = ! empty( $settings['submenu_icon']['value'] );
|
4799 |
+
|
4800 |
+
if ( 'submenu' === $menu_items[ $index + 1 ]['item_type'] && $has_icon ) {
|
4801 |
+
$icon_class = 'premium-dropdown-icon ' . $settings['submenu_icon']['value'];
|
4802 |
+
$html_output .= sprintf( '<i class="%1$s"></i>', $icon_class );
|
4803 |
+
}
|
4804 |
+
}
|
4805 |
+
|
4806 |
+
$html_output .= $this->get_badge_html( $item );
|
4807 |
+
|
4808 |
+
$html_output .= '</a>';
|
4809 |
+
|
4810 |
+
}
|
4811 |
+
|
4812 |
+
?>
|
4813 |
+
|
4814 |
+
<?php
|
4815 |
+
|
4816 |
+
}
|
4817 |
+
|
4818 |
+
return $html_output; // phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
|
4819 |
+
}
|
4820 |
+
|
4821 |
+
/**
|
4822 |
+
* Get Icon HTML.
|
4823 |
+
*
|
4824 |
+
* @access private
|
4825 |
+
* @since 4.9.4
|
4826 |
+
*
|
4827 |
+
* @param array $item repeater item.
|
4828 |
+
* @param string $type type.
|
4829 |
+
*
|
4830 |
+
* @return string
|
4831 |
+
*/
|
4832 |
+
private function get_icon_html( $item, $type = '' ) {
|
4833 |
+
|
4834 |
+
$html = '';
|
4835 |
+
|
4836 |
+
if ( 'yes' !== $item['icon_switcher'] ) {
|
4837 |
+
return '';
|
4838 |
+
}
|
4839 |
+
|
4840 |
+
$class = 'premium-' . $type . 'item-icon ';
|
4841 |
+
|
4842 |
+
if ( 'icon' === $item['icon_type'] ) {
|
4843 |
+
|
4844 |
+
$icon_class = $class . $item['item_icon']['value'];
|
4845 |
+
$html .= sprintf( '<i class="%1$s"></i>', $icon_class );
|
4846 |
+
|
4847 |
+
} elseif ( 'image' === $item['icon_type'] ) {
|
4848 |
+
|
4849 |
+
$html .= '<img class="' . $class . '" src="' . $item['item_image']['url'] . '" alt="' . Control_Media::get_image_alt( $item['item_image'] ) . '">';
|
4850 |
+
|
4851 |
+
} else {
|
4852 |
+
|
4853 |
+
$html .= '<div class="premium-lottie-animation ' . $class . '" data-lottie-url="' . $item['lottie_url'] . '" data-lottie-loop="true"></div>';
|
4854 |
+
|
4855 |
+
}
|
4856 |
+
|
4857 |
+
return $html;
|
4858 |
+
|
4859 |
+
}
|
4860 |
+
|
4861 |
+
/**
|
4862 |
+
* Get Badge HTML.
|
4863 |
+
*
|
4864 |
+
* @access private
|
4865 |
+
* @since 4.9.4
|
4866 |
+
*
|
4867 |
+
* @param array $item repeater item.
|
4868 |
+
* @param string $type type.
|
4869 |
+
*
|
4870 |
+
* @return string
|
4871 |
+
*/
|
4872 |
+
private function get_badge_html( $item, $type = '' ) {
|
4873 |
+
|
4874 |
+
if ( 'yes' !== $item['badge_switcher'] ) {
|
4875 |
+
return '';
|
4876 |
+
}
|
4877 |
+
|
4878 |
+
$class = 'premium-' . $type . 'item-badge';
|
4879 |
+
|
4880 |
+
$html = '<span class="' . $class . '">' . wp_kses_post( $item['badge_text'] ) . '</span>';
|
4881 |
+
|
4882 |
+
return $html;
|
4883 |
+
|
4884 |
+
}
|
4885 |
+
}
|