PluginProbe
UiCore Elements – Free widgets and templates for Elementor / 1.0.3
UiCore Elements – Free widgets and templates for Elementor v1.0.3
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-grid.php

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

182 lines 5.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 namespace UiCoreElements;
3
4 use Elementor\Controls_Manager;
5 use UiCoreElements\UiCoreWidget;
6 use UiCoreElements\Utils\Animation_Trait;
7 use UiCoreElements\Utils\Grid_Trait;
8 use UiCoreElements\Utils\Logo_Trait;
9
10 defined('ABSPATH') || exit();
11
12 class Logo_Grid extends UiCoreWidget {
13
14 use Animation_Trait;
15 use Grid_Trait;
16 use Logo_Trait;
17
18 public function get_name()
19 {
20 return 'uicore-logo-grid';
21 }
22 public function get_title()
23 {
24 return esc_html__( 'Logo Grid', 'uicore-elements' );
25 }
26 public function get_icon()
27 {
28 return 'eicon-logo ui-e-widget';
29 }
30 public function get_categories()
31 {
32 return ['uicore'];
33 }
34 public function get_keywords()
35 {
36 return [ 'logo', 'grid', 'client', 'brand', 'showcase' ];
37 }
38 public function get_styles()
39 {
40 return [
41 'logo-grid',
42 'animation',
43 'entrance',
44 'e-animations' => [
45 'condition' => [
46 'animation_assets' => 'false'
47 ],
48 'external' => true,
49 ]
50 ];
51 }
52 public function get_scripts()
53 {
54 return [
55 'logo-grid',
56 'entrance' => [
57 'condition' => [
58 'animate_items' => 'ui-e-grid-animate'
59 ],
60 ]
61 ];
62 }
63 protected function register_controls()
64 {
65
66 $this->register_logo_repeater_controls('Logos'); // Repeater Controls
67
68 $this->start_controls_section(
69 'section_grid_settings',
70 [
71 'label' => __( 'Grid Settings', 'uicore-elements' ),
72 'tab' => Controls_Manager::TAB_CONTENT,
73 ]
74 );
75
76 $this->add_control(
77 'layout',
78 [
79 'label' => __( 'Grid Layout', 'uicore-elements' ),
80 'type' => Controls_Manager::SELECT,
81 'options' => [
82 'inner-border' => __( 'Inner Border', 'uicore-elements' ),
83 'outer-border' => __( 'Outer Border', 'uicore-elements' ),
84 'divider' => __( 'Inner Divider', 'uicore-elements' ),
85 ],
86 'default' => 'inner-border',
87 'frontend_available' => true,
88 'style_transfer' => true, // enables the param to be copied/pasted even without selector => []
89 'render_type' => 'template',
90 ]
91 );
92 $this->add_responsive_control(
93 'columns',
94 [
95 'label' => __( 'Columns', 'uicore-elements' ),
96 'type' => Controls_Manager::SELECT,
97 'desktop_default' => 4,
98 'tablet_default' => 2,
99 'mobile_default' => 2,
100 'options' => [
101 1 => '1',
102 2 => '2',
103 3 => '3',
104 4 => '4',
105 5 => '5',
106 6 => '6',
107 7 => '7',
108 8 => '8',
109 ],
110 'render_type' => 'template',
111 'frontend_available' => true,
112 'selectors' => [
113 '{{WRAPPER}} .ui-e-grid' => 'grid-template-columns: repeat({{VALUE}}, minmax(0, 1fr))',
114 ],
115 ]
116 );
117 $this->register_grid_layout_controls(false, [], false, false, ['layout' => 'inner-border']); // Grid controls without maso and columns
118
119 $this->end_controls_section();
120
121 $this->start_controls_section(
122 'section_logo_settings',
123 [
124 'label' => __( 'Logo Settings', 'uicore-elements' ),
125 'tab' => Controls_Manager::TAB_CONTENT,
126 ]
127 );
128
129 $this->register_logo_adittional_controls();
130
131 $this->end_controls_section();
132
133 $this->start_controls_section(
134 'section_logo_grid',
135 [
136 'label' => __( 'Logo Grid', 'uicore-elements' ),
137 'tab' => Controls_Manager::TAB_STYLE,
138 ]
139 );
140
141 $this->register_logos_grid_style_controls();
142
143 $this->end_controls_section();
144
145 $this->start_controls_section(
146 'animation_style_grid',
147 [
148 'label' => __( 'Animations', 'uicore-elements' ),
149 'tab' => Controls_Manager::TAB_STYLE,
150 ]
151 );
152
153 $this->TRAIT_register_entrace_asset_helper();
154 $this->TRAIT_register_entrance_animations_controls();
155 $this->TRAIT_register_hover_animation_control(
156 'Item Hover Animation',
157 [],
158 ['underline']
159 );
160 $this->TRAIT_register_hover_animation_control(
161 'Logo Hover Animation',
162 [],
163 ['underline']
164 );
165
166 $this->end_controls_section();
167 }
168 protected function render()
169 {
170
171 if(empty( $this->get_settings_for_display('logo_list'))) {
172 return;
173 }
174
175 ?>
176 <div class='ui-e-grid'>
177 <?php $this->render_logo_item(); ?>
178 </div>
179 <?php
180 }
181 }
182 \Elementor\Plugin::instance()->widgets_manager->register(new Logo_Grid());