PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.0.16
UiCore Elements – Free widgets and templates for Elementor v1.0.16
1.3.17 1.3.16 trunk 1.0.0 1.0.1 1.0.10 1.0.11 1.0.12 1.0.13 1.0.14 1.0.15 1.0.16 1.0.2 1.0.3 1.0.4 1.0.5 1.0.6 1.0.7 1.0.8 1.0.9 1.2.0 1.2.1 1.2.2 1.2.3 1.2.4 All 41 releases
uicore-elements / includes / widgets / logo-carousel.php

logo-carousel.php in UiCore Elements – Free widgets and templates for Elementor 1.0.16, at includes/widgets/logo-carousel.php

170 lines 5.3 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace UiCoreElements;
3 use Elementor\Controls_Manager;
4 use UiCoreElements\UiCoreWidget;
5 use UiCoreElements\Utils\Carousel_Trait;
6 use UiCoreElements\Utils\Logo_Trait;
7 use UiCoreElements\Utils\Animation_Trait;
8 use UicoreElements\Utils\Item_Style_Component;
9
10 defined('ABSPATH') || exit();
11
12 /**
13 * Logo Carousel
14 *
15 * @author Lucas Marini Falbo <lucas@uicore.co>
16 * @since 1.0.1
17 */
18
19 class LogoCarousel extends UiCoreWidget
20 {
21
22 use Carousel_Trait;
23 use Logo_Trait;
24 use Animation_Trait;
25 use Item_Style_Component;
26
27 public function get_name()
28 {
29 return 'uicore-logo-carousel';
30 }
31 public function get_title()
32 {
33 return esc_html__('Logo Carousel', 'uicore-elements');
34 }
35 public function get_icon()
36 {
37 return 'eicon-logo ui-e-widget';
38 }
39 public function get_categories()
40 {
41 return ['uicore'];
42 }
43 public function get_keywords()
44 {
45 return ['logo', 'client', 'brand', 'showcase', 'carousel', 'slide'];
46 }
47 public function get_styles()
48 {
49 $styles = [
50 'logo-carousel',
51 'carousel',
52 'animation', // hover animations
53 'entrance', // entrance basic style
54 ];
55 if(!class_exists('\UiCore\Core') && !class_exists('\UiCoreAnimate\Base')){
56 $styles['e-animations'] = [ // entrance animations
57 'external' => true,
58 ];
59 }
60 return $styles;
61 }
62 public function get_scripts()
63 {
64 return $this->TRAIT_get_carousel_scripts();
65 }
66 protected function register_controls()
67 {
68
69 $this->TRAIT_register_logo_repeater_controls('Logo Carousel Items'); // Repeater Controls
70
71 $this->start_controls_section(
72 'section_carousel_settings',
73 [
74 'label' => __('Carousel Settings', 'uicore-elements'),
75 ]
76 );
77
78 $this->TRAIT_register_carousel_additional_controls(); // Carousel Additionals
79 $this->TRAIT_register_logo_adittional_controls();
80 $this->add_control('add_carousel_divider',['type' => Controls_Manager::DIVIDER,]);
81 $this->TRAIT_register_carousel_settings_controls(); // Carousel settings
82
83 $this->end_controls_section();
84
85 $this->TRAIT_register_navigation_controls(); // Navigation settings
86
87 $this->start_controls_section(
88 'section_style_review_items',
89 [
90 'label' => esc_html__( 'Logo Carousel', 'uicore-elements' ),
91 'tab' => Controls_Manager::TAB_STYLE,
92 ]
93 );
94
95 $this->start_controls_tabs( 'tabs_item_style' );
96
97 $this->start_controls_tab(
98 'tab_item_normal',
99 [
100 'label' => esc_html__( 'Normal', 'uicore-elements' ),
101 ]
102 );
103 $this->TRAIT_register_normal_item_style_controls(false);
104 $this->TRAIT_register_logos_image_style_controls('normal');
105 $this->end_controls_tab();
106
107 $this->start_controls_tab(
108 'tab_item_hover',
109 [
110 'label' => esc_html__( 'Hover', 'uicore-elements' ),
111 ]
112 );
113 $this->TRAIT_register_hover_item_style_controls(false);
114 $this->TRAIT_register_logos_image_style_controls('hover');
115 $this->end_controls_tab();
116
117 $this->start_controls_tab(
118 'tab_item_active',
119 [
120 'label' => esc_html__( 'Active', 'uicore-elements' ),
121 ]
122 );
123 $this->TRAIT_register_active_item_style_controls(false);
124 $this->TRAIT_register_logos_image_style_controls('active');
125 $this->end_controls_tabs();
126
127 $this->end_controls_tabs(); // Necessary because register_testimonial_card_controls() OPENS but DON'T close start_controls_tabs()
128
129 $this->end_controls_section();
130
131 $this->TRAIT_register_navigation_style_controls(); // Carousel Navigation Styles
132
133 $this->start_controls_section(
134 'section_style_animations',
135 [
136 'label' => __('Animations', 'uicore-elements'),
137 'tab' => Controls_Manager::TAB_STYLE,
138 ]
139 );
140
141 $this->TRAIT_register_entrance_animations_controls();
142 $this->TRAIT_register_hover_animation_control(
143 'Item Hover Animation',
144 [],
145 ['underline']
146 );
147 $this->TRAIT_register_hover_animation_control(
148 'Logo Hover Animation',
149 [],
150 ['underline']
151 );
152
153 $this->end_controls_section();
154
155 // Remove unused logo control
156 $this->remove_control('height');
157 }
158 public function render()
159 {
160 ?>
161 <div class="ui-e-carousel swiper">
162 <div class='swiper-wrapper'>
163 <?php $this->TRAIT_render_logo_item(); ?>
164 </div>
165 <?php $this->TRAIT_render_carousel_navigations(); ?>
166 </div>
167 <?php
168 }
169 }
170 \Elementor\Plugin::instance()->widgets_manager->register(new LogoCarousel());