Version Description
- Tweak: Added Section IDs option beside Elementor Templates to Premium Vertical Scroll widget.
- Tweak: Added Mute option to Premium Video Box widget.
Download this release
Release Info
Developer | leap13 |
Plugin | Premium Addons for Elementor |
Version | 2.7.8 |
Comparing to | |
See all releases |
Code changes from version 2.7.7 to 2.7.8
- admin/settings/version-control.php +1 -1
- assets/js/premium-addons.js +23 -19
- premium-addons-for-elementor.php +3 -3
- readme.txt +7 -1
- widgets/premium-videobox.php +20 -4
- widgets/premium-vscroll.php +82 -41
admin/settings/version-control.php
CHANGED
@@ -79,7 +79,7 @@ class PA_Version_Control {
|
|
79 |
<tr class="pa-roll-row">
|
80 |
<th>Rollback Version</th>
|
81 |
<td>
|
82 |
-
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.7.
|
83 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
84 |
</td>
|
85 |
</tr>
|
79 |
<tr class="pa-roll-row">
|
80 |
<th>Rollback Version</th>
|
81 |
<td>
|
82 |
+
<div><?php echo sprintf( '<a target="_blank" href="%s" class="button pa-btn pa-rollback-button elementor-button-spinner">Reinstall Version 2.7.7</a>', wp_nonce_url( admin_url( 'admin-post.php?action=premium_addons_rollback' ), 'premium_addons_rollback' ) ); ?> </div>
|
83 |
<p class="pa-roll-desc"><span>Warning: Please backup your database before making the rollback.</span></p>
|
84 |
</td>
|
85 |
</tr>
|
assets/js/premium-addons.js
CHANGED
@@ -31,14 +31,13 @@
|
|
31 |
'visibility': 'visible'
|
32 |
} );
|
33 |
setTimeout(function(){
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
},600);
|
43 |
});
|
44 |
};
|
@@ -426,6 +425,7 @@
|
|
426 |
var self = this,
|
427 |
$window = $( window ),
|
428 |
$instance = $selector,
|
|
|
429 |
$htmlBody = $( 'html, body' ),
|
430 |
$itemsList = $( '.premium-vscroll-dot-item', $instance ),
|
431 |
$menuItems = $( '.premium-vscroll-nav-item', $instance ),
|
@@ -518,7 +518,11 @@
|
|
518 |
} );
|
519 |
if ( settings.fullSection ) {
|
520 |
var vSection = document.getElementById($instance.attr('id'));
|
521 |
-
|
|
|
|
|
|
|
|
|
522 |
}
|
523 |
|
524 |
for ( var section in sections ) {
|
@@ -669,8 +673,9 @@
|
|
669 |
}
|
670 |
|
671 |
var $target = $( event.target ),
|
672 |
-
|
673 |
-
$
|
|
|
674 |
sectionId = $section.attr( 'id' ),
|
675 |
offset = 0,
|
676 |
newSectionId = false,
|
@@ -681,7 +686,6 @@
|
|
681 |
windowScrollTop = $window.scrollTop(),
|
682 |
deviceType = $( 'body' ).data('elementor-device-mode'),
|
683 |
dotIndex = $('.premium-vscroll-dot-item.active').index();
|
684 |
-
|
685 |
if('mobile' === deviceType || 'tablet' === deviceType ) {
|
686 |
$(".premium-vscroll-tooltip").hide();
|
687 |
if( dotIndex === $itemsList.length - 1 && ! $vTarget ) {
|
@@ -721,9 +725,8 @@
|
|
721 |
newSectionId = nextSectionId;
|
722 |
}
|
723 |
}
|
724 |
-
|
725 |
if ( newSectionId ) {
|
726 |
-
|
727 |
$(".premium-vscroll-dots, .premium-vscroll-nav-menu").removeClass('premium-vscroll-dots-hide');
|
728 |
event.preventDefault();
|
729 |
offset = sections[newSectionId].offset - settings.offset;
|
@@ -738,13 +741,14 @@
|
|
738 |
isScrolling = false;
|
739 |
} );
|
740 |
} else {
|
741 |
-
|
742 |
-
|
743 |
-
|
|
|
744 |
}
|
745 |
} else if('up' === direction) {
|
746 |
-
if( $
|
747 |
-
|
748 |
}
|
749 |
}
|
750 |
}
|
31 |
'visibility': 'visible'
|
32 |
} );
|
33 |
setTimeout(function(){
|
34 |
+
vidSrc = videoBoxElement.find("iframe").attr('src');
|
35 |
+
checkRel = vidSrc.indexOf('rel=0');
|
36 |
+
// if( -1 !== checkRel ) {
|
37 |
+
// videoBoxElement.find("iframe").attr('src', videoBoxElement.find("iframe").attr('src') + '&autoplay=1');
|
38 |
+
// } else {
|
39 |
+
videoBoxElement.find("iframe").attr('src', videoBoxElement.find("iframe").attr('src') + '&autoplay=1');
|
40 |
+
// }
|
|
|
41 |
},600);
|
42 |
});
|
43 |
};
|
425 |
var self = this,
|
426 |
$window = $( window ),
|
427 |
$instance = $selector,
|
428 |
+
checkTemps = $selector.find('.premium-vscroll-sections-wrap').length,
|
429 |
$htmlBody = $( 'html, body' ),
|
430 |
$itemsList = $( '.premium-vscroll-dot-item', $instance ),
|
431 |
$menuItems = $( '.premium-vscroll-nav-item', $instance ),
|
518 |
} );
|
519 |
if ( settings.fullSection ) {
|
520 |
var vSection = document.getElementById($instance.attr('id'));
|
521 |
+
if( checkTemps ){
|
522 |
+
document.addEventListener?(vSection.addEventListener("wheel",self.onWheel,!1)):vSection.attachEvent("onmousewheel",self.onWheel);
|
523 |
+
} else {
|
524 |
+
document.addEventListener?(document.addEventListener("wheel",self.onWheel,!1)):document.attachEvent("onmousewheel",self.onWheel);
|
525 |
+
}
|
526 |
}
|
527 |
|
528 |
for ( var section in sections ) {
|
673 |
}
|
674 |
|
675 |
var $target = $( event.target ),
|
676 |
+
sectionSelector = checkTemps ? '.premium-vscroll-temp' : '.elementor-top-section',
|
677 |
+
$section = $target.closest( sectionSelector ),
|
678 |
+
$vTarget = $instance.visible(true,false,'vertical'),
|
679 |
sectionId = $section.attr( 'id' ),
|
680 |
offset = 0,
|
681 |
newSectionId = false,
|
686 |
windowScrollTop = $window.scrollTop(),
|
687 |
deviceType = $( 'body' ).data('elementor-device-mode'),
|
688 |
dotIndex = $('.premium-vscroll-dot-item.active').index();
|
|
|
689 |
if('mobile' === deviceType || 'tablet' === deviceType ) {
|
690 |
$(".premium-vscroll-tooltip").hide();
|
691 |
if( dotIndex === $itemsList.length - 1 && ! $vTarget ) {
|
725 |
newSectionId = nextSectionId;
|
726 |
}
|
727 |
}
|
728 |
+
|
729 |
if ( newSectionId ) {
|
|
|
730 |
$(".premium-vscroll-dots, .premium-vscroll-nav-menu").removeClass('premium-vscroll-dots-hide');
|
731 |
event.preventDefault();
|
732 |
offset = sections[newSectionId].offset - settings.offset;
|
741 |
isScrolling = false;
|
742 |
} );
|
743 |
} else {
|
744 |
+
var $lastselector = checkTemps ? $instance : $('#' + sectionId);
|
745 |
+
if('down' === direction ) {
|
746 |
+
if( ( $lastselector.offset().top + $lastselector.innerHeight() ) - $(document).scrollTop() > 600 ) {
|
747 |
+
$(".premium-vscroll-dots, .premium-vscroll-nav-menu").addClass('premium-vscroll-dots-hide');
|
748 |
}
|
749 |
} else if('up' === direction) {
|
750 |
+
if( $lastselector.offset().top - $(document).scrollTop() > 200 ) {
|
751 |
+
$(".premium-vscroll-dots, .premium-vscroll-nav-menu").addClass('premium-vscroll-dots-hide');
|
752 |
}
|
753 |
}
|
754 |
}
|
premium-addons-for-elementor.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
Description: Premium Addons Plugin Includes 20+ premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
-
Version: 2.7.
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
@@ -22,12 +22,12 @@ if (! function_exists('add_action')) {
|
|
22 |
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
-
define('PREMIUM_ADDONS_VERSION', '2.7.
|
26 |
define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
|
27 |
define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
|
28 |
define('PREMIUM_ADDONS_FILE', __FILE__);
|
29 |
define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
|
30 |
-
define('PREMIUM_ADDONS_STABLE_VERSION', '2.7.
|
31 |
|
32 |
if( ! class_exists('Premium_Addons_Elementor') ) {
|
33 |
/*
|
3 |
Plugin Name: Premium Addons for Elementor
|
4 |
Description: Premium Addons Plugin Includes 20+ premium widgets for Elementor Page Builder.
|
5 |
Plugin URI: https://premiumaddons.com
|
6 |
+
Version: 2.7.8
|
7 |
Author: Leap13
|
8 |
Author URI: http://leap13.com/
|
9 |
Text Domain: premium-addons-for-elementor
|
22 |
if ( ! defined('ABSPATH') ) exit; // No access of directly access
|
23 |
|
24 |
|
25 |
+
define('PREMIUM_ADDONS_VERSION', '2.7.8');
|
26 |
define('PREMIUM_ADDONS_URL', plugins_url('/', __FILE__));
|
27 |
define('PREMIUM_ADDONS_PATH', plugin_dir_path(__FILE__));
|
28 |
define('PREMIUM_ADDONS_FILE', __FILE__);
|
29 |
define('PREMIUM_ADDONS_BASENAME', plugin_basename(__FILE__));
|
30 |
+
define('PREMIUM_ADDONS_STABLE_VERSION', '2.7.7');
|
31 |
|
32 |
if( ! class_exists('Premium_Addons_Elementor') ) {
|
33 |
/*
|
readme.txt
CHANGED
@@ -5,7 +5,7 @@ Donate link: http://premiumaddons.com
|
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9.8
|
7 |
Requires PHP: 5.4
|
8 |
-
Stable tag: 2.7.
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
@@ -137,6 +137,12 @@ Premium Addons for Elementor is 100% Ads Free, Ads can only be detected from You
|
|
137 |
|
138 |
== Changelog ==
|
139 |
|
|
|
|
|
|
|
|
|
|
|
|
|
140 |
= 2.7.7 =
|
141 |
|
142 |
- Tweak: Added hover color option to trigger button icon and text in Premium Modal Box widget.
|
5 |
Requires at least: 4.5
|
6 |
Tested up to: 4.9.8
|
7 |
Requires PHP: 5.4
|
8 |
+
Stable tag: 2.7.8
|
9 |
License: GPL v3.0
|
10 |
License URI: https://opensource.org/licenses/GPL-3.0
|
11 |
|
137 |
|
138 |
== Changelog ==
|
139 |
|
140 |
+
= 2.7.8 =
|
141 |
+
|
142 |
+
- Tweak: Added Section IDs option beside Elementor Templates to Premium Vertical Scroll widget.
|
143 |
+
- Tweak: Added Mute option to Premium Video Box widget.
|
144 |
+
|
145 |
+
|
146 |
= 2.7.7 =
|
147 |
|
148 |
- Tweak: Added hover color option to trigger button icon and text in Premium Modal Box widget.
|
widgets/premium-videobox.php
CHANGED
@@ -112,6 +112,18 @@ class Premium_Videobox extends Widget_Base {
|
|
112 |
]
|
113 |
);
|
114 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
/*End Image Settings Section*/
|
116 |
$this->end_controls_section();
|
117 |
|
@@ -522,8 +534,12 @@ class Premium_Videobox extends Widget_Base {
|
|
522 |
|
523 |
$video_embed = $settings['premium_video_box_video_embed'];
|
524 |
|
525 |
-
$
|
526 |
-
|
|
|
|
|
|
|
|
|
527 |
|
528 |
<div class="premium-video-box-container" id="premium-video-box-container-<?php echo esc_attr( $this->get_id() ); ?>">
|
529 |
<div class="premium-video-box-image-container">
|
@@ -542,10 +558,10 @@ class Premium_Videobox extends Widget_Base {
|
|
542 |
<div class="premium-video-box-video-container">
|
543 |
<?php if ( $video_type === 'youtube'){ ?>
|
544 |
<?php if ( $video_url_type === 'id' && !empty( $video_id ) ) : ?>
|
545 |
-
<iframe src="https://www.youtube.com/embed/<?php echo $video_id . $
|
546 |
</iframe>
|
547 |
<?php elseif ( $video_url_type === 'embed' && !empty( $video_embed ) ) : ?>
|
548 |
-
<iframe src="<?php echo $video_embed . $
|
549 |
</iframe>
|
550 |
<?php endif; ?>
|
551 |
<?php } elseif ( $video_type === 'vimeo'){ ?>
|
112 |
]
|
113 |
);
|
114 |
|
115 |
+
/*Muted Videos*/
|
116 |
+
$this->add_control('premium_video_box_mute',
|
117 |
+
[
|
118 |
+
'label' => esc_html__('Mute', 'premium-addons-for-elementor'),
|
119 |
+
'type' => Controls_Manager::SWITCHER,
|
120 |
+
'description' => esc_html__('This will play the video muted'),
|
121 |
+
'condition' => [
|
122 |
+
'premium_video_box_video_type' => 'youtube',
|
123 |
+
]
|
124 |
+
]
|
125 |
+
);
|
126 |
+
|
127 |
/*End Image Settings Section*/
|
128 |
$this->end_controls_section();
|
129 |
|
534 |
|
535 |
$video_embed = $settings['premium_video_box_video_embed'];
|
536 |
|
537 |
+
$options = '?rel=';
|
538 |
+
$options .= 'yes' == $settings['premium_video_box_related_video'] ? '1' : '0';
|
539 |
+
$options .= '&mute=';
|
540 |
+
$options .= 'yes' == $settings['premium_video_box_mute'] ? '1' : '0';
|
541 |
+
|
542 |
+
?>
|
543 |
|
544 |
<div class="premium-video-box-container" id="premium-video-box-container-<?php echo esc_attr( $this->get_id() ); ?>">
|
545 |
<div class="premium-video-box-image-container">
|
558 |
<div class="premium-video-box-video-container">
|
559 |
<?php if ( $video_type === 'youtube'){ ?>
|
560 |
<?php if ( $video_url_type === 'id' && !empty( $video_id ) ) : ?>
|
561 |
+
<iframe src="https://www.youtube.com/embed/<?php echo $video_id . $options; ?>" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen>
|
562 |
</iframe>
|
563 |
<?php elseif ( $video_url_type === 'embed' && !empty( $video_embed ) ) : ?>
|
564 |
+
<iframe src="<?php echo $video_embed . $options; ?>" frameborder="0" gesture="media" allow="encrypted-media" allowfullscreen>
|
565 |
</iframe>
|
566 |
<?php endif; ?>
|
567 |
<?php } elseif ( $video_type === 'vimeo'){ ?>
|
widgets/premium-vscroll.php
CHANGED
@@ -55,9 +55,22 @@ class Premium_Vscroll extends Widget_Base {
|
|
55 |
]
|
56 |
);
|
57 |
|
58 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
$
|
61 |
[
|
62 |
'label' => esc_html__( 'Elementor Template', 'premium-addons-for-elementor' ),
|
63 |
'type' => Controls_Manager::SELECT2,
|
@@ -70,9 +83,51 @@ class Premium_Vscroll extends Widget_Base {
|
|
70 |
[
|
71 |
'label' => esc_html__( 'Sections', 'premium-addons-for-elementor' ),
|
72 |
'type' => Controls_Manager::REPEATER,
|
73 |
-
'fields' => array_values( $
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
74 |
]
|
75 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
76 |
|
77 |
$this->end_controls_section();
|
78 |
|
@@ -160,7 +215,7 @@ class Premium_Vscroll extends Widget_Base {
|
|
160 |
|
161 |
$this->add_control('nav_menu_repeater',
|
162 |
[
|
163 |
-
'label' => esc_html__( '
|
164 |
'type' => Controls_Manager::REPEATER,
|
165 |
'fields' => array_values( $nav_repeater->get_controls() ),
|
166 |
'title_field' => '{{{ nav_menu_item }}}',
|
@@ -170,25 +225,6 @@ class Premium_Vscroll extends Widget_Base {
|
|
170 |
]
|
171 |
);
|
172 |
|
173 |
-
$this->add_control('dots_tooltips_switcher',
|
174 |
-
[
|
175 |
-
'label' => esc_html__('Dots Tooltips', 'premium-addons-for-elementor'),
|
176 |
-
'type' => Controls_Manager::SWITCHER,
|
177 |
-
'default' => 'yes'
|
178 |
-
]
|
179 |
-
);
|
180 |
-
|
181 |
-
$this->add_control('dots_tooltips',
|
182 |
-
[
|
183 |
-
'label' => esc_html__('Dots Tooltips Text', 'premium-addons-for-elementor'),
|
184 |
-
'type' => Controls_Manager::TEXT,
|
185 |
-
'description' => esc_html__('Add text for each navigation dot separated by \',\'','premium-addons-for-elementor'),
|
186 |
-
'condition' => [
|
187 |
-
'dots_tooltips_switcher' => 'yes'
|
188 |
-
]
|
189 |
-
]
|
190 |
-
);
|
191 |
-
|
192 |
$this->add_control('navigation_dots_pos',
|
193 |
[
|
194 |
'label' => esc_html__('Dots Horizontal Position', 'premium-addons-for-elementor'),
|
@@ -687,6 +723,8 @@ class Premium_Vscroll extends Widget_Base {
|
|
687 |
|
688 |
$this->add_render_attribute( 'vertical_scroll_sections_wrap', 'id', 'premium-vscroll-sections-wrap-' . $id );
|
689 |
|
|
|
|
|
690 |
$vscroll_settings = [
|
691 |
'id' => $id,
|
692 |
'speed' => !empty( $settings['scroll_speed'] ) ? $settings['scroll_speed'] * 1000 : 700,
|
@@ -697,8 +735,10 @@ class Premium_Vscroll extends Widget_Base {
|
|
697 |
'fullSection'=> 'yes' == $settings['full_section'] ? true : false
|
698 |
];
|
699 |
|
700 |
-
$templates = $settings['section_repeater'];
|
701 |
|
|
|
|
|
702 |
$nav_items = $settings['nav_menu_repeater'];
|
703 |
|
704 |
?>
|
@@ -707,7 +747,7 @@ class Premium_Vscroll extends Widget_Base {
|
|
707 |
<?php if ('yes' == $settings['nav_menu_switch'] ) : ?>
|
708 |
<ul <?php echo $this->get_render_attribute_string('vertical_scroll_menu'); ?>>
|
709 |
<?php foreach( $nav_items as $index => $item ) : ?>
|
710 |
-
<li data-menuanchor="<?php echo 'section_' . $id . $index; ?>" class="premium-vscroll-nav-item"><div class="premium-vscroll-nav-link"><?php echo $item['nav_menu_item'] ?></div></li>
|
711 |
<?php endforeach; ?>
|
712 |
</ul>
|
713 |
<?php endif; ?>
|
@@ -715,25 +755,26 @@ class Premium_Vscroll extends Widget_Base {
|
|
715 |
<div <?php echo $this->get_render_attribute_string('vertical_scroll_dots'); ?>>
|
716 |
<ul <?php echo $this->get_render_attribute_string('vertical_scroll_dots_list'); ?>>
|
717 |
<?php foreach( $templates as $index => $section ) : ?>
|
718 |
-
|
719 |
<?php endforeach; ?>
|
720 |
</ul>
|
721 |
</div>
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
<div <?php echo $this->get_render_attribute_string('section_' . $index); ?>>
|
729 |
-
<?php
|
730 |
-
$template_id = $section['section_template'];
|
731 |
-
echo $this->get_template_content($template_id);
|
732 |
?>
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
|
|
|
|
|
|
|
|
|
|
737 |
</div>
|
738 |
</div>
|
739 |
|
55 |
]
|
56 |
);
|
57 |
|
58 |
+
$this->add_control('content_type',
|
59 |
+
[
|
60 |
+
'label' => esc_html__('Content Type', 'premium-addons-for-elementor'),
|
61 |
+
'type' => Controls_Manager::SELECT,
|
62 |
+
'options' => [
|
63 |
+
'ids' => esc_html__('Section ID', 'premium-addons-for-elementor'),
|
64 |
+
'templates' => esc_html__('Elementor Templates', 'premium-addons-for-elementor')
|
65 |
+
],
|
66 |
+
'default' => 'templates',
|
67 |
+
'description' => esc_html__('Choose which method you prefer to insert sections.', 'premium-addons-for-elementor')
|
68 |
+
]
|
69 |
+
);
|
70 |
+
|
71 |
+
$temp_repeater = new REPEATER();
|
72 |
|
73 |
+
$temp_repeater->add_control('section_template',
|
74 |
[
|
75 |
'label' => esc_html__( 'Elementor Template', 'premium-addons-for-elementor' ),
|
76 |
'type' => Controls_Manager::SELECT2,
|
83 |
[
|
84 |
'label' => esc_html__( 'Sections', 'premium-addons-for-elementor' ),
|
85 |
'type' => Controls_Manager::REPEATER,
|
86 |
+
'fields' => array_values( $temp_repeater->get_controls() ),
|
87 |
+
'condition' => [
|
88 |
+
'content_type' => 'templates'
|
89 |
+
]
|
90 |
+
]
|
91 |
+
);
|
92 |
+
|
93 |
+
$id_repeater = new REPEATER();
|
94 |
+
|
95 |
+
$id_repeater->add_control('section_id',
|
96 |
+
[
|
97 |
+
'label' => esc_html__( 'Section ID', 'premium-addons-for-elementor' ),
|
98 |
+
'type' => Controls_Manager::TEXT
|
99 |
+
]
|
100 |
+
);
|
101 |
+
|
102 |
+
$this->add_control('id_repeater',
|
103 |
+
[
|
104 |
+
'label' => esc_html__( 'Sections', 'premium-addons-for-elementor' ),
|
105 |
+
'type' => Controls_Manager::REPEATER,
|
106 |
+
'fields' => array_values( $id_repeater->get_controls() ),
|
107 |
+
'condition' => [
|
108 |
+
'content_type' => 'ids'
|
109 |
+
]
|
110 |
]
|
111 |
+
);
|
112 |
+
|
113 |
+
$this->add_control('dots_tooltips_switcher',
|
114 |
+
[
|
115 |
+
'label' => esc_html__('Dots Tooltips', 'premium-addons-for-elementor'),
|
116 |
+
'type' => Controls_Manager::SWITCHER,
|
117 |
+
'default' => 'yes'
|
118 |
+
]
|
119 |
+
);
|
120 |
+
|
121 |
+
$this->add_control('dots_tooltips',
|
122 |
+
[
|
123 |
+
'label' => esc_html__('Dots Tooltips Text', 'premium-addons-for-elementor'),
|
124 |
+
'type' => Controls_Manager::TEXT,
|
125 |
+
'description' => esc_html__('Add text for each navigation dot separated by \',\'','premium-addons-for-elementor'),
|
126 |
+
'condition' => [
|
127 |
+
'dots_tooltips_switcher' => 'yes'
|
128 |
+
]
|
129 |
+
]
|
130 |
+
);
|
131 |
|
132 |
$this->end_controls_section();
|
133 |
|
215 |
|
216 |
$this->add_control('nav_menu_repeater',
|
217 |
[
|
218 |
+
'label' => esc_html__( 'Menu Items', 'premium-addons-for-elementor' ),
|
219 |
'type' => Controls_Manager::REPEATER,
|
220 |
'fields' => array_values( $nav_repeater->get_controls() ),
|
221 |
'title_field' => '{{{ nav_menu_item }}}',
|
225 |
]
|
226 |
);
|
227 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
228 |
$this->add_control('navigation_dots_pos',
|
229 |
[
|
230 |
'label' => esc_html__('Dots Horizontal Position', 'premium-addons-for-elementor'),
|
723 |
|
724 |
$this->add_render_attribute( 'vertical_scroll_sections_wrap', 'id', 'premium-vscroll-sections-wrap-' . $id );
|
725 |
|
726 |
+
$this->add_render_attribute( 'vertical_scroll_sections_wrap', 'class', 'premium-vscroll-sections-wrap' );
|
727 |
+
|
728 |
$vscroll_settings = [
|
729 |
'id' => $id,
|
730 |
'speed' => !empty( $settings['scroll_speed'] ) ? $settings['scroll_speed'] * 1000 : 700,
|
735 |
'fullSection'=> 'yes' == $settings['full_section'] ? true : false
|
736 |
];
|
737 |
|
738 |
+
$templates = 'templates' === $settings['content_type'] ? $settings['section_repeater'] : $settings['id_repeater'];
|
739 |
|
740 |
+
$checkType = 'templates' === $settings['content_type'] ? true : false;
|
741 |
+
|
742 |
$nav_items = $settings['nav_menu_repeater'];
|
743 |
|
744 |
?>
|
747 |
<?php if ('yes' == $settings['nav_menu_switch'] ) : ?>
|
748 |
<ul <?php echo $this->get_render_attribute_string('vertical_scroll_menu'); ?>>
|
749 |
<?php foreach( $nav_items as $index => $item ) : ?>
|
750 |
+
<li data-menuanchor="<?php echo $checkType ? 'section_' . $id . $index : $templates[$index]['section_id']; ?>" class="premium-vscroll-nav-item"><div class="premium-vscroll-nav-link"><?php echo $item['nav_menu_item'] ?></div></li>
|
751 |
<?php endforeach; ?>
|
752 |
</ul>
|
753 |
<?php endif; ?>
|
755 |
<div <?php echo $this->get_render_attribute_string('vertical_scroll_dots'); ?>>
|
756 |
<ul <?php echo $this->get_render_attribute_string('vertical_scroll_dots_list'); ?>>
|
757 |
<?php foreach( $templates as $index => $section ) : ?>
|
758 |
+
<li data-index="<?php echo $index; ?>" data-menuanchor="<?php echo $checkType ? 'section_' . $id . $index : $templates[$index]['section_id']; ?>" class="premium-vscroll-dot-item"><div class="premium-vscroll-nav-link"><span></span></div></li>
|
759 |
<?php endforeach; ?>
|
760 |
</ul>
|
761 |
</div>
|
762 |
+
<?php if( 'templates' === $settings['content_type'] ) : ?>
|
763 |
+
<div <?php echo $this->get_render_attribute_string('vertical_scroll_sections_wrap'); ?>>
|
764 |
+
|
765 |
+
<?php foreach( $templates as $index => $section ) :
|
766 |
+
$this->add_render_attribute('section_' . $index, 'class', [ 'premium-vscroll-temp', 'premium-vscroll-temp-' . $id ] );
|
767 |
+
$this->add_render_attribute('section_' . $index, 'id', 'section_' . $id . $index );
|
|
|
|
|
|
|
|
|
768 |
?>
|
769 |
+
<div <?php echo $this->get_render_attribute_string('section_' . $index); ?>>
|
770 |
+
<?php
|
771 |
+
$template_id = $section['section_template'];
|
772 |
+
echo $this->get_template_content($template_id);
|
773 |
+
?>
|
774 |
+
</div>
|
775 |
+
<?php endforeach; ?>
|
776 |
+
</div>
|
777 |
+
<?php endif; ?>
|
778 |
</div>
|
779 |
</div>
|
780 |
|