Version Description
- Added Upgrade notice on the addons
Download this release
Release Info
Developer | livemesh |
Plugin | Addons for Elementor |
Version | 6.7.1 |
Comparing to | |
See all releases |
Code changes from version 6.7 to 6.7.1
- addons-for-elementor.php +2 -2
- assets/css/widgets/testimonials.css +1 -1
- assets/css/widgets/testimonials.css.map +1 -1
- assets/css/widgets/testimonials.scss +1 -1
- includes/widgets/carousel.php +273 -400
- includes/widgets/clients.php +266 -369
- includes/widgets/heading.php +192 -272
- includes/widgets/odometers.php +318 -446
- includes/widgets/piecharts.php +238 -339
- includes/widgets/portfolio.php +895 -1286
- includes/widgets/posts-carousel.php +663 -1002
- includes/widgets/posts-gridbox-slider.php +5 -0
- includes/widgets/posts-multislider.php +5 -0
- includes/widgets/posts-slider.php +5 -0
- includes/widgets/pricing-table.php +411 -599
- includes/widgets/services.php +5 -0
- includes/widgets/stats-bars.php +177 -263
- includes/widgets/tab-slider.php +320 -463
- includes/widgets/team-members.php +479 -713
- includes/widgets/testimonials-slider.php +305 -453
- includes/widgets/testimonials.php +328 -468
- plugin.php +2 -2
- readme.txt +4 -1
addons-for-elementor.php
CHANGED
@@ -8,7 +8,7 @@
|
|
8 |
* Author URI: https://livemeshelementor.com
|
9 |
* License: GPL3
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
11 |
-
* Version: 6.7
|
12 |
* Text Domain: livemesh-el-addons
|
13 |
* Domain Path: languages
|
14 |
* Elementor tested up to: 3.1.0
|
@@ -37,7 +37,7 @@ if ( !defined( 'ABSPATH' ) ) {
|
|
37 |
|
38 |
if ( !function_exists( 'lae_fs' ) ) {
|
39 |
// Plugin version
|
40 |
-
define( 'LAE_VERSION', '6.7' );
|
41 |
// Plugin Root File
|
42 |
define( 'LAE_PLUGIN_FILE', __FILE__ );
|
43 |
// Plugin Folder Path
|
8 |
* Author URI: https://livemeshelementor.com
|
9 |
* License: GPL3
|
10 |
* License URI: https://www.gnu.org/licenses/gpl-3.0.txt
|
11 |
+
* Version: 6.7.1
|
12 |
* Text Domain: livemesh-el-addons
|
13 |
* Domain Path: languages
|
14 |
* Elementor tested up to: 3.1.0
|
37 |
|
38 |
if ( !function_exists( 'lae_fs' ) ) {
|
39 |
// Plugin version
|
40 |
+
define( 'LAE_VERSION', '6.7.1' );
|
41 |
// Plugin Root File
|
42 |
define( 'LAE_PLUGIN_FILE', __FILE__ );
|
43 |
// Plugin Folder Path
|
assets/css/widgets/testimonials.css
CHANGED
@@ -9,7 +9,7 @@
|
|
9 |
border-radius: 30px;
|
10 |
text-align: center;
|
11 |
position: relative;
|
12 |
-
padding: 20px;
|
13 |
margin-bottom: 40px;
|
14 |
font-style: italic;
|
15 |
font-size: 15px;
|
9 |
border-radius: 30px;
|
10 |
text-align: center;
|
11 |
position: relative;
|
12 |
+
padding: 20px 20px 10px;
|
13 |
margin-bottom: 40px;
|
14 |
font-style: italic;
|
15 |
font-size: 15px;
|
assets/css/widgets/testimonials.css.map
CHANGED
@@ -1 +1 @@
|
|
1 |
-
{"version":3,"sources":["testimonials.scss","../_lae-lib.scss"],"names":[],"mappings":"AAGA,mGAAmG;AAGnG;EACE,YAAW,EAAA;EAEX;IACE,oBAAmB,EAAA;EAGrB;IACE,oBAAmB;IACnB,0BAAyB;IACzB,oBAAmB;IACnB,mBAAkB;IAClB,mBAAkB;IAClB,
|
1 |
+
{"version":3,"sources":["testimonials.scss","../_lae-lib.scss"],"names":[],"mappings":"AAGA,mGAAmG;AAGnG;EACE,YAAW,EAAA;EAEX;IACE,oBAAmB,EAAA;EAGrB;IACE,oBAAmB;IACnB,0BAAyB;IACzB,oBAAmB;IACnB,mBAAkB;IAClB,mBAAkB;IAClB,wBAAuB;IACvB,oBAAmB;IACnB,mBAAkB;IAClB,gBAAe;IACf,kBAAiB;IACjB,YAAW;IAqCX,mBAAkB;IAClB,iBAAgB,EAAA;IApChB;MACE,YAAW;MACX,iBAAgB,EAAA;IAGlB;MACE,YAAW;MACX,eAAc;MACd,iBAAgB;MAChB,+BAA8B;MAC9B,iCAAgC;MAChC,oBAAmB;MACnB,yBAAwB;MAGxB,iCAAgC;MAEhC,8BAA6B;MAC7B,YAAW;MACX,aAAY;MACZ,mBAAkB;MAClB,cAAa;MACb,WAAU;MACV,aAAY,EAAA;MAEZ;QACE,WAAU;QACV,YAAW,EAAA;MAGb;QACE,iBAAgB,EAAA;EAQtB;IACE,eAAc,EAAA;IAEd;MACE,oBAAmB,EAAA;MAEnB;QACE,gBAAe;QACf,mBAAkB;QAClB,mBAAkB,EAAA;QAElB;UACE,mBAAkB,EAAA;IAKxB;MACE,oBAAmB;MACnB,uBAAsB;MACtB,YAAW,EAAA;MAEX;QACE,eAAc,EAAA;MAGhB;QC4CJ,gBAAe;QACf,kBAAiB;QACjB,oBAAmB;QACnB,kBAAiB;QACjB,YAAW;QACX,0BAAyB;QACzB,YAAW;QACX,cAAa;QACb,oBAAmB;QDlDb,gBAAe;QACf,kBAAiB;QACjB,mBAAkB;QAClB,YAAW,EAAA;QAEX;UACE,eAAc,EAAA","file":"testimonials.css"}
|
assets/css/widgets/testimonials.scss
CHANGED
@@ -17,7 +17,7 @@
|
|
17 |
border-radius: 30px;
|
18 |
text-align: center;
|
19 |
position: relative;
|
20 |
-
padding: 20px;
|
21 |
margin-bottom: 40px;
|
22 |
font-style: italic;
|
23 |
font-size: 15px;
|
17 |
border-radius: 30px;
|
18 |
text-align: center;
|
19 |
position: relative;
|
20 |
+
padding: 20px 20px 10px;
|
21 |
margin-bottom: 40px;
|
22 |
font-style: italic;
|
23 |
font-size: 15px;
|
includes/widgets/carousel.php
CHANGED
@@ -6,43 +6,47 @@ Description: Display a list of custom HTML content as a carousel.
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
return 'lae-carousel';
|
27 |
}
|
28 |
-
|
29 |
-
public function get_title()
|
30 |
-
|
|
|
31 |
}
|
32 |
-
|
33 |
-
public function get_icon()
|
|
|
34 |
return 'lae-icon-carousel';
|
35 |
}
|
36 |
-
|
37 |
-
public function get_categories()
|
38 |
-
|
|
|
39 |
}
|
40 |
-
|
41 |
-
public function get_custom_help_url()
|
|
|
42 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/carousel-addon/';
|
43 |
}
|
44 |
-
|
45 |
-
public function get_script_depends()
|
|
|
46 |
return [
|
47 |
'lae-jquery-slick',
|
48 |
'lae-frontend-scripts',
|
@@ -50,8 +54,9 @@ class LAE_Carousel_Widget extends LAE_Widget_Base {
|
|
50 |
'lae-carousel-scripts'
|
51 |
];
|
52 |
}
|
53 |
-
|
54 |
-
public function get_style_depends()
|
|
|
55 |
return [
|
56 |
'lae-icomoon-styles',
|
57 |
'lae-slick-carousel-styles',
|
@@ -60,407 +65,275 @@ class LAE_Carousel_Widget extends LAE_Widget_Base {
|
|
60 |
'lae-carousel-styles'
|
61 |
];
|
62 |
}
|
63 |
-
|
64 |
-
protected function _register_controls()
|
65 |
-
|
66 |
-
$this->start_controls_section(
|
67 |
-
'
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
$this->add_control(
|
75 |
-
'carousel_heading',
|
76 |
-
[
|
77 |
-
'label' => __('HTML Elements', 'livemesh-el-addons'),
|
78 |
-
'type' => Controls_Manager::HEADING,
|
79 |
-
]
|
80 |
-
);
|
81 |
-
|
82 |
$repeater = new Repeater();
|
83 |
-
|
84 |
-
|
85 |
-
'
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
'default' => __('The HTML content for the element', 'livemesh-el-addons'),
|
103 |
-
'show_label' => false,
|
104 |
-
'dynamic' => [
|
105 |
-
'active' => true,
|
106 |
-
],
|
107 |
-
]
|
108 |
-
);
|
109 |
-
|
110 |
-
|
111 |
-
$this->add_control(
|
112 |
-
'elements',
|
113 |
[
|
114 |
-
|
115 |
-
|
116 |
-
[
|
117 |
-
'element_title' => 'Aliquam lorem ante',
|
118 |
-
'element_content' => 'Suspendisse potenti. Praesent ac sem eget est egestas volutpat. Fusce neque. In hac habitasse platea dictumst. Morbi nec metus.
|
119 |
|
120 |
Sed magna purus, fermentum eu, tincidunt eu, varius ut, felis. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Vestibulum volutpat pretium libero. Nullam accumsan lorem in dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
|
121 |
|
122 |
In consectetuer turpis ut velit. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Vivamus laoreet. Praesent ac massa at ligula laoreet iaculis. Cras non dolor.',
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
|
128 |
Donec mollis hendrerit risus. Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Praesent egestas neque eu enim. Donec mollis hendrerit risus.
|
129 |
|
130 |
Donec orci lectus, aliquam ut, faucibus non, euismod id, nulla. Aenean imperdiet. Nulla consequat massa quis enim. Aenean imperdiet. Fusce commodo aliquam arcu.',
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
|
136 |
Sed in libero ut nibh placerat accumsan. Pellentesque ut neque. Donec id justo. Phasellus gravida semper nisi. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
|
137 |
|
138 |
Vestibulum dapibus nunc ac augue. Nam at tortor in tellus interdum sagittis. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Sed lectus. Quisque ut nisi.',
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
|
144 |
Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Maecenas nec odio et ante tincidunt tempus. Ut leo. Praesent vestibulum dapibus nibh. Sed aliquam ultrices mauris.
|
145 |
|
146 |
Nunc interdum lacus sit amet orci. Nunc interdum lacus sit amet orci. Vestibulum facilisis, purus nec pulvinar iaculis, ligula mi congue nunc, vitae euismod ligula urna in dolor. Curabitur at lacus ac velit ornare lobortis. Fusce vulputate eleifend sapien.',
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
|
152 |
Sed fringilla mauris sit amet nibh. Nunc nonummy metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus blandit leo ut odio. Praesent egestas neque eu enim.
|
153 |
|
154 |
Fusce risus nisl, viverra et, tempor et, pretium in, sapien. Vestibulum turpis sem, aliquet eget, lobortis pellentesque, rutrum eu, nisl. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Sed fringilla mauris sit amet nibh. Pellentesque ut neque.',
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
|
|
|
|
|
|
162 |
$this->end_controls_section();
|
163 |
-
|
164 |
-
|
165 |
-
'
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
'
|
175 |
-
[
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
'
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
);
|
220 |
-
|
221 |
-
|
222 |
-
'
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
]
|
231 |
-
);
|
232 |
-
|
233 |
-
$this->add_control(
|
234 |
-
'autoplay',
|
235 |
-
[
|
236 |
-
'type' => Controls_Manager::SWITCHER,
|
237 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
238 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
239 |
-
'return_value' => 'yes',
|
240 |
-
'separator' => 'before',
|
241 |
-
'default' => 'no',
|
242 |
-
'label' => __('Autoplay?', 'livemesh-el-addons'),
|
243 |
-
'description' => __('Should the carousel autoplay as in a slideshow.', 'livemesh-el-addons'),
|
244 |
-
]
|
245 |
-
);
|
246 |
-
|
247 |
-
$this->add_control(
|
248 |
-
'autoplay_speed',
|
249 |
-
[
|
250 |
-
'label' => __('Autoplay speed in ms', 'livemesh-el-addons'),
|
251 |
-
'type' => Controls_Manager::NUMBER,
|
252 |
-
'default' => 3000,
|
253 |
-
]
|
254 |
-
);
|
255 |
-
|
256 |
-
|
257 |
-
$this->add_control(
|
258 |
-
'animation_speed',
|
259 |
-
[
|
260 |
-
'label' => __('Autoplay animation speed in ms', 'livemesh-el-addons'),
|
261 |
-
'type' => Controls_Manager::NUMBER,
|
262 |
-
'default' => 300,
|
263 |
-
]
|
264 |
-
);
|
265 |
-
|
266 |
$this->end_controls_section();
|
267 |
-
|
268 |
-
|
269 |
-
'
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
$this->add_control(
|
277 |
-
'
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
);
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
'
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
);
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
'
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
);
|
319 |
-
|
320 |
-
|
321 |
-
'
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
$this->add_control(
|
333 |
-
'
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
[
|
347 |
-
'label' => __('Tablet Resolution', 'livemesh-el-addons'),
|
348 |
-
'description' => __('The resolution to treat as a tablet resolution.', 'livemesh-el-addons'),
|
349 |
-
'type' => Controls_Manager::NUMBER,
|
350 |
-
'default' => 800,
|
351 |
-
]
|
352 |
-
);
|
353 |
-
|
354 |
-
|
355 |
-
$this->add_control(
|
356 |
-
'heading_mobile',
|
357 |
-
[
|
358 |
-
'label' => __('Mobile Phone', 'livemesh-el-addons'),
|
359 |
-
'type' => Controls_Manager::HEADING,
|
360 |
-
'separator' => 'after',
|
361 |
-
]
|
362 |
-
);
|
363 |
-
|
364 |
-
$this->add_control(
|
365 |
-
'mobile_display_columns',
|
366 |
-
[
|
367 |
-
'label' => __('Columns per row', 'livemesh-el-addons'),
|
368 |
-
'type' => Controls_Manager::NUMBER,
|
369 |
-
'min' => 1,
|
370 |
-
'max' => 10,
|
371 |
-
'step' => 1,
|
372 |
-
'default' => 1,
|
373 |
-
]
|
374 |
-
);
|
375 |
-
|
376 |
-
$this->add_control(
|
377 |
-
'mobile_scroll_columns',
|
378 |
-
[
|
379 |
-
'label' => __('Columns to scroll', 'livemesh-el-addons'),
|
380 |
-
'type' => Controls_Manager::NUMBER,
|
381 |
-
'min' => 1,
|
382 |
-
'max' => 10,
|
383 |
-
'step' => 1,
|
384 |
-
'default' => 1,
|
385 |
-
]
|
386 |
-
);
|
387 |
-
|
388 |
-
$this->add_control(
|
389 |
-
'mobile_width',
|
390 |
-
[
|
391 |
-
'label' => __('Mobile Resolution', 'livemesh-el-addons'),
|
392 |
-
'description' => __('The resolution to treat as a mobile resolution.', 'livemesh-el-addons'),
|
393 |
-
'type' => Controls_Manager::NUMBER,
|
394 |
-
'default' => 480,
|
395 |
-
]
|
396 |
-
);
|
397 |
-
|
398 |
-
|
399 |
$this->end_controls_section();
|
400 |
-
|
401 |
-
|
402 |
-
'
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
$this->add_control(
|
411 |
-
'
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
'
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
);
|
429 |
-
|
430 |
-
$this->add_control(
|
431 |
-
'content_bg_color',
|
432 |
-
[
|
433 |
-
'label' => __('Background Color', 'livemesh-el-addons'),
|
434 |
-
'type' => Controls_Manager::COLOR,
|
435 |
-
'selectors' => [
|
436 |
-
'{{WRAPPER}} .lae-carousel .lae-carousel-item' => 'background-color: {{VALUE}};',
|
437 |
-
],
|
438 |
-
]
|
439 |
-
);
|
440 |
-
|
441 |
-
$this->add_group_control(
|
442 |
-
Group_Control_Typography::get_type(),
|
443 |
-
[
|
444 |
-
'name' => 'content_typography',
|
445 |
-
'selector' => '{{WRAPPER}} .lae-carousel .lae-carousel-item',
|
446 |
-
]
|
447 |
-
);
|
448 |
}
|
449 |
-
|
450 |
-
protected function render()
|
451 |
-
|
452 |
$settings = $this->get_settings_for_display();
|
453 |
-
|
454 |
-
$settings = apply_filters('lae_carousel_' . $this->get_id() . '_settings', $settings);
|
455 |
-
|
456 |
$args['settings'] = $settings;
|
457 |
-
|
458 |
$args['widget_instance'] = $this;
|
459 |
-
|
460 |
-
lae_get_template_part('addons/carousel/loop', $args);
|
461 |
}
|
462 |
-
|
463 |
-
protected function content_template()
|
|
|
464 |
}
|
465 |
|
466 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Scheme_Color ;
|
15 |
+
use Elementor\Group_Control_Typography ;
|
16 |
+
use Elementor\Scheme_Typography ;
|
17 |
+
if ( !defined( 'ABSPATH' ) ) {
|
18 |
+
exit;
|
19 |
+
}
|
20 |
+
// Exit if accessed directly
|
21 |
+
class LAE_Carousel_Widget extends LAE_Widget_Base
|
22 |
+
{
|
23 |
+
public function get_name()
|
24 |
+
{
|
25 |
return 'lae-carousel';
|
26 |
}
|
27 |
+
|
28 |
+
public function get_title()
|
29 |
+
{
|
30 |
+
return __( 'Carousel', 'livemesh-el-addons' );
|
31 |
}
|
32 |
+
|
33 |
+
public function get_icon()
|
34 |
+
{
|
35 |
return 'lae-icon-carousel';
|
36 |
}
|
37 |
+
|
38 |
+
public function get_categories()
|
39 |
+
{
|
40 |
+
return array( 'livemesh-addons' );
|
41 |
}
|
42 |
+
|
43 |
+
public function get_custom_help_url()
|
44 |
+
{
|
45 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/carousel-addon/';
|
46 |
}
|
47 |
+
|
48 |
+
public function get_script_depends()
|
49 |
+
{
|
50 |
return [
|
51 |
'lae-jquery-slick',
|
52 |
'lae-frontend-scripts',
|
54 |
'lae-carousel-scripts'
|
55 |
];
|
56 |
}
|
57 |
+
|
58 |
+
public function get_style_depends()
|
59 |
+
{
|
60 |
return [
|
61 |
'lae-icomoon-styles',
|
62 |
'lae-slick-carousel-styles',
|
65 |
'lae-carousel-styles'
|
66 |
];
|
67 |
}
|
68 |
+
|
69 |
+
protected function _register_controls()
|
70 |
+
{
|
71 |
+
$this->start_controls_section( 'section_carousel', [
|
72 |
+
'label' => __( 'Carousel', 'livemesh-el-addons' ),
|
73 |
+
] );
|
74 |
+
$this->add_control( 'carousel_heading', [
|
75 |
+
'label' => __( 'HTML Elements', 'livemesh-el-addons' ),
|
76 |
+
'type' => Controls_Manager::HEADING,
|
77 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
78 |
$repeater = new Repeater();
|
79 |
+
$repeater->add_control( 'element_title', [
|
80 |
+
'type' => Controls_Manager::TEXT,
|
81 |
+
'label_block' => true,
|
82 |
+
'label' => __( 'Element Title & HTML Content', 'livemesh-el-addons' ),
|
83 |
+
'default' => __( 'My element title', 'livemesh-el-addons' ),
|
84 |
+
'description' => __( 'The title to identify the HTML element', 'livemesh-el-addons' ),
|
85 |
+
] );
|
86 |
+
$repeater->add_control( 'element_content', [
|
87 |
+
'label' => __( 'HTML Element Content', 'livemesh-el-addons' ),
|
88 |
+
'type' => Controls_Manager::WYSIWYG,
|
89 |
+
'default' => __( 'The HTML content for the element', 'livemesh-el-addons' ),
|
90 |
+
'show_label' => false,
|
91 |
+
'dynamic' => [
|
92 |
+
'active' => true,
|
93 |
+
],
|
94 |
+
] );
|
95 |
+
$this->add_control( 'elements', [
|
96 |
+
'type' => Controls_Manager::REPEATER,
|
97 |
+
'default' => [
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
[
|
99 |
+
'element_title' => 'Aliquam lorem ante',
|
100 |
+
'element_content' => 'Suspendisse potenti. Praesent ac sem eget est egestas volutpat. Fusce neque. In hac habitasse platea dictumst. Morbi nec metus.
|
|
|
|
|
|
|
101 |
|
102 |
Sed magna purus, fermentum eu, tincidunt eu, varius ut, felis. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Vestibulum volutpat pretium libero. Nullam accumsan lorem in dui. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
|
103 |
|
104 |
In consectetuer turpis ut velit. Phasellus leo dolor, tempus non, auctor et, hendrerit quis, nisi. Vivamus laoreet. Praesent ac massa at ligula laoreet iaculis. Cras non dolor.',
|
105 |
+
],
|
106 |
+
[
|
107 |
+
'element_title' => 'Pellentesque commodo eros',
|
108 |
+
'element_content' => 'In hac habitasse platea dictumst. Ut a nisl id ante tempus hendrerit. Morbi mattis ullamcorper velit. Nullam sagittis. Sed a libero.
|
109 |
|
110 |
Donec mollis hendrerit risus. Curabitur ligula sapien, tincidunt non, euismod vitae, posuere imperdiet, leo. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Praesent egestas neque eu enim. Donec mollis hendrerit risus.
|
111 |
|
112 |
Donec orci lectus, aliquam ut, faucibus non, euismod id, nulla. Aenean imperdiet. Nulla consequat massa quis enim. Aenean imperdiet. Fusce commodo aliquam arcu.',
|
113 |
+
],
|
114 |
+
[
|
115 |
+
'element_title' => 'Aenean commodo ligula',
|
116 |
+
'element_content' => 'Fusce convallis metus id felis luctus adipiscing. Suspendisse faucibus, nunc et pellentesque egestas, lacus ante convallis tellus, vitae iaculis lacus elit id tortor. Sed lectus. Etiam vitae tortor. Praesent adipiscing.
|
117 |
|
118 |
Sed in libero ut nibh placerat accumsan. Pellentesque ut neque. Donec id justo. Phasellus gravida semper nisi. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem.
|
119 |
|
120 |
Vestibulum dapibus nunc ac augue. Nam at tortor in tellus interdum sagittis. Maecenas tempus, tellus eget condimentum rhoncus, sem quam semper libero, sit amet adipiscing sem neque sed ipsum. Sed lectus. Quisque ut nisi.',
|
121 |
+
],
|
122 |
+
[
|
123 |
+
'element_title' => 'Suspendisse pulvinar augue',
|
124 |
+
'element_content' => 'Sed aliquam ultrices mauris. Sed mollis, eros et ultrices tempus, mauris ipsum aliquam libero, non adipiscing dolor urna a orci. Etiam feugiat lorem non metus. In turpis. Morbi mattis ullamcorper velit.
|
125 |
|
126 |
Sed consequat, leo eget bibendum sodales, augue velit cursus nunc, quis gravida magna mi a libero. Maecenas nec odio et ante tincidunt tempus. Ut leo. Praesent vestibulum dapibus nibh. Sed aliquam ultrices mauris.
|
127 |
|
128 |
Nunc interdum lacus sit amet orci. Nunc interdum lacus sit amet orci. Vestibulum facilisis, purus nec pulvinar iaculis, ligula mi congue nunc, vitae euismod ligula urna in dolor. Curabitur at lacus ac velit ornare lobortis. Fusce vulputate eleifend sapien.',
|
129 |
+
],
|
130 |
+
[
|
131 |
+
'element_title' => 'Aenean tellus metus',
|
132 |
+
'element_content' => 'Vivamus elementum semper nisi. Praesent adipiscing. Donec pede justo, fringilla vel, aliquet nec, vulputate eget, arcu. Aenean leo ligula, porttitor eu, consequat vitae, eleifend ac, enim. Fusce vel dui.
|
133 |
|
134 |
Sed fringilla mauris sit amet nibh. Nunc nonummy metus. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Phasellus blandit leo ut odio. Praesent egestas neque eu enim.
|
135 |
|
136 |
Fusce risus nisl, viverra et, tempor et, pretium in, sapien. Vestibulum turpis sem, aliquet eget, lobortis pellentesque, rutrum eu, nisl. Donec quam felis, ultricies nec, pellentesque eu, pretium quis, sem. Sed fringilla mauris sit amet nibh. Pellentesque ut neque.',
|
137 |
+
]
|
138 |
+
],
|
139 |
+
'fields' => $repeater->get_controls(),
|
140 |
+
'title_field' => '{{{ element_title }}}',
|
141 |
+
] );
|
142 |
+
$this->add_control( 'upgrade_notice', [
|
143 |
+
'type' => Controls_Manager::RAW_HTML,
|
144 |
+
'separator' => 'before',
|
145 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
146 |
+
] );
|
147 |
$this->end_controls_section();
|
148 |
+
$this->start_controls_section( 'section_settings', [
|
149 |
+
'label' => __( 'Carousel Settings', 'livemesh-el-addons' ),
|
150 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
151 |
+
] );
|
152 |
+
$this->add_responsive_control( 'gutter', [
|
153 |
+
'label' => __( 'Spacing between items', 'livemesh-el-addons' ),
|
154 |
+
'type' => Controls_Manager::SLIDER,
|
155 |
+
'size_units' => [ 'px' ],
|
156 |
+
'default' => [
|
157 |
+
'size' => 10,
|
158 |
+
],
|
159 |
+
'range' => [
|
160 |
+
'px' => [
|
161 |
+
'min' => 0,
|
162 |
+
'max' => 50,
|
163 |
+
],
|
164 |
+
],
|
165 |
+
'selectors' => [
|
166 |
+
'{{WRAPPER}} .lae-carousel .slick-slide' => 'margin: 0 {{SIZE}}{{UNIT}};',
|
167 |
+
'{{WRAPPER}} .lae-carousel .slick-list' => 'margin: 0 -{{SIZE}}{{UNIT}};',
|
168 |
+
],
|
169 |
+
] );
|
170 |
+
$this->add_control( 'arrows', [
|
171 |
+
'type' => Controls_Manager::SWITCHER,
|
172 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
173 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
174 |
+
'return_value' => 'yes',
|
175 |
+
'default' => 'yes',
|
176 |
+
'label' => __( 'Prev/Next Arrows?', 'livemesh-el-addons' ),
|
177 |
+
] );
|
178 |
+
$this->add_control( 'dots', [
|
179 |
+
'type' => Controls_Manager::SWITCHER,
|
180 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
181 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
182 |
+
'return_value' => 'yes',
|
183 |
+
'separator' => 'before',
|
184 |
+
'default' => 'no',
|
185 |
+
'label' => __( 'Show dot indicators for navigation?', 'livemesh-el-addons' ),
|
186 |
+
] );
|
187 |
+
$this->add_control( 'pause_on_hover', [
|
188 |
+
'type' => Controls_Manager::SWITCHER,
|
189 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
190 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
191 |
+
'return_value' => 'yes',
|
192 |
+
'default' => 'yes',
|
193 |
+
'label' => __( 'Pause on Hover?', 'livemesh-el-addons' ),
|
194 |
+
] );
|
195 |
+
$this->add_control( 'autoplay', [
|
196 |
+
'type' => Controls_Manager::SWITCHER,
|
197 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
198 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
199 |
+
'return_value' => 'yes',
|
200 |
+
'separator' => 'before',
|
201 |
+
'default' => 'no',
|
202 |
+
'label' => __( 'Autoplay?', 'livemesh-el-addons' ),
|
203 |
+
'description' => __( 'Should the carousel autoplay as in a slideshow.', 'livemesh-el-addons' ),
|
204 |
+
] );
|
205 |
+
$this->add_control( 'autoplay_speed', [
|
206 |
+
'label' => __( 'Autoplay speed in ms', 'livemesh-el-addons' ),
|
207 |
+
'type' => Controls_Manager::NUMBER,
|
208 |
+
'default' => 3000,
|
209 |
+
] );
|
210 |
+
$this->add_control( 'animation_speed', [
|
211 |
+
'label' => __( 'Autoplay animation speed in ms', 'livemesh-el-addons' ),
|
212 |
+
'type' => Controls_Manager::NUMBER,
|
213 |
+
'default' => 300,
|
214 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
$this->end_controls_section();
|
216 |
+
$this->start_controls_section( 'section_responsive', [
|
217 |
+
'label' => __( 'Responsive Options', 'livemesh-el-addons' ),
|
218 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
219 |
+
] );
|
220 |
+
$this->add_control( 'heading_desktop', [
|
221 |
+
'label' => __( 'Desktop', 'livemesh-el-addons' ),
|
222 |
+
'type' => Controls_Manager::HEADING,
|
223 |
+
'separator' => 'after',
|
224 |
+
] );
|
225 |
+
$this->add_control( 'display_columns', [
|
226 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
227 |
+
'type' => Controls_Manager::NUMBER,
|
228 |
+
'min' => 1,
|
229 |
+
'max' => 25,
|
230 |
+
'step' => 1,
|
231 |
+
'default' => 3,
|
232 |
+
] );
|
233 |
+
$this->add_control( 'scroll_columns', [
|
234 |
+
'label' => __( 'Columns to scroll', 'livemesh-el-addons' ),
|
235 |
+
'type' => Controls_Manager::NUMBER,
|
236 |
+
'min' => 1,
|
237 |
+
'max' => 25,
|
238 |
+
'step' => 1,
|
239 |
+
'default' => 3,
|
240 |
+
] );
|
241 |
+
$this->add_control( 'heading_tablet', [
|
242 |
+
'label' => __( 'Tablet', 'livemesh-el-addons' ),
|
243 |
+
'type' => Controls_Manager::HEADING,
|
244 |
+
'separator' => 'after',
|
245 |
+
] );
|
246 |
+
$this->add_control( 'tablet_display_columns', [
|
247 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
248 |
+
'type' => Controls_Manager::NUMBER,
|
249 |
+
'min' => 1,
|
250 |
+
'max' => 20,
|
251 |
+
'step' => 1,
|
252 |
+
'default' => 2,
|
253 |
+
] );
|
254 |
+
$this->add_control( 'tablet_scroll_columns', [
|
255 |
+
'label' => __( 'Columns to scroll', 'livemesh-el-addons' ),
|
256 |
+
'type' => Controls_Manager::NUMBER,
|
257 |
+
'min' => 1,
|
258 |
+
'max' => 20,
|
259 |
+
'step' => 1,
|
260 |
+
'default' => 2,
|
261 |
+
] );
|
262 |
+
$this->add_control( 'tablet_width', [
|
263 |
+
'label' => __( 'Tablet Resolution', 'livemesh-el-addons' ),
|
264 |
+
'description' => __( 'The resolution to treat as a tablet resolution.', 'livemesh-el-addons' ),
|
265 |
+
'type' => Controls_Manager::NUMBER,
|
266 |
+
'default' => 800,
|
267 |
+
] );
|
268 |
+
$this->add_control( 'heading_mobile', [
|
269 |
+
'label' => __( 'Mobile Phone', 'livemesh-el-addons' ),
|
270 |
+
'type' => Controls_Manager::HEADING,
|
271 |
+
'separator' => 'after',
|
272 |
+
] );
|
273 |
+
$this->add_control( 'mobile_display_columns', [
|
274 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
275 |
+
'type' => Controls_Manager::NUMBER,
|
276 |
+
'min' => 1,
|
277 |
+
'max' => 10,
|
278 |
+
'step' => 1,
|
279 |
+
'default' => 1,
|
280 |
+
] );
|
281 |
+
$this->add_control( 'mobile_scroll_columns', [
|
282 |
+
'label' => __( 'Columns to scroll', 'livemesh-el-addons' ),
|
283 |
+
'type' => Controls_Manager::NUMBER,
|
284 |
+
'min' => 1,
|
285 |
+
'max' => 10,
|
286 |
+
'step' => 1,
|
287 |
+
'default' => 1,
|
288 |
+
] );
|
289 |
+
$this->add_control( 'mobile_width', [
|
290 |
+
'label' => __( 'Mobile Resolution', 'livemesh-el-addons' ),
|
291 |
+
'description' => __( 'The resolution to treat as a mobile resolution.', 'livemesh-el-addons' ),
|
292 |
+
'type' => Controls_Manager::NUMBER,
|
293 |
+
'default' => 480,
|
294 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
295 |
$this->end_controls_section();
|
296 |
+
$this->start_controls_section( 'section_carousel_style', [
|
297 |
+
'label' => __( 'Carousel', 'livemesh-el-addons' ),
|
298 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
299 |
+
'show_label' => false,
|
300 |
+
] );
|
301 |
+
$this->add_control( 'heading_content', [
|
302 |
+
'label' => __( 'Content', 'livemesh-el-addons' ),
|
303 |
+
'type' => Controls_Manager::HEADING,
|
304 |
+
'separator' => 'after',
|
305 |
+
] );
|
306 |
+
$this->add_control( 'content_color', [
|
307 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
308 |
+
'type' => Controls_Manager::COLOR,
|
309 |
+
'selectors' => [
|
310 |
+
'{{WRAPPER}} .lae-carousel .lae-carousel-item' => 'color: {{VALUE}};',
|
311 |
+
],
|
312 |
+
] );
|
313 |
+
$this->add_control( 'content_bg_color', [
|
314 |
+
'label' => __( 'Background Color', 'livemesh-el-addons' ),
|
315 |
+
'type' => Controls_Manager::COLOR,
|
316 |
+
'selectors' => [
|
317 |
+
'{{WRAPPER}} .lae-carousel .lae-carousel-item' => 'background-color: {{VALUE}};',
|
318 |
+
],
|
319 |
+
] );
|
320 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
321 |
+
'name' => 'content_typography',
|
322 |
+
'selector' => '{{WRAPPER}} .lae-carousel .lae-carousel-item',
|
323 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
}
|
325 |
+
|
326 |
+
protected function render()
|
327 |
+
{
|
328 |
$settings = $this->get_settings_for_display();
|
329 |
+
$settings = apply_filters( 'lae_carousel_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
330 |
$args['settings'] = $settings;
|
|
|
331 |
$args['widget_instance'] = $this;
|
332 |
+
lae_get_template_part( 'addons/carousel/loop', $args );
|
|
|
333 |
}
|
334 |
+
|
335 |
+
protected function content_template()
|
336 |
+
{
|
337 |
}
|
338 |
|
339 |
}
|
includes/widgets/clients.php
CHANGED
@@ -6,397 +6,294 @@ Description: Display one or more clients depicting a percentage value in a multi
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
use
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
return 'lae-clients';
|
28 |
}
|
29 |
-
|
30 |
-
public function get_title()
|
31 |
-
|
|
|
32 |
}
|
33 |
-
|
34 |
-
public function get_icon()
|
|
|
35 |
return 'lae-icon-clients';
|
36 |
}
|
37 |
-
|
38 |
-
public function get_categories()
|
39 |
-
|
|
|
40 |
}
|
41 |
-
|
42 |
-
public function get_custom_help_url()
|
|
|
43 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/clients-addon/';
|
44 |
}
|
45 |
-
|
46 |
-
public function get_script_depends()
|
47 |
-
|
48 |
-
|
49 |
-
'lae-frontend-scripts'
|
50 |
-
];
|
51 |
}
|
52 |
-
|
53 |
-
public function get_style_depends()
|
54 |
-
|
55 |
-
|
56 |
-
'lae-frontend-styles',
|
57 |
-
'lae-clients-styles'
|
58 |
-
];
|
59 |
}
|
60 |
-
|
61 |
-
protected function _register_controls()
|
62 |
-
|
63 |
-
$this->start_controls_section(
|
64 |
-
'
|
65 |
-
|
66 |
-
'label' => __('Clients', 'livemesh-el-addons'),
|
67 |
-
]
|
68 |
-
);
|
69 |
-
|
70 |
-
|
71 |
$repeater = new Repeater();
|
72 |
-
|
73 |
-
|
74 |
-
'
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
'
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
'dynamic' => [
|
119 |
-
'active' => true,
|
120 |
-
],
|
121 |
-
]
|
122 |
-
);
|
123 |
-
|
124 |
-
$this->add_control(
|
125 |
-
'clients',
|
126 |
-
[
|
127 |
-
'type' => Controls_Manager::REPEATER,
|
128 |
-
'fields' => $repeater->get_controls(),
|
129 |
-
'title_field' => '{{{ client_name }}}',
|
130 |
-
]
|
131 |
-
);
|
132 |
-
|
133 |
$this->end_controls_section();
|
134 |
-
|
135 |
-
|
136 |
-
'
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
'widget_animation',
|
145 |
-
[
|
146 |
-
"type" => Controls_Manager::SELECT,
|
147 |
-
"label" => __("Animation Type", "livemesh-el-addons"),
|
148 |
-
'options' => lae_get_animation_options(),
|
149 |
-
'default' => 'none',
|
150 |
-
]
|
151 |
-
);
|
152 |
-
|
153 |
$this->end_controls_section();
|
154 |
-
|
155 |
-
|
156 |
-
'
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
'
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
'
|
203 |
-
[
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
$this->add_control(
|
225 |
-
'
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
],
|
242 |
-
]
|
243 |
-
);
|
244 |
-
|
245 |
-
$this->add_control(
|
246 |
-
'row_gap',
|
247 |
-
[
|
248 |
-
'label' => __('Row Gap', 'livemesh-el-addons'),
|
249 |
-
'type' => Controls_Manager::SLIDER,
|
250 |
-
'size_units' => ['px'],
|
251 |
-
'default' => [
|
252 |
-
'size' => 0,
|
253 |
-
],
|
254 |
-
'range' => [
|
255 |
-
'px' => [
|
256 |
-
'min' => 0,
|
257 |
-
'max' => 100,
|
258 |
-
],
|
259 |
-
],
|
260 |
-
'selectors' => [
|
261 |
-
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
262 |
-
],
|
263 |
-
]
|
264 |
-
);
|
265 |
-
|
266 |
$this->end_controls_section();
|
267 |
-
|
268 |
-
|
269 |
-
'
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
);
|
276 |
-
|
277 |
-
|
278 |
-
'
|
279 |
-
[
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
'
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
'
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
);
|
307 |
-
|
308 |
-
|
309 |
-
'
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
);
|
328 |
-
|
329 |
-
|
330 |
-
'
|
331 |
-
[
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
]
|
340 |
-
);
|
341 |
-
|
342 |
-
$this->add_control(
|
343 |
-
'heading_client_name',
|
344 |
-
[
|
345 |
-
'label' => __('Client Name', 'livemesh-el-addons'),
|
346 |
-
'type' => Controls_Manager::HEADING,
|
347 |
-
'separator' => 'before',
|
348 |
-
]
|
349 |
-
);
|
350 |
-
|
351 |
-
|
352 |
-
$this->add_control(
|
353 |
-
'client_name_color',
|
354 |
-
[
|
355 |
-
'label' => __('Client Name Color', 'livemesh-el-addons'),
|
356 |
-
'type' => Controls_Manager::COLOR,
|
357 |
-
'selectors' => [
|
358 |
-
'{{WRAPPER}} .lae-clients .lae-client .lae-client-name a' => 'color: {{VALUE}};',
|
359 |
-
],
|
360 |
-
]
|
361 |
-
);
|
362 |
-
|
363 |
-
|
364 |
-
$this->add_control(
|
365 |
-
'client_name_hover_color',
|
366 |
-
[
|
367 |
-
'label' => __('Client Name Hover Color', 'livemesh-el-addons'),
|
368 |
-
'type' => Controls_Manager::COLOR,
|
369 |
-
'selectors' => [
|
370 |
-
'{{WRAPPER}} .lae-clients .lae-client .lae-client-name a:hover' => 'color: {{VALUE}};',
|
371 |
-
],
|
372 |
-
]
|
373 |
-
);
|
374 |
-
|
375 |
-
$this->add_group_control(
|
376 |
-
Group_Control_Typography::get_type(),
|
377 |
-
[
|
378 |
-
'name' => 'client_name_typography',
|
379 |
-
'selector' => '{{WRAPPER}} .lae-clients .lae-client .lae-client-name a',
|
380 |
-
]
|
381 |
-
);
|
382 |
-
|
383 |
$this->end_controls_section();
|
384 |
}
|
385 |
-
|
386 |
-
protected function render()
|
387 |
-
|
388 |
$settings = $this->get_settings_for_display();
|
389 |
-
|
390 |
-
$settings = apply_filters('lae_clients_' . $this->get_id() . '_settings', $settings);
|
391 |
-
|
392 |
$args['settings'] = $settings;
|
393 |
-
|
394 |
$args['widget_instance'] = $this;
|
395 |
-
|
396 |
-
lae_get_template_part('addons/clients/loop', $args);
|
397 |
}
|
398 |
-
|
399 |
-
protected function content_template()
|
|
|
400 |
}
|
401 |
|
402 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Utils ;
|
15 |
+
use Elementor\Group_Control_Typography ;
|
16 |
+
use Elementor\Scheme_Color ;
|
17 |
+
use Elementor\Scheme_Typography ;
|
18 |
+
if ( !defined( 'ABSPATH' ) ) {
|
19 |
+
exit;
|
20 |
+
}
|
21 |
+
// Exit if accessed directly
|
22 |
+
class LAE_Clients_Widget extends LAE_Widget_Base
|
23 |
+
{
|
24 |
+
public function get_name()
|
25 |
+
{
|
26 |
return 'lae-clients';
|
27 |
}
|
28 |
+
|
29 |
+
public function get_title()
|
30 |
+
{
|
31 |
+
return __( 'Clients', 'livemesh-el-addons' );
|
32 |
}
|
33 |
+
|
34 |
+
public function get_icon()
|
35 |
+
{
|
36 |
return 'lae-icon-clients';
|
37 |
}
|
38 |
+
|
39 |
+
public function get_categories()
|
40 |
+
{
|
41 |
+
return array( 'livemesh-addons' );
|
42 |
}
|
43 |
+
|
44 |
+
public function get_custom_help_url()
|
45 |
+
{
|
46 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/clients-addon/';
|
47 |
}
|
48 |
+
|
49 |
+
public function get_script_depends()
|
50 |
+
{
|
51 |
+
return [ 'lae-waypoints', 'lae-frontend-scripts' ];
|
|
|
|
|
52 |
}
|
53 |
+
|
54 |
+
public function get_style_depends()
|
55 |
+
{
|
56 |
+
return [ 'lae-animate-styles', 'lae-frontend-styles', 'lae-clients-styles' ];
|
|
|
|
|
|
|
57 |
}
|
58 |
+
|
59 |
+
protected function _register_controls()
|
60 |
+
{
|
61 |
+
$this->start_controls_section( 'section_clients', [
|
62 |
+
'label' => __( 'Clients', 'livemesh-el-addons' ),
|
63 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
64 |
$repeater = new Repeater();
|
65 |
+
$repeater->add_control( 'client_name', [
|
66 |
+
'type' => Controls_Manager::TEXT,
|
67 |
+
'label' => __( 'Client Name', 'livemesh-el-addons' ),
|
68 |
+
'label_block' => true,
|
69 |
+
'description' => __( 'The name of the client/customer.', 'livemesh-el-addons' ),
|
70 |
+
'default' => __( 'My client name', 'livemesh-el-addons' ),
|
71 |
+
'dynamic' => [
|
72 |
+
'active' => true,
|
73 |
+
],
|
74 |
+
] );
|
75 |
+
$repeater->add_control( 'client_link', [
|
76 |
+
'label' => __( 'Client URL', 'livemesh-el-addons' ),
|
77 |
+
'description' => __( 'The website of the client/customer.', 'livemesh-el-addons' ),
|
78 |
+
'type' => Controls_Manager::URL,
|
79 |
+
'label_block' => true,
|
80 |
+
'default' => [
|
81 |
+
'url' => '',
|
82 |
+
'is_external' => 'true',
|
83 |
+
],
|
84 |
+
'placeholder' => __( 'http://client-link.com', 'livemesh-el-addons' ),
|
85 |
+
'dynamic' => [
|
86 |
+
'active' => true,
|
87 |
+
],
|
88 |
+
] );
|
89 |
+
$repeater->add_control( 'client_image', [
|
90 |
+
'label' => __( 'Client Logo/Image', 'livemesh-el-addons' ),
|
91 |
+
'description' => __( 'The logo image for the client/customer.', 'livemesh-el-addons' ),
|
92 |
+
'type' => Controls_Manager::MEDIA,
|
93 |
+
'default' => [
|
94 |
+
'url' => Utils::get_placeholder_image_src(),
|
95 |
+
],
|
96 |
+
'label_block' => true,
|
97 |
+
'dynamic' => [
|
98 |
+
'active' => true,
|
99 |
+
],
|
100 |
+
] );
|
101 |
+
$this->add_control( 'clients', [
|
102 |
+
'type' => Controls_Manager::REPEATER,
|
103 |
+
'fields' => $repeater->get_controls(),
|
104 |
+
'title_field' => '{{{ client_name }}}',
|
105 |
+
] );
|
106 |
+
$this->add_control( 'upgrade_notice', [
|
107 |
+
'type' => Controls_Manager::RAW_HTML,
|
108 |
+
'separator' => 'before',
|
109 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
110 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
111 |
$this->end_controls_section();
|
112 |
+
$this->start_controls_section( 'section_animation_settings', [
|
113 |
+
'label' => __( 'Widget Animation', 'livemesh-el-addons' ),
|
114 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
115 |
+
] );
|
116 |
+
$this->add_control( 'widget_animation', [
|
117 |
+
"type" => Controls_Manager::SELECT,
|
118 |
+
"label" => __( "Animation Type", "livemesh-el-addons" ),
|
119 |
+
'options' => lae_get_animation_options(),
|
120 |
+
'default' => 'none',
|
121 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
122 |
$this->end_controls_section();
|
123 |
+
$this->start_controls_section( 'section_grid_settings', [
|
124 |
+
'label' => __( 'Grid Settings', 'livemesh-el-addons' ),
|
125 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
126 |
+
] );
|
127 |
+
$this->add_control( 'column_layout', [
|
128 |
+
'label' => __( 'Column Layout', 'livemesh-el-addons' ),
|
129 |
+
'type' => Controls_Manager::SELECT,
|
130 |
+
'options' => array(
|
131 |
+
'auto' => __( 'Auto', 'livemesh-el-addons' ),
|
132 |
+
'custom' => __( 'Custom', 'livemesh-el-addons' ),
|
133 |
+
),
|
134 |
+
'default' => 'auto',
|
135 |
+
'description' => __( 'Set column layout to be <strong>Auto</strong> to let the widget auto calculate number of columns based on minimum column size specified. The option <strong>Custom</strong> lets you explicitly control number of columns based on screen width.', 'livemesh-el-addons' ),
|
136 |
+
] );
|
137 |
+
$this->add_control( 'min_column_size', [
|
138 |
+
'label' => __( 'Minimum Column Size', 'livemesh-el-addons' ),
|
139 |
+
'type' => Controls_Manager::SLIDER,
|
140 |
+
'size_units' => [ 'px' ],
|
141 |
+
'default' => [
|
142 |
+
'size' => 240,
|
143 |
+
],
|
144 |
+
'range' => [
|
145 |
+
'px' => [
|
146 |
+
'min' => 50,
|
147 |
+
'max' => 500,
|
148 |
+
],
|
149 |
+
],
|
150 |
+
'selectors' => [
|
151 |
+
'{{WRAPPER}} .lae-uber-grid-container.lae-grid-auto-column-layout' => 'grid-template-columns: repeat(auto-fit, minmax({{SIZE}}{{UNIT}}, 1fr));',
|
152 |
+
],
|
153 |
+
'condition' => [
|
154 |
+
'column_layout' => 'auto',
|
155 |
+
],
|
156 |
+
] );
|
157 |
+
$this->add_responsive_control( 'per_line', [
|
158 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
159 |
+
'type' => Controls_Manager::SELECT,
|
160 |
+
'default' => '4',
|
161 |
+
'tablet_default' => '3',
|
162 |
+
'mobile_default' => '2',
|
163 |
+
'options' => [
|
164 |
+
'1' => '1',
|
165 |
+
'2' => '2',
|
166 |
+
'3' => '3',
|
167 |
+
'4' => '4',
|
168 |
+
'5' => '5',
|
169 |
+
'6' => '6',
|
170 |
+
],
|
171 |
+
'frontend_available' => true,
|
172 |
+
'condition' => [
|
173 |
+
'column_layout' => 'custom',
|
174 |
+
],
|
175 |
+
] );
|
176 |
+
$this->add_control( 'column_gap', [
|
177 |
+
'label' => __( 'Column Gap', 'livemesh-el-addons' ),
|
178 |
+
'type' => Controls_Manager::SLIDER,
|
179 |
+
'size_units' => [ 'px' ],
|
180 |
+
'default' => [
|
181 |
+
'size' => 0,
|
182 |
+
],
|
183 |
+
'range' => [
|
184 |
+
'px' => [
|
185 |
+
'min' => 0,
|
186 |
+
'max' => 100,
|
187 |
+
],
|
188 |
+
],
|
189 |
+
'selectors' => [
|
190 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'column-gap: {{SIZE}}{{UNIT}};',
|
191 |
+
],
|
192 |
+
] );
|
193 |
+
$this->add_control( 'row_gap', [
|
194 |
+
'label' => __( 'Row Gap', 'livemesh-el-addons' ),
|
195 |
+
'type' => Controls_Manager::SLIDER,
|
196 |
+
'size_units' => [ 'px' ],
|
197 |
+
'default' => [
|
198 |
+
'size' => 0,
|
199 |
+
],
|
200 |
+
'range' => [
|
201 |
+
'px' => [
|
202 |
+
'min' => 0,
|
203 |
+
'max' => 100,
|
204 |
+
],
|
205 |
+
],
|
206 |
+
'selectors' => [
|
207 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
208 |
+
],
|
209 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
$this->end_controls_section();
|
211 |
+
$this->start_controls_section( 'section_styling', [
|
212 |
+
'label' => __( 'Clients', 'livemesh-el-addons' ),
|
213 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
214 |
+
] );
|
215 |
+
$this->add_control( 'heading_client_image', [
|
216 |
+
'label' => __( 'Client Images', 'livemesh-el-addons' ),
|
217 |
+
'type' => Controls_Manager::HEADING,
|
218 |
+
'separator' => 'before',
|
219 |
+
] );
|
220 |
+
$this->add_control( 'client_border_color', [
|
221 |
+
'label' => __( 'Client Border Color', 'livemesh-el-addons' ),
|
222 |
+
'type' => Controls_Manager::COLOR,
|
223 |
+
'selectors' => [
|
224 |
+
'{{WRAPPER}} .lae-clients .lae-client' => 'border-color: {{VALUE}} !important;',
|
225 |
+
],
|
226 |
+
] );
|
227 |
+
$this->add_control( 'client_hover_bg_color', [
|
228 |
+
'label' => __( 'Client Hover Color', 'livemesh-el-addons' ),
|
229 |
+
'type' => Controls_Manager::COLOR,
|
230 |
+
'selectors' => [
|
231 |
+
'{{WRAPPER}} .lae-clients .lae-client .lae-image-overlay' => 'background-color: {{VALUE}};',
|
232 |
+
],
|
233 |
+
] );
|
234 |
+
$this->add_responsive_control( 'thumbnail_hover_opacity', [
|
235 |
+
'label' => __( 'Thumbnail Hover Opacity (%)', 'livemesh-el-addons' ),
|
236 |
+
'type' => Controls_Manager::SLIDER,
|
237 |
+
'default' => [
|
238 |
+
'size' => 0.7,
|
239 |
+
],
|
240 |
+
'range' => [
|
241 |
+
'px' => [
|
242 |
+
'max' => 1,
|
243 |
+
'min' => 0.1,
|
244 |
+
'step' => 0.01,
|
245 |
+
],
|
246 |
+
],
|
247 |
+
'selectors' => [
|
248 |
+
'{{WRAPPER}} .lae-clients .lae-client:hover .lae-image-overlay' => 'opacity: {{SIZE}};',
|
249 |
+
],
|
250 |
+
] );
|
251 |
+
$this->add_control( 'client_padding', [
|
252 |
+
'label' => __( 'Client Padding', 'livemesh-el-addons' ),
|
253 |
+
'description' => __( 'Padding for the client images.', 'livemesh-el-addons' ),
|
254 |
+
'type' => Controls_Manager::DIMENSIONS,
|
255 |
+
'size_units' => [ 'px', '%', 'em' ],
|
256 |
+
'selectors' => [
|
257 |
+
'{{WRAPPER}} .lae-clients .lae-client' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
258 |
+
],
|
259 |
+
] );
|
260 |
+
$this->add_control( 'heading_client_name', [
|
261 |
+
'label' => __( 'Client Name', 'livemesh-el-addons' ),
|
262 |
+
'type' => Controls_Manager::HEADING,
|
263 |
+
'separator' => 'before',
|
264 |
+
] );
|
265 |
+
$this->add_control( 'client_name_color', [
|
266 |
+
'label' => __( 'Client Name Color', 'livemesh-el-addons' ),
|
267 |
+
'type' => Controls_Manager::COLOR,
|
268 |
+
'selectors' => [
|
269 |
+
'{{WRAPPER}} .lae-clients .lae-client .lae-client-name a' => 'color: {{VALUE}};',
|
270 |
+
],
|
271 |
+
] );
|
272 |
+
$this->add_control( 'client_name_hover_color', [
|
273 |
+
'label' => __( 'Client Name Hover Color', 'livemesh-el-addons' ),
|
274 |
+
'type' => Controls_Manager::COLOR,
|
275 |
+
'selectors' => [
|
276 |
+
'{{WRAPPER}} .lae-clients .lae-client .lae-client-name a:hover' => 'color: {{VALUE}};',
|
277 |
+
],
|
278 |
+
] );
|
279 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
280 |
+
'name' => 'client_name_typography',
|
281 |
+
'selector' => '{{WRAPPER}} .lae-clients .lae-client .lae-client-name a',
|
282 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
283 |
$this->end_controls_section();
|
284 |
}
|
285 |
+
|
286 |
+
protected function render()
|
287 |
+
{
|
288 |
$settings = $this->get_settings_for_display();
|
289 |
+
$settings = apply_filters( 'lae_clients_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
290 |
$args['settings'] = $settings;
|
|
|
291 |
$args['widget_instance'] = $this;
|
292 |
+
lae_get_template_part( 'addons/clients/loop', $args );
|
|
|
293 |
}
|
294 |
+
|
295 |
+
protected function content_template()
|
296 |
+
{
|
297 |
}
|
298 |
|
299 |
}
|
includes/widgets/heading.php
CHANGED
@@ -6,299 +6,219 @@ Description: Display one or more heading depicting a percentage value in a multi
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
return 'lae-heading';
|
26 |
}
|
27 |
-
|
28 |
-
public function get_title()
|
29 |
-
|
|
|
30 |
}
|
31 |
-
|
32 |
-
public function get_icon()
|
|
|
33 |
return 'lae-icon-heading';
|
34 |
}
|
35 |
-
|
36 |
-
public function get_categories()
|
37 |
-
|
|
|
38 |
}
|
39 |
-
|
40 |
-
public function get_custom_help_url()
|
|
|
41 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/heading-addon/';
|
42 |
}
|
43 |
-
|
44 |
-
public function get_script_depends()
|
45 |
-
|
46 |
-
|
47 |
-
'lae-frontend-scripts'
|
48 |
-
];
|
49 |
}
|
50 |
-
|
51 |
-
public function get_style_depends()
|
52 |
-
|
53 |
-
|
54 |
-
'lae-frontend-styles',
|
55 |
-
'lae-heading-styles'
|
56 |
-
];
|
57 |
}
|
58 |
-
|
59 |
-
protected function _register_controls()
|
60 |
-
|
61 |
-
$this->start_controls_section(
|
62 |
-
'
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
'
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
);
|
96 |
-
|
97 |
-
|
98 |
-
'
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
);
|
112 |
-
|
113 |
-
|
114 |
-
'
|
115 |
-
[
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
'
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
'
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
],
|
147 |
-
'center' => [
|
148 |
-
'title' => __('Center', 'livemesh-el-addons'),
|
149 |
-
'icon' => 'fa fa-align-center',
|
150 |
-
],
|
151 |
-
'right' => [
|
152 |
-
'title' => __('Right', 'livemesh-el-addons'),
|
153 |
-
'icon' => 'fa fa-align-right',
|
154 |
-
],
|
155 |
-
'justify' => [
|
156 |
-
'title' => __('Justified', 'livemesh-el-addons'),
|
157 |
-
'icon' => 'fa fa-align-justify',
|
158 |
-
],
|
159 |
-
],
|
160 |
-
'default' => 'center',
|
161 |
-
]
|
162 |
-
);
|
163 |
-
|
164 |
-
$this->add_control(
|
165 |
-
'widget_animation',
|
166 |
-
[
|
167 |
-
"type" => Controls_Manager::SELECT,
|
168 |
-
"label" => __("Animation Type", "livemesh-el-addons"),
|
169 |
-
'options' => lae_get_animation_options(),
|
170 |
-
'default' => 'none',
|
171 |
-
]
|
172 |
-
);
|
173 |
-
|
174 |
$this->end_controls_section();
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
'
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
)
|
202 |
-
|
203 |
-
|
204 |
-
'
|
205 |
-
|
206 |
-
'label' => __('Heading Color', 'livemesh-el-addons'),
|
207 |
-
'type' => Controls_Manager::COLOR,
|
208 |
-
'default' => '',
|
209 |
-
'selectors' => [
|
210 |
-
'{{WRAPPER}} .lae-heading .lae-title' => 'color: {{VALUE}};',
|
211 |
-
],
|
212 |
-
]
|
213 |
-
);
|
214 |
-
|
215 |
-
$this->add_group_control(
|
216 |
-
Group_Control_Typography::get_type(),
|
217 |
-
[
|
218 |
-
'name' => 'heading_typography',
|
219 |
-
'label' => __('Typography', 'livemesh-el-addons'),
|
220 |
-
'selector' => '{{WRAPPER}} .lae-heading .lae-title',
|
221 |
-
]
|
222 |
-
);
|
223 |
-
|
224 |
$this->end_controls_section();
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
'selectors' => [
|
241 |
-
'{{WRAPPER}} .lae-heading .lae-subtitle' => 'color: {{VALUE}};',
|
242 |
-
],
|
243 |
-
]
|
244 |
-
);
|
245 |
-
|
246 |
-
$this->add_group_control(
|
247 |
-
Group_Control_Typography::get_type(),
|
248 |
-
[
|
249 |
-
'name' => 'subtitle_typography',
|
250 |
-
'selector' => '{{WRAPPER}} .lae-heading .lae-subtitle',
|
251 |
-
]
|
252 |
-
);
|
253 |
-
|
254 |
$this->end_controls_section();
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
'selectors' => [
|
271 |
-
'{{WRAPPER}} .lae-heading .lae-text' => 'color: {{VALUE}};',
|
272 |
-
],
|
273 |
-
]
|
274 |
-
);
|
275 |
-
|
276 |
-
$this->add_group_control(
|
277 |
-
Group_Control_Typography::get_type(),
|
278 |
-
[
|
279 |
-
'name' => 'text_typography',
|
280 |
-
'selector' => '{{WRAPPER}} .lae-heading .lae-text',
|
281 |
-
]
|
282 |
-
);
|
283 |
-
|
284 |
$this->end_controls_section();
|
285 |
}
|
286 |
-
|
287 |
-
protected function render()
|
288 |
-
|
289 |
$settings = $this->get_settings_for_display();
|
290 |
-
|
291 |
-
$settings = apply_filters('lae_heading_' . $this->get_id() . '_settings', $settings);
|
292 |
-
|
293 |
$args['settings'] = $settings;
|
294 |
-
|
295 |
$args['widget_instance'] = $this;
|
296 |
-
|
297 |
-
lae_get_template_part("addons/heading/{$settings['style']}", $args);
|
298 |
-
|
299 |
}
|
300 |
-
|
301 |
-
protected function content_template()
|
|
|
302 |
}
|
303 |
|
304 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Widget_Base ;
|
12 |
+
use Elementor\Controls_Manager ;
|
13 |
+
use Elementor\Scheme_Color ;
|
14 |
+
use Elementor\Group_Control_Typography ;
|
15 |
+
use Elementor\Scheme_Typography ;
|
16 |
+
if ( !defined( 'ABSPATH' ) ) {
|
17 |
+
exit;
|
18 |
+
}
|
19 |
+
// Exit if accessed directly
|
20 |
+
class LAE_Heading_Widget extends LAE_Widget_Base
|
21 |
+
{
|
22 |
+
public function get_name()
|
23 |
+
{
|
24 |
return 'lae-heading';
|
25 |
}
|
26 |
+
|
27 |
+
public function get_title()
|
28 |
+
{
|
29 |
+
return __( 'Heading', 'livemesh-el-addons' );
|
30 |
}
|
31 |
+
|
32 |
+
public function get_icon()
|
33 |
+
{
|
34 |
return 'lae-icon-heading';
|
35 |
}
|
36 |
+
|
37 |
+
public function get_categories()
|
38 |
+
{
|
39 |
+
return array( 'livemesh-addons' );
|
40 |
}
|
41 |
+
|
42 |
+
public function get_custom_help_url()
|
43 |
+
{
|
44 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/heading-addon/';
|
45 |
}
|
46 |
+
|
47 |
+
public function get_script_depends()
|
48 |
+
{
|
49 |
+
return [ 'lae-waypoints', 'lae-frontend-scripts' ];
|
|
|
|
|
50 |
}
|
51 |
+
|
52 |
+
public function get_style_depends()
|
53 |
+
{
|
54 |
+
return [ 'lae-animate-styles', 'lae-frontend-styles', 'lae-heading-styles' ];
|
|
|
|
|
|
|
55 |
}
|
56 |
+
|
57 |
+
protected function _register_controls()
|
58 |
+
{
|
59 |
+
$this->start_controls_section( 'section_heading', [
|
60 |
+
'label' => __( 'Heading', 'livemesh-el-addons' ),
|
61 |
+
] );
|
62 |
+
$this->add_control( 'style', [
|
63 |
+
'type' => Controls_Manager::SELECT,
|
64 |
+
'label' => __( 'Choose Style', 'livemesh-el-addons' ),
|
65 |
+
'default' => 'style1',
|
66 |
+
'options' => [
|
67 |
+
'style1' => __( 'Style 1', 'livemesh-el-addons' ),
|
68 |
+
'style2' => __( 'Style 2', 'livemesh-el-addons' ),
|
69 |
+
'style3' => __( 'Style 3', 'livemesh-el-addons' ),
|
70 |
+
],
|
71 |
+
] );
|
72 |
+
$this->add_control( 'heading', [
|
73 |
+
'type' => Controls_Manager::TEXT,
|
74 |
+
'label' => __( 'Heading Title', 'livemesh-el-addons' ),
|
75 |
+
'label_block' => true,
|
76 |
+
'separator' => 'before',
|
77 |
+
'default' => __( 'Heading Title', 'livemesh-el-addons' ),
|
78 |
+
'dynamic' => [
|
79 |
+
'active' => true,
|
80 |
+
],
|
81 |
+
] );
|
82 |
+
$this->add_control( 'subtitle', [
|
83 |
+
'type' => Controls_Manager::TEXT,
|
84 |
+
'label' => __( 'Subheading', 'livemesh-el-addons' ),
|
85 |
+
'label_block' => true,
|
86 |
+
'description' => __( 'A subtitle displayed above the title heading.', 'livemesh-el-addons' ),
|
87 |
+
'condition' => [
|
88 |
+
'style' => 'style2',
|
89 |
+
],
|
90 |
+
'dynamic' => [
|
91 |
+
'active' => true,
|
92 |
+
],
|
93 |
+
] );
|
94 |
+
$this->add_control( 'short_text', [
|
95 |
+
'type' => 'textarea',
|
96 |
+
'label' => __( 'Short Text', 'livemesh-el-addons' ),
|
97 |
+
'description' => __( 'Short text generally displayed below the heading title.', 'livemesh-el-addons' ),
|
98 |
+
'condition' => [
|
99 |
+
'style' => [ 'style1', 'style2' ],
|
100 |
+
],
|
101 |
+
'dynamic' => [
|
102 |
+
'active' => true,
|
103 |
+
],
|
104 |
+
] );
|
105 |
+
$this->add_control( 'heading_settings', [
|
106 |
+
'label' => __( 'Settings', 'livemesh-el-addons' ),
|
107 |
+
'type' => Controls_Manager::HEADING,
|
108 |
+
'separator' => 'before',
|
109 |
+
] );
|
110 |
+
$this->add_control( 'align', [
|
111 |
+
'label' => __( 'Alignment', 'livemesh-el-addons' ),
|
112 |
+
'type' => Controls_Manager::CHOOSE,
|
113 |
+
'options' => [
|
114 |
+
'left' => [
|
115 |
+
'title' => __( 'Left', 'livemesh-el-addons' ),
|
116 |
+
'icon' => 'fa fa-align-left',
|
117 |
+
],
|
118 |
+
'center' => [
|
119 |
+
'title' => __( 'Center', 'livemesh-el-addons' ),
|
120 |
+
'icon' => 'fa fa-align-center',
|
121 |
+
],
|
122 |
+
'right' => [
|
123 |
+
'title' => __( 'Right', 'livemesh-el-addons' ),
|
124 |
+
'icon' => 'fa fa-align-right',
|
125 |
+
],
|
126 |
+
'justify' => [
|
127 |
+
'title' => __( 'Justified', 'livemesh-el-addons' ),
|
128 |
+
'icon' => 'fa fa-align-justify',
|
129 |
+
],
|
130 |
+
],
|
131 |
+
'default' => 'center',
|
132 |
+
] );
|
133 |
+
$this->add_control( 'widget_animation', [
|
134 |
+
"type" => Controls_Manager::SELECT,
|
135 |
+
"label" => __( "Animation Type", "livemesh-el-addons" ),
|
136 |
+
'options' => lae_get_animation_options(),
|
137 |
+
'default' => 'none',
|
138 |
+
] );
|
139 |
+
$this->add_control( 'upgrade_notice', [
|
140 |
+
'type' => Controls_Manager::RAW_HTML,
|
141 |
+
'separator' => 'before',
|
142 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
143 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
144 |
$this->end_controls_section();
|
145 |
+
$this->start_controls_section( 'section_styling', [
|
146 |
+
'label' => __( 'Title', 'livemesh-el-addons' ),
|
147 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
148 |
+
] );
|
149 |
+
$this->add_control( 'title_tag', [
|
150 |
+
'label' => __( 'Title HTML Tag', 'livemesh-el-addons' ),
|
151 |
+
'type' => Controls_Manager::SELECT,
|
152 |
+
'options' => [
|
153 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
154 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
155 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
156 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
157 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
158 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
159 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
160 |
+
],
|
161 |
+
'default' => 'h3',
|
162 |
+
] );
|
163 |
+
$this->add_control( 'heading_color', [
|
164 |
+
'label' => __( 'Heading Color', 'livemesh-el-addons' ),
|
165 |
+
'type' => Controls_Manager::COLOR,
|
166 |
+
'default' => '',
|
167 |
+
'selectors' => [
|
168 |
+
'{{WRAPPER}} .lae-heading .lae-title' => 'color: {{VALUE}};',
|
169 |
+
],
|
170 |
+
] );
|
171 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
172 |
+
'name' => 'heading_typography',
|
173 |
+
'label' => __( 'Typography', 'livemesh-el-addons' ),
|
174 |
+
'selector' => '{{WRAPPER}} .lae-heading .lae-title',
|
175 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
$this->end_controls_section();
|
177 |
+
$this->start_controls_section( 'section_subtitle', [
|
178 |
+
'label' => __( 'Subtitle', 'livemesh-el-addons' ),
|
179 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
180 |
+
] );
|
181 |
+
$this->add_control( 'subtitle_color', [
|
182 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
183 |
+
'type' => Controls_Manager::COLOR,
|
184 |
+
'selectors' => [
|
185 |
+
'{{WRAPPER}} .lae-heading .lae-subtitle' => 'color: {{VALUE}};',
|
186 |
+
],
|
187 |
+
] );
|
188 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
189 |
+
'name' => 'subtitle_typography',
|
190 |
+
'selector' => '{{WRAPPER}} .lae-heading .lae-subtitle',
|
191 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
192 |
$this->end_controls_section();
|
193 |
+
$this->start_controls_section( 'section_short_text', [
|
194 |
+
'label' => __( 'Short Text', 'livemesh-el-addons' ),
|
195 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
196 |
+
] );
|
197 |
+
$this->add_control( 'text_color', [
|
198 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
199 |
+
'type' => Controls_Manager::COLOR,
|
200 |
+
'selectors' => [
|
201 |
+
'{{WRAPPER}} .lae-heading .lae-text' => 'color: {{VALUE}};',
|
202 |
+
],
|
203 |
+
] );
|
204 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
205 |
+
'name' => 'text_typography',
|
206 |
+
'selector' => '{{WRAPPER}} .lae-heading .lae-text',
|
207 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
208 |
$this->end_controls_section();
|
209 |
}
|
210 |
+
|
211 |
+
protected function render()
|
212 |
+
{
|
213 |
$settings = $this->get_settings_for_display();
|
214 |
+
$settings = apply_filters( 'lae_heading_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
215 |
$args['settings'] = $settings;
|
|
|
216 |
$args['widget_instance'] = $this;
|
217 |
+
lae_get_template_part( "addons/heading/{$settings['style']}", $args );
|
|
|
|
|
218 |
}
|
219 |
+
|
220 |
+
protected function content_template()
|
221 |
+
{
|
222 |
}
|
223 |
|
224 |
}
|
includes/widgets/odometers.php
CHANGED
@@ -6,45 +6,49 @@ Description: Display one or more animated odometer statistics in a multi-column
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
use
|
19 |
-
use
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
return 'lae-odometers';
|
29 |
}
|
30 |
-
|
31 |
-
public function get_title()
|
32 |
-
|
|
|
33 |
}
|
34 |
-
|
35 |
-
public function get_icon()
|
|
|
36 |
return 'eicon-counter';
|
37 |
}
|
38 |
-
|
39 |
-
public function get_categories()
|
40 |
-
|
|
|
41 |
}
|
42 |
-
|
43 |
-
public function get_custom_help_url()
|
|
|
44 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/statistics-addons/';
|
45 |
}
|
46 |
-
|
47 |
-
public function get_script_depends()
|
|
|
48 |
return [
|
49 |
'lae-waypoints',
|
50 |
'jquery-stats',
|
@@ -52,439 +56,307 @@ class LAE_Odometers_Widget extends LAE_Widget_Base {
|
|
52 |
'lae-odometers-scripts'
|
53 |
];
|
54 |
}
|
55 |
-
|
56 |
-
public function get_style_depends()
|
57 |
-
|
58 |
-
|
59 |
-
'lae-frontend-styles',
|
60 |
-
'lae-odometers-styles'
|
61 |
-
];
|
62 |
}
|
63 |
-
|
64 |
-
protected function _register_controls()
|
65 |
-
|
66 |
-
$this->start_controls_section(
|
67 |
-
'
|
68 |
-
|
69 |
-
'label' => __('Odometers', 'livemesh-el-addons'),
|
70 |
-
]
|
71 |
-
);
|
72 |
-
|
73 |
$repeater = new Repeater();
|
74 |
-
|
75 |
-
|
76 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
[
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
'active' => true,
|
85 |
-
],
|
86 |
-
]
|
87 |
-
);
|
88 |
-
|
89 |
-
$repeater->add_control(
|
90 |
-
'start_value',
|
91 |
[
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
$repeater->add_control(
|
100 |
-
'stop_value',
|
101 |
[
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
$repeater->add_control(
|
110 |
-
'icon_type',
|
111 |
-
|
112 |
-
[
|
113 |
-
|
114 |
-
'label' => __('Choose Icon Type', 'livemesh-el-addons'),
|
115 |
-
'type' => Controls_Manager::SELECT,
|
116 |
-
'default' => 'icon',
|
117 |
-
'options' => [
|
118 |
-
'icon' => __('Icon', 'livemesh-el-addons'),
|
119 |
-
'icon_image' => __('Icon Image', 'livemesh-el-addons'),
|
120 |
-
],
|
121 |
-
]
|
122 |
-
);
|
123 |
-
|
124 |
-
$repeater->add_control(
|
125 |
-
'icon_image',
|
126 |
-
[
|
127 |
-
|
128 |
-
'label' => __('Stats Image', 'livemesh-el-addons'),
|
129 |
-
'type' => Controls_Manager::MEDIA,
|
130 |
-
'default' => [
|
131 |
-
'url' => Utils::get_placeholder_image_src(),
|
132 |
-
],
|
133 |
-
'label_block' => true,
|
134 |
-
'condition' => [
|
135 |
-
'icon_type' => 'icon_image',
|
136 |
-
],
|
137 |
-
'dynamic' => [
|
138 |
-
'active' => true,
|
139 |
-
],
|
140 |
-
]
|
141 |
-
);
|
142 |
-
|
143 |
-
$repeater->add_control(
|
144 |
-
'selected_icon',
|
145 |
-
[
|
146 |
-
|
147 |
-
'label' => __('Stats Icon', 'livemesh-el-addons'),
|
148 |
-
'type' => Controls_Manager::ICONS,
|
149 |
-
'label_block' => true,
|
150 |
-
'condition' => [
|
151 |
-
'icon_type' => 'icon',
|
152 |
-
],
|
153 |
-
'fa4compatibility' => 'icon',
|
154 |
-
]
|
155 |
-
);
|
156 |
-
|
157 |
-
$repeater->add_control(
|
158 |
-
'prefix',
|
159 |
[
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
[
|
176 |
-
|
177 |
-
'label' => __('Suffix', 'livemesh-el-addons'),
|
178 |
-
'type' => Controls_Manager::TEXT,
|
179 |
-
'description' => __('The suffix string like hr for hours or m for million.', 'livemesh-el-addons'),
|
180 |
-
'dynamic' => [
|
181 |
-
'active' => true,
|
182 |
-
'categories' => [
|
183 |
-
TagsModule::POST_META_CATEGORY,
|
184 |
-
],
|
185 |
-
],
|
186 |
-
]
|
187 |
-
);
|
188 |
-
|
189 |
-
$this->add_control(
|
190 |
-
'odometers',
|
191 |
-
[
|
192 |
-
'label' => __('Odometers', 'livemesh-el-addons'),
|
193 |
-
'type' => Controls_Manager::REPEATER,
|
194 |
-
'default' => [
|
195 |
-
[
|
196 |
-
'stats_title' => __('No of Customers', 'livemesh-el-addons'),
|
197 |
-
'start_value' => 1000,
|
198 |
-
'stop_value' => 65600,
|
199 |
-
'prefix' => '',
|
200 |
-
'suffix' => ''
|
201 |
-
],
|
202 |
-
[
|
203 |
-
'stats_title' => __('Hours Worked', 'livemesh-el-addons'),
|
204 |
-
'start_value' => 1,
|
205 |
-
'stop_value' => 34000,
|
206 |
-
'prefix' => '',
|
207 |
-
'suffix' => ''
|
208 |
-
],
|
209 |
-
[
|
210 |
-
'stats_title' => __('Support Tickets', 'livemesh-el-addons'),
|
211 |
-
'start_value' => 1,
|
212 |
-
'stop_value' => 348,
|
213 |
-
'prefix' => '',
|
214 |
-
'suffix' => 'k'
|
215 |
-
],
|
216 |
-
[
|
217 |
-
'stats_title' => __('Product Revenue', 'livemesh-el-addons'),
|
218 |
-
'start_value' => 1,
|
219 |
-
'stop_value' => 35,
|
220 |
-
'prefix' => '$',
|
221 |
-
'suffix' => 'm'
|
222 |
-
],
|
223 |
-
],
|
224 |
-
'fields' => $repeater->get_controls(),
|
225 |
-
'title_field' => '{{{ stats_title }}}',
|
226 |
-
]
|
227 |
-
);
|
228 |
-
|
229 |
$this->end_controls_section();
|
230 |
-
|
231 |
-
|
232 |
-
'
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
'
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
'
|
279 |
-
[
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
$this->add_control(
|
301 |
-
'
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
],
|
318 |
-
]
|
319 |
-
);
|
320 |
-
|
321 |
-
$this->add_control(
|
322 |
-
'row_gap',
|
323 |
-
[
|
324 |
-
'label' => __('Row Gap', 'livemesh-el-addons'),
|
325 |
-
'type' => Controls_Manager::SLIDER,
|
326 |
-
'size_units' => ['px'],
|
327 |
-
'default' => [
|
328 |
-
'size' => 30,
|
329 |
-
],
|
330 |
-
'range' => [
|
331 |
-
'px' => [
|
332 |
-
'min' => 0,
|
333 |
-
'max' => 100,
|
334 |
-
],
|
335 |
-
],
|
336 |
-
'selectors' => [
|
337 |
-
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
338 |
-
],
|
339 |
-
]
|
340 |
-
);
|
341 |
-
|
342 |
$this->end_controls_section();
|
343 |
-
|
344 |
-
|
345 |
-
'
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-number' => 'color: {{VALUE}};',
|
359 |
-
],
|
360 |
-
]
|
361 |
-
);
|
362 |
-
|
363 |
-
$this->add_group_control(
|
364 |
-
Group_Control_Typography::get_type(),
|
365 |
-
[
|
366 |
-
'name' => 'stats_number_typography',
|
367 |
-
'selector' => '{{WRAPPER}} .lae-odometers .lae-odometer .lae-number span',
|
368 |
-
]
|
369 |
-
);
|
370 |
-
|
371 |
$this->end_controls_section();
|
372 |
-
|
373 |
-
|
374 |
-
'
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-prefix, .lae-odometers .lae-odometer .lae-suffix' => 'color: {{VALUE}};',
|
388 |
-
],
|
389 |
-
]
|
390 |
-
);
|
391 |
-
|
392 |
-
$this->add_group_control(
|
393 |
-
Group_Control_Typography::get_type(),
|
394 |
-
[
|
395 |
-
'name' => 'stats_prefix_suffix_typography',
|
396 |
-
'selector' => '{{WRAPPER}} .lae-odometers .lae-odometer .lae-prefix, .lae-odometers .lae-odometer .lae-suffix',
|
397 |
-
]
|
398 |
-
);
|
399 |
-
|
400 |
$this->end_controls_section();
|
401 |
-
|
402 |
-
|
403 |
-
'
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
],
|
419 |
-
]
|
420 |
-
);
|
421 |
-
|
422 |
-
$this->add_group_control(
|
423 |
-
Group_Control_Typography::get_type(),
|
424 |
-
[
|
425 |
-
'name' => 'stats_title_typography',
|
426 |
-
'label' => __('Typography', 'livemesh-el-addons'),
|
427 |
-
'selector' => '{{WRAPPER}} .lae-odometers .lae-odometer .lae-stats-title',
|
428 |
-
]
|
429 |
-
);
|
430 |
-
|
431 |
$this->end_controls_section();
|
432 |
-
|
433 |
-
|
434 |
-
'
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
'
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
);
|
459 |
-
|
460 |
-
$this->add_control(
|
461 |
-
'icon_color',
|
462 |
-
[
|
463 |
-
'label' => __('Icon Color', 'livemesh-el-addons'),
|
464 |
-
'type' => Controls_Manager::COLOR,
|
465 |
-
'default' => '',
|
466 |
-
'selectors' => [
|
467 |
-
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-stats-title .lae-icon-wrapper' => 'color: {{VALUE}};',
|
468 |
-
],
|
469 |
-
]
|
470 |
-
);
|
471 |
}
|
472 |
-
|
473 |
-
protected function render()
|
474 |
-
|
475 |
$settings = $this->get_settings_for_display();
|
476 |
-
|
477 |
-
$settings = apply_filters('lae_odometers_' . $this->get_id() . '_settings', $settings);
|
478 |
-
|
479 |
$args['settings'] = $settings;
|
480 |
-
|
481 |
$args['widget_instance'] = $this;
|
482 |
-
|
483 |
-
lae_get_template_part('addons/odometers/loop', $args);
|
484 |
-
|
485 |
}
|
486 |
-
|
487 |
-
protected function content_template()
|
|
|
488 |
}
|
489 |
|
490 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Utils ;
|
15 |
+
use Elementor\Scheme_Color ;
|
16 |
+
use Elementor\Group_Control_Typography ;
|
17 |
+
use Elementor\Scheme_Typography ;
|
18 |
+
use Elementor\Modules\DynamicTags\Module as TagsModule ;
|
19 |
+
if ( !defined( 'ABSPATH' ) ) {
|
20 |
+
exit;
|
21 |
+
}
|
22 |
+
// Exit if accessed directly
|
23 |
+
class LAE_Odometers_Widget extends LAE_Widget_Base
|
24 |
+
{
|
25 |
+
public function get_name()
|
26 |
+
{
|
27 |
return 'lae-odometers';
|
28 |
}
|
29 |
+
|
30 |
+
public function get_title()
|
31 |
+
{
|
32 |
+
return __( 'Odometers', 'livemesh-el-addons' );
|
33 |
}
|
34 |
+
|
35 |
+
public function get_icon()
|
36 |
+
{
|
37 |
return 'eicon-counter';
|
38 |
}
|
39 |
+
|
40 |
+
public function get_categories()
|
41 |
+
{
|
42 |
+
return array( 'livemesh-addons' );
|
43 |
}
|
44 |
+
|
45 |
+
public function get_custom_help_url()
|
46 |
+
{
|
47 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/statistics-addons/';
|
48 |
}
|
49 |
+
|
50 |
+
public function get_script_depends()
|
51 |
+
{
|
52 |
return [
|
53 |
'lae-waypoints',
|
54 |
'jquery-stats',
|
56 |
'lae-odometers-scripts'
|
57 |
];
|
58 |
}
|
59 |
+
|
60 |
+
public function get_style_depends()
|
61 |
+
{
|
62 |
+
return [ 'lae-animate-styles', 'lae-frontend-styles', 'lae-odometers-styles' ];
|
|
|
|
|
|
|
63 |
}
|
64 |
+
|
65 |
+
protected function _register_controls()
|
66 |
+
{
|
67 |
+
$this->start_controls_section( 'section_odometers', [
|
68 |
+
'label' => __( 'Odometers', 'livemesh-el-addons' ),
|
69 |
+
] );
|
|
|
|
|
|
|
|
|
70 |
$repeater = new Repeater();
|
71 |
+
$repeater->add_control( 'stats_title', [
|
72 |
+
'label' => __( 'Stats Title', 'livemesh-el-addons' ),
|
73 |
+
'default' => __( 'My stats title', 'livemesh-el-addons' ),
|
74 |
+
'type' => Controls_Manager::TEXT,
|
75 |
+
'label_block' => true,
|
76 |
+
'dynamic' => [
|
77 |
+
'active' => true,
|
78 |
+
],
|
79 |
+
] );
|
80 |
+
$repeater->add_control( 'start_value', [
|
81 |
+
'label' => __( 'Start Value', 'livemesh-el-addons' ),
|
82 |
+
'type' => Controls_Manager::NUMBER,
|
83 |
+
'default' => 0,
|
84 |
+
] );
|
85 |
+
$repeater->add_control( 'stop_value', [
|
86 |
+
'label' => __( 'Stop Value', 'livemesh-el-addons' ),
|
87 |
+
'type' => Controls_Manager::NUMBER,
|
88 |
+
'default' => 100,
|
89 |
+
] );
|
90 |
+
$repeater->add_control( 'icon_type', [
|
91 |
+
'label' => __( 'Choose Icon Type', 'livemesh-el-addons' ),
|
92 |
+
'type' => Controls_Manager::SELECT,
|
93 |
+
'default' => 'icon',
|
94 |
+
'options' => [
|
95 |
+
'icon' => __( 'Icon', 'livemesh-el-addons' ),
|
96 |
+
'icon_image' => __( 'Icon Image', 'livemesh-el-addons' ),
|
97 |
+
],
|
98 |
+
] );
|
99 |
+
$repeater->add_control( 'icon_image', [
|
100 |
+
'label' => __( 'Stats Image', 'livemesh-el-addons' ),
|
101 |
+
'type' => Controls_Manager::MEDIA,
|
102 |
+
'default' => [
|
103 |
+
'url' => Utils::get_placeholder_image_src(),
|
104 |
+
],
|
105 |
+
'label_block' => true,
|
106 |
+
'condition' => [
|
107 |
+
'icon_type' => 'icon_image',
|
108 |
+
],
|
109 |
+
'dynamic' => [
|
110 |
+
'active' => true,
|
111 |
+
],
|
112 |
+
] );
|
113 |
+
$repeater->add_control( 'selected_icon', [
|
114 |
+
'label' => __( 'Stats Icon', 'livemesh-el-addons' ),
|
115 |
+
'type' => Controls_Manager::ICONS,
|
116 |
+
'label_block' => true,
|
117 |
+
'condition' => [
|
118 |
+
'icon_type' => 'icon',
|
119 |
+
],
|
120 |
+
'fa4compatibility' => 'icon',
|
121 |
+
] );
|
122 |
+
$repeater->add_control( 'prefix', [
|
123 |
+
'label' => __( 'Prefix', 'livemesh-el-addons' ),
|
124 |
+
'type' => Controls_Manager::TEXT,
|
125 |
+
'description' => __( 'The prefix string like currency symbols like $ to indicate a monetary value.', 'livemesh-el-addons' ),
|
126 |
+
'dynamic' => [
|
127 |
+
'active' => true,
|
128 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
129 |
+
],
|
130 |
+
] );
|
131 |
+
$repeater->add_control( 'suffix', [
|
132 |
+
'label' => __( 'Suffix', 'livemesh-el-addons' ),
|
133 |
+
'type' => Controls_Manager::TEXT,
|
134 |
+
'description' => __( 'The suffix string like hr for hours or m for million.', 'livemesh-el-addons' ),
|
135 |
+
'dynamic' => [
|
136 |
+
'active' => true,
|
137 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
138 |
+
],
|
139 |
+
] );
|
140 |
+
$this->add_control( 'odometers', [
|
141 |
+
'label' => __( 'Odometers', 'livemesh-el-addons' ),
|
142 |
+
'type' => Controls_Manager::REPEATER,
|
143 |
+
'default' => [
|
144 |
[
|
145 |
+
'stats_title' => __( 'No of Customers', 'livemesh-el-addons' ),
|
146 |
+
'start_value' => 1000,
|
147 |
+
'stop_value' => 65600,
|
148 |
+
'prefix' => '',
|
149 |
+
'suffix' => '',
|
150 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
151 |
[
|
152 |
+
'stats_title' => __( 'Hours Worked', 'livemesh-el-addons' ),
|
153 |
+
'start_value' => 1,
|
154 |
+
'stop_value' => 34000,
|
155 |
+
'prefix' => '',
|
156 |
+
'suffix' => '',
|
157 |
+
],
|
|
|
|
|
|
|
158 |
[
|
159 |
+
'stats_title' => __( 'Support Tickets', 'livemesh-el-addons' ),
|
160 |
+
'start_value' => 1,
|
161 |
+
'stop_value' => 348,
|
162 |
+
'prefix' => '',
|
163 |
+
'suffix' => 'k',
|
164 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
[
|
166 |
+
'stats_title' => __( 'Product Revenue', 'livemesh-el-addons' ),
|
167 |
+
'start_value' => 1,
|
168 |
+
'stop_value' => 35,
|
169 |
+
'prefix' => '$',
|
170 |
+
'suffix' => 'm',
|
171 |
+
]
|
172 |
+
],
|
173 |
+
'fields' => $repeater->get_controls(),
|
174 |
+
'title_field' => '{{{ stats_title }}}',
|
175 |
+
] );
|
176 |
+
$this->add_control( 'upgrade_notice', [
|
177 |
+
'type' => Controls_Manager::RAW_HTML,
|
178 |
+
'separator' => 'before',
|
179 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
180 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
181 |
$this->end_controls_section();
|
182 |
+
$this->start_controls_section( 'section_grid_settings', [
|
183 |
+
'label' => __( 'Grid Settings', 'livemesh-el-addons' ),
|
184 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
185 |
+
] );
|
186 |
+
$this->add_control( 'column_layout', [
|
187 |
+
'label' => __( 'Column Layout', 'livemesh-el-addons' ),
|
188 |
+
'type' => Controls_Manager::SELECT,
|
189 |
+
'options' => array(
|
190 |
+
'auto' => __( 'Auto', 'livemesh-el-addons' ),
|
191 |
+
'custom' => __( 'Custom', 'livemesh-el-addons' ),
|
192 |
+
),
|
193 |
+
'default' => 'auto',
|
194 |
+
'description' => __( 'Set column layout to be <strong>Auto</strong> to let the widget auto calculate number of columns based on minimum column size specified. The option <strong>Custom</strong> lets you explicitly control number of columns based on screen width.', 'livemesh-el-addons' ),
|
195 |
+
] );
|
196 |
+
$this->add_control( 'min_column_size', [
|
197 |
+
'label' => __( 'Minimum Column Size', 'livemesh-el-addons' ),
|
198 |
+
'type' => Controls_Manager::SLIDER,
|
199 |
+
'size_units' => [ 'px' ],
|
200 |
+
'default' => [
|
201 |
+
'size' => 210,
|
202 |
+
],
|
203 |
+
'range' => [
|
204 |
+
'px' => [
|
205 |
+
'min' => 50,
|
206 |
+
'max' => 500,
|
207 |
+
],
|
208 |
+
],
|
209 |
+
'selectors' => [
|
210 |
+
'{{WRAPPER}} .lae-uber-grid-container.lae-grid-auto-column-layout' => 'grid-template-columns: repeat(auto-fit, minmax({{SIZE}}{{UNIT}}, 1fr));',
|
211 |
+
],
|
212 |
+
'condition' => [
|
213 |
+
'column_layout' => 'auto',
|
214 |
+
],
|
215 |
+
] );
|
216 |
+
$this->add_responsive_control( 'per_line', [
|
217 |
+
'label' => __( 'Odometers per row', 'livemesh-el-addons' ),
|
218 |
+
'type' => Controls_Manager::SELECT,
|
219 |
+
'default' => '4',
|
220 |
+
'tablet_default' => '3',
|
221 |
+
'mobile_default' => '1',
|
222 |
+
'options' => [
|
223 |
+
'1' => '1',
|
224 |
+
'2' => '2',
|
225 |
+
'3' => '3',
|
226 |
+
'4' => '4',
|
227 |
+
'5' => '5',
|
228 |
+
'6' => '6',
|
229 |
+
],
|
230 |
+
'frontend_available' => true,
|
231 |
+
'condition' => [
|
232 |
+
'column_layout' => 'custom',
|
233 |
+
],
|
234 |
+
] );
|
235 |
+
$this->add_control( 'column_gap', [
|
236 |
+
'label' => __( 'Column Gap', 'livemesh-el-addons' ),
|
237 |
+
'type' => Controls_Manager::SLIDER,
|
238 |
+
'size_units' => [ 'px' ],
|
239 |
+
'default' => [
|
240 |
+
'size' => 30,
|
241 |
+
],
|
242 |
+
'range' => [
|
243 |
+
'px' => [
|
244 |
+
'min' => 0,
|
245 |
+
'max' => 100,
|
246 |
+
],
|
247 |
+
],
|
248 |
+
'selectors' => [
|
249 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'column-gap: {{SIZE}}{{UNIT}};',
|
250 |
+
],
|
251 |
+
] );
|
252 |
+
$this->add_control( 'row_gap', [
|
253 |
+
'label' => __( 'Row Gap', 'livemesh-el-addons' ),
|
254 |
+
'type' => Controls_Manager::SLIDER,
|
255 |
+
'size_units' => [ 'px' ],
|
256 |
+
'default' => [
|
257 |
+
'size' => 30,
|
258 |
+
],
|
259 |
+
'range' => [
|
260 |
+
'px' => [
|
261 |
+
'min' => 0,
|
262 |
+
'max' => 100,
|
263 |
+
],
|
264 |
+
],
|
265 |
+
'selectors' => [
|
266 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
267 |
+
],
|
268 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
269 |
$this->end_controls_section();
|
270 |
+
$this->start_controls_section( 'section_stats_number', [
|
271 |
+
'label' => __( 'Stats Number', 'livemesh-el-addons' ),
|
272 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
273 |
+
] );
|
274 |
+
$this->add_control( 'stats_number_color', [
|
275 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
276 |
+
'type' => Controls_Manager::COLOR,
|
277 |
+
'selectors' => [
|
278 |
+
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-number' => 'color: {{VALUE}};',
|
279 |
+
],
|
280 |
+
] );
|
281 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
282 |
+
'name' => 'stats_number_typography',
|
283 |
+
'selector' => '{{WRAPPER}} .lae-odometers .lae-odometer .lae-number span',
|
284 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
285 |
$this->end_controls_section();
|
286 |
+
$this->start_controls_section( 'section_stats_prefix_suffix', [
|
287 |
+
'label' => __( 'Stats Prefix and Suffix', 'livemesh-el-addons' ),
|
288 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
289 |
+
] );
|
290 |
+
$this->add_control( 'stats_prefix_suffix_color', [
|
291 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
292 |
+
'type' => Controls_Manager::COLOR,
|
293 |
+
'selectors' => [
|
294 |
+
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-prefix, .lae-odometers .lae-odometer .lae-suffix' => 'color: {{VALUE}};',
|
295 |
+
],
|
296 |
+
] );
|
297 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
298 |
+
'name' => 'stats_prefix_suffix_typography',
|
299 |
+
'selector' => '{{WRAPPER}} .lae-odometers .lae-odometer .lae-prefix, .lae-odometers .lae-odometer .lae-suffix',
|
300 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
$this->end_controls_section();
|
302 |
+
$this->start_controls_section( 'section_styling', [
|
303 |
+
'label' => __( 'Stats Title', 'livemesh-el-addons' ),
|
304 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
305 |
+
] );
|
306 |
+
$this->add_control( 'stats_title_color', [
|
307 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
308 |
+
'type' => Controls_Manager::COLOR,
|
309 |
+
'default' => '',
|
310 |
+
'selectors' => [
|
311 |
+
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-stats-title' => 'color: {{VALUE}};',
|
312 |
+
],
|
313 |
+
] );
|
314 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
315 |
+
'name' => 'stats_title_typography',
|
316 |
+
'label' => __( 'Typography', 'livemesh-el-addons' ),
|
317 |
+
'selector' => '{{WRAPPER}} .lae-odometers .lae-odometer .lae-stats-title',
|
318 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
319 |
$this->end_controls_section();
|
320 |
+
$this->start_controls_section( 'section_icon_styling', [
|
321 |
+
'label' => __( 'Icons', 'livemesh-el-addons' ),
|
322 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
323 |
+
] );
|
324 |
+
$this->add_control( 'icon_size', [
|
325 |
+
'label' => __( 'Icon or Icon Image size in pixels', 'livemesh-el-addons' ),
|
326 |
+
'type' => Controls_Manager::SLIDER,
|
327 |
+
'size_units' => [ 'px', '%', 'em' ],
|
328 |
+
'range' => [
|
329 |
+
'px' => [
|
330 |
+
'min' => 6,
|
331 |
+
'max' => 128,
|
332 |
+
],
|
333 |
+
],
|
334 |
+
'selectors' => [
|
335 |
+
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-image-wrapper img' => 'width: {{SIZE}}{{UNIT}};',
|
336 |
+
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-icon-wrapper' => 'font-size: {{SIZE}}{{UNIT}};',
|
337 |
+
],
|
338 |
+
] );
|
339 |
+
$this->add_control( 'icon_color', [
|
340 |
+
'label' => __( 'Icon Color', 'livemesh-el-addons' ),
|
341 |
+
'type' => Controls_Manager::COLOR,
|
342 |
+
'default' => '',
|
343 |
+
'selectors' => [
|
344 |
+
'{{WRAPPER}} .lae-odometers .lae-odometer .lae-stats-title .lae-icon-wrapper' => 'color: {{VALUE}};',
|
345 |
+
],
|
346 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
}
|
348 |
+
|
349 |
+
protected function render()
|
350 |
+
{
|
351 |
$settings = $this->get_settings_for_display();
|
352 |
+
$settings = apply_filters( 'lae_odometers_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
353 |
$args['settings'] = $settings;
|
|
|
354 |
$args['widget_instance'] = $this;
|
355 |
+
lae_get_template_part( 'addons/odometers/loop', $args );
|
|
|
|
|
356 |
}
|
357 |
+
|
358 |
+
protected function content_template()
|
359 |
+
{
|
360 |
}
|
361 |
|
362 |
}
|
includes/widgets/piecharts.php
CHANGED
@@ -6,44 +6,47 @@ Description: Display one or more piecharts depicting a percentage value in a mul
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
|
16 |
-
use
|
17 |
-
use
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
public function get_name() {
|
27 |
return 'lae-piecharts';
|
28 |
}
|
29 |
-
|
30 |
-
public function get_title()
|
31 |
-
|
|
|
32 |
}
|
33 |
-
|
34 |
-
public function get_icon()
|
|
|
35 |
return 'lae-icon-piechart3';
|
36 |
}
|
37 |
-
|
38 |
-
public function get_categories()
|
39 |
-
|
|
|
40 |
}
|
41 |
-
|
42 |
-
public function get_custom_help_url()
|
|
|
43 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/statistics-addons/';
|
44 |
}
|
45 |
-
|
46 |
-
public function get_script_depends()
|
|
|
47 |
return [
|
48 |
'lae-waypoints',
|
49 |
'jquery-stats',
|
@@ -51,332 +54,228 @@ class LAE_Piecharts_Widget extends LAE_Widget_Base {
|
|
51 |
'lae-piecharts-scripts'
|
52 |
];
|
53 |
}
|
54 |
-
|
55 |
-
public function get_style_depends()
|
56 |
-
|
57 |
-
|
58 |
-
'lae-frontend-styles',
|
59 |
-
'lae-piecharts-styles'
|
60 |
-
];
|
61 |
}
|
62 |
-
|
63 |
-
protected function _register_controls()
|
64 |
-
|
65 |
-
$this->start_controls_section(
|
66 |
-
'
|
67 |
-
|
68 |
-
'label' => __('Piecharts', 'livemesh-el-addons'),
|
69 |
-
]
|
70 |
-
);
|
71 |
-
|
72 |
$repeater = new Repeater();
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
'
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
77 |
[
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
'default' => __('My stats title', 'livemesh-el-addons'),
|
82 |
-
'description' => __('The title for the piechart', 'livemesh-el-addons'),
|
83 |
-
'dynamic' => [
|
84 |
-
'active' => true,
|
85 |
-
],
|
86 |
-
]
|
87 |
-
);
|
88 |
-
|
89 |
-
$repeater->add_control(
|
90 |
-
'percentage_value',
|
91 |
-
[
|
92 |
-
|
93 |
-
'label' => __('Percentage Value', 'livemesh-el-addons'),
|
94 |
-
'type' => Controls_Manager::NUMBER,
|
95 |
-
'min' => 1,
|
96 |
-
'max' => 100,
|
97 |
-
'step' => 1,
|
98 |
-
'default' => 30,
|
99 |
-
'description' => __('The percentage value for the stats.', 'livemesh-el-addons'),
|
100 |
-
]
|
101 |
-
);
|
102 |
-
|
103 |
-
|
104 |
-
$this->add_control(
|
105 |
-
'piecharts',
|
106 |
-
[
|
107 |
-
'type' => Controls_Manager::REPEATER,
|
108 |
-
'default' => [
|
109 |
-
[
|
110 |
-
'stats_title' => __('Web Design', 'livemesh-el-addons'),
|
111 |
-
'percentage_value' => 87,
|
112 |
-
],
|
113 |
-
[
|
114 |
-
'stats_title' => __('SEO Services', 'livemesh-el-addons'),
|
115 |
-
'percentage_value' => 76,
|
116 |
-
],
|
117 |
-
[
|
118 |
-
'stats_title' => __('WordPress Development', 'livemesh-el-addons'),
|
119 |
-
'percentage_value' => 90,
|
120 |
-
],
|
121 |
-
[
|
122 |
-
'stats_title' => __('Brand Marketing', 'livemesh-el-addons'),
|
123 |
-
'percentage_value' => 40,
|
124 |
-
],
|
125 |
-
],
|
126 |
-
'fields' => $repeater->get_controls(),
|
127 |
-
'title_field' => '{{{ stats_title }}}',
|
128 |
-
]
|
129 |
-
);
|
130 |
-
|
131 |
-
$this->end_controls_section();
|
132 |
-
|
133 |
-
$this->start_controls_section(
|
134 |
-
'section_grid_settings',
|
135 |
[
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
);
|
140 |
-
|
141 |
-
$this->add_control(
|
142 |
-
'column_layout',
|
143 |
-
[
|
144 |
-
'label' => __('Column Layout', 'livemesh-el-addons'),
|
145 |
-
'type' => Controls_Manager::SELECT,
|
146 |
-
'options' => array(
|
147 |
-
'auto' => __('Auto', 'livemesh-el-addons'),
|
148 |
-
'custom' => __('Custom', 'livemesh-el-addons'),
|
149 |
-
),
|
150 |
-
'default' => 'auto',
|
151 |
-
'description' => __('Set column layout to be <strong>Auto</strong> to let the widget auto calculate number of columns based on minimum column size specified. The option <strong>Custom</strong> lets you explicitly control number of columns based on screen width.', 'livemesh-el-addons'),
|
152 |
-
]
|
153 |
-
);
|
154 |
-
|
155 |
-
$this->add_control(
|
156 |
-
'min_column_size',
|
157 |
-
[
|
158 |
-
'label' => __('Minimum Column Size', 'livemesh-el-addons'),
|
159 |
-
'type' => Controls_Manager::SLIDER,
|
160 |
-
'size_units' => ['px'],
|
161 |
-
'default' => [
|
162 |
-
'size' => 240,
|
163 |
-
],
|
164 |
-
'range' => [
|
165 |
-
'px' => [
|
166 |
-
'min' => 50,
|
167 |
-
'max' => 500,
|
168 |
-
],
|
169 |
-
],
|
170 |
-
'selectors' => [
|
171 |
-
'{{WRAPPER}} .lae-uber-grid-container.lae-grid-auto-column-layout' => 'grid-template-columns: repeat(auto-fit, minmax({{SIZE}}{{UNIT}}, 1fr));',
|
172 |
-
],
|
173 |
-
'condition' => [
|
174 |
-
'column_layout' => 'auto'
|
175 |
-
]
|
176 |
-
]
|
177 |
-
);
|
178 |
-
|
179 |
-
$this->add_responsive_control(
|
180 |
-
'per_line',
|
181 |
[
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
'tablet_default' => '2',
|
186 |
-
'mobile_default' => '1',
|
187 |
-
'options' => [
|
188 |
-
'1' => '1',
|
189 |
-
'2' => '2',
|
190 |
-
'3' => '3',
|
191 |
-
'4' => '4',
|
192 |
-
'5' => '5',
|
193 |
-
'6' => '6',
|
194 |
-
],
|
195 |
-
'frontend_available' => true,
|
196 |
-
'condition' => [
|
197 |
-
'column_layout' => 'custom'
|
198 |
-
]
|
199 |
-
]
|
200 |
-
);
|
201 |
-
|
202 |
-
$this->add_control(
|
203 |
-
'column_gap',
|
204 |
-
[
|
205 |
-
'label' => __('Column Gap', 'livemesh-el-addons'),
|
206 |
-
'type' => Controls_Manager::SLIDER,
|
207 |
-
'size_units' => ['px'],
|
208 |
-
'default' => [
|
209 |
-
'size' => 30,
|
210 |
-
],
|
211 |
-
'range' => [
|
212 |
-
'px' => [
|
213 |
-
'min' => 0,
|
214 |
-
'max' => 100,
|
215 |
-
],
|
216 |
-
],
|
217 |
-
'selectors' => [
|
218 |
-
'{{WRAPPER}} .lae-uber-grid-container' => 'column-gap: {{SIZE}}{{UNIT}};',
|
219 |
-
],
|
220 |
-
]
|
221 |
-
);
|
222 |
-
|
223 |
-
$this->add_control(
|
224 |
-
'row_gap',
|
225 |
[
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
'selectors' => [
|
239 |
-
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
240 |
-
],
|
241 |
-
]
|
242 |
-
);
|
243 |
-
|
244 |
$this->end_controls_section();
|
245 |
-
|
246 |
-
|
247 |
-
'
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
[
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
274 |
$this->end_controls_section();
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
);
|
284 |
-
|
285 |
-
|
286 |
-
'
|
287 |
-
|
288 |
-
|
289 |
-
'type' => Controls_Manager::COLOR,
|
290 |
-
'selectors' => [
|
291 |
-
'{{WRAPPER}} .lae-piechart .lae-label' => 'color: {{VALUE}};',
|
292 |
-
],
|
293 |
-
]
|
294 |
-
);
|
295 |
-
|
296 |
-
$this->add_group_control(
|
297 |
-
Group_Control_Typography::get_type(),
|
298 |
-
[
|
299 |
-
'name' => 'stats_title_typography',
|
300 |
-
'selector' => '{{WRAPPER}} .lae-piechart .lae-label',
|
301 |
-
]
|
302 |
-
);
|
303 |
-
|
304 |
$this->end_controls_section();
|
305 |
-
|
306 |
-
|
307 |
-
'
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
'{{WRAPPER}} .lae-piechart .lae-percentage span' => 'color: {{VALUE}};',
|
321 |
-
],
|
322 |
-
]
|
323 |
-
);
|
324 |
-
|
325 |
-
$this->add_group_control(
|
326 |
-
Group_Control_Typography::get_type(),
|
327 |
-
[
|
328 |
-
'name' => 'stats_percentage_typography',
|
329 |
-
'selector' => '{{WRAPPER}} .lae-piechart .lae-percentage span',
|
330 |
-
]
|
331 |
-
);
|
332 |
-
|
333 |
$this->end_controls_section();
|
334 |
-
|
335 |
-
|
336 |
-
'
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
$this->
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
);
|
361 |
-
|
362 |
-
|
|
|
|
|
363 |
}
|
364 |
-
|
365 |
-
protected function render()
|
366 |
-
|
367 |
$settings = $this->get_settings_for_display();
|
368 |
-
|
369 |
-
$settings = apply_filters('lae_piecharts_' . $this->get_id() . '_settings', $settings);
|
370 |
-
|
371 |
$args['settings'] = $settings;
|
372 |
-
|
373 |
$args['widget_instance'] = $this;
|
374 |
-
|
375 |
-
lae_get_template_part('addons/piecharts/loop', $args);
|
376 |
-
|
377 |
}
|
378 |
-
|
379 |
-
protected function content_template()
|
|
|
380 |
}
|
381 |
|
382 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Scheme_Color ;
|
15 |
+
use Elementor\Group_Control_Typography ;
|
16 |
+
use Elementor\Scheme_Typography ;
|
17 |
+
if ( !defined( 'ABSPATH' ) ) {
|
18 |
+
exit;
|
19 |
+
}
|
20 |
+
// Exit if accessed directly
|
21 |
+
class LAE_Piecharts_Widget extends LAE_Widget_Base
|
22 |
+
{
|
23 |
+
public function get_name()
|
24 |
+
{
|
|
|
25 |
return 'lae-piecharts';
|
26 |
}
|
27 |
+
|
28 |
+
public function get_title()
|
29 |
+
{
|
30 |
+
return __( 'Piecharts', 'livemesh-el-addons' );
|
31 |
}
|
32 |
+
|
33 |
+
public function get_icon()
|
34 |
+
{
|
35 |
return 'lae-icon-piechart3';
|
36 |
}
|
37 |
+
|
38 |
+
public function get_categories()
|
39 |
+
{
|
40 |
+
return array( 'livemesh-addons' );
|
41 |
}
|
42 |
+
|
43 |
+
public function get_custom_help_url()
|
44 |
+
{
|
45 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/statistics-addons/';
|
46 |
}
|
47 |
+
|
48 |
+
public function get_script_depends()
|
49 |
+
{
|
50 |
return [
|
51 |
'lae-waypoints',
|
52 |
'jquery-stats',
|
54 |
'lae-piecharts-scripts'
|
55 |
];
|
56 |
}
|
57 |
+
|
58 |
+
public function get_style_depends()
|
59 |
+
{
|
60 |
+
return [ 'lae-animate-styles', 'lae-frontend-styles', 'lae-piecharts-styles' ];
|
|
|
|
|
|
|
61 |
}
|
62 |
+
|
63 |
+
protected function _register_controls()
|
64 |
+
{
|
65 |
+
$this->start_controls_section( 'section_piecharts', [
|
66 |
+
'label' => __( 'Piecharts', 'livemesh-el-addons' ),
|
67 |
+
] );
|
|
|
|
|
|
|
|
|
68 |
$repeater = new Repeater();
|
69 |
+
$repeater->add_control( 'stats_title', [
|
70 |
+
'label' => __( 'Stats Title', 'livemesh-el-addons' ),
|
71 |
+
'type' => Controls_Manager::TEXT,
|
72 |
+
'default' => __( 'My stats title', 'livemesh-el-addons' ),
|
73 |
+
'description' => __( 'The title for the piechart', 'livemesh-el-addons' ),
|
74 |
+
'dynamic' => [
|
75 |
+
'active' => true,
|
76 |
+
],
|
77 |
+
] );
|
78 |
+
$repeater->add_control( 'percentage_value', [
|
79 |
+
'label' => __( 'Percentage Value', 'livemesh-el-addons' ),
|
80 |
+
'type' => Controls_Manager::NUMBER,
|
81 |
+
'min' => 1,
|
82 |
+
'max' => 100,
|
83 |
+
'step' => 1,
|
84 |
+
'default' => 30,
|
85 |
+
'description' => __( 'The percentage value for the stats.', 'livemesh-el-addons' ),
|
86 |
+
] );
|
87 |
+
$this->add_control( 'piecharts', [
|
88 |
+
'type' => Controls_Manager::REPEATER,
|
89 |
+
'default' => [
|
90 |
[
|
91 |
+
'stats_title' => __( 'Web Design', 'livemesh-el-addons' ),
|
92 |
+
'percentage_value' => 87,
|
93 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
94 |
[
|
95 |
+
'stats_title' => __( 'SEO Services', 'livemesh-el-addons' ),
|
96 |
+
'percentage_value' => 76,
|
97 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
98 |
[
|
99 |
+
'stats_title' => __( 'WordPress Development', 'livemesh-el-addons' ),
|
100 |
+
'percentage_value' => 90,
|
101 |
+
],
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
102 |
[
|
103 |
+
'stats_title' => __( 'Brand Marketing', 'livemesh-el-addons' ),
|
104 |
+
'percentage_value' => 40,
|
105 |
+
]
|
106 |
+
],
|
107 |
+
'fields' => $repeater->get_controls(),
|
108 |
+
'title_field' => '{{{ stats_title }}}',
|
109 |
+
] );
|
110 |
+
$this->add_control( 'upgrade_notice', [
|
111 |
+
'type' => Controls_Manager::RAW_HTML,
|
112 |
+
'separator' => 'before',
|
113 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
114 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
115 |
$this->end_controls_section();
|
116 |
+
$this->start_controls_section( 'section_grid_settings', [
|
117 |
+
'label' => __( 'Grid Settings', 'livemesh-el-addons' ),
|
118 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
119 |
+
] );
|
120 |
+
$this->add_control( 'column_layout', [
|
121 |
+
'label' => __( 'Column Layout', 'livemesh-el-addons' ),
|
122 |
+
'type' => Controls_Manager::SELECT,
|
123 |
+
'options' => array(
|
124 |
+
'auto' => __( 'Auto', 'livemesh-el-addons' ),
|
125 |
+
'custom' => __( 'Custom', 'livemesh-el-addons' ),
|
126 |
+
),
|
127 |
+
'default' => 'auto',
|
128 |
+
'description' => __( 'Set column layout to be <strong>Auto</strong> to let the widget auto calculate number of columns based on minimum column size specified. The option <strong>Custom</strong> lets you explicitly control number of columns based on screen width.', 'livemesh-el-addons' ),
|
129 |
+
] );
|
130 |
+
$this->add_control( 'min_column_size', [
|
131 |
+
'label' => __( 'Minimum Column Size', 'livemesh-el-addons' ),
|
132 |
+
'type' => Controls_Manager::SLIDER,
|
133 |
+
'size_units' => [ 'px' ],
|
134 |
+
'default' => [
|
135 |
+
'size' => 240,
|
136 |
+
],
|
137 |
+
'range' => [
|
138 |
+
'px' => [
|
139 |
+
'min' => 50,
|
140 |
+
'max' => 500,
|
141 |
+
],
|
142 |
+
],
|
143 |
+
'selectors' => [
|
144 |
+
'{{WRAPPER}} .lae-uber-grid-container.lae-grid-auto-column-layout' => 'grid-template-columns: repeat(auto-fit, minmax({{SIZE}}{{UNIT}}, 1fr));',
|
145 |
+
],
|
146 |
+
'condition' => [
|
147 |
+
'column_layout' => 'auto',
|
148 |
+
],
|
149 |
+
] );
|
150 |
+
$this->add_responsive_control( 'per_line', [
|
151 |
+
'label' => __( 'Piecharts per row', 'livemesh-el-addons' ),
|
152 |
+
'type' => Controls_Manager::SELECT,
|
153 |
+
'default' => '4',
|
154 |
+
'tablet_default' => '2',
|
155 |
+
'mobile_default' => '1',
|
156 |
+
'options' => [
|
157 |
+
'1' => '1',
|
158 |
+
'2' => '2',
|
159 |
+
'3' => '3',
|
160 |
+
'4' => '4',
|
161 |
+
'5' => '5',
|
162 |
+
'6' => '6',
|
163 |
+
],
|
164 |
+
'frontend_available' => true,
|
165 |
+
'condition' => [
|
166 |
+
'column_layout' => 'custom',
|
167 |
+
],
|
168 |
+
] );
|
169 |
+
$this->add_control( 'column_gap', [
|
170 |
+
'label' => __( 'Column Gap', 'livemesh-el-addons' ),
|
171 |
+
'type' => Controls_Manager::SLIDER,
|
172 |
+
'size_units' => [ 'px' ],
|
173 |
+
'default' => [
|
174 |
+
'size' => 30,
|
175 |
+
],
|
176 |
+
'range' => [
|
177 |
+
'px' => [
|
178 |
+
'min' => 0,
|
179 |
+
'max' => 100,
|
180 |
+
],
|
181 |
+
],
|
182 |
+
'selectors' => [
|
183 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'column-gap: {{SIZE}}{{UNIT}};',
|
184 |
+
],
|
185 |
+
] );
|
186 |
+
$this->add_control( 'row_gap', [
|
187 |
+
'label' => __( 'Row Gap', 'livemesh-el-addons' ),
|
188 |
+
'type' => Controls_Manager::SLIDER,
|
189 |
+
'size_units' => [ 'px' ],
|
190 |
+
'default' => [
|
191 |
+
'size' => 30,
|
192 |
+
],
|
193 |
+
'range' => [
|
194 |
+
'px' => [
|
195 |
+
'min' => 0,
|
196 |
+
'max' => 100,
|
197 |
+
],
|
198 |
+
],
|
199 |
+
'selectors' => [
|
200 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
201 |
+
],
|
202 |
+
] );
|
203 |
$this->end_controls_section();
|
204 |
+
$this->start_controls_section( 'section_styling', [
|
205 |
+
'label' => __( 'Piechart Styling', 'livemesh-el-addons' ),
|
206 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
207 |
+
] );
|
208 |
+
$this->add_control( 'bar_color', [
|
209 |
+
'label' => __( 'Bar color', 'livemesh-el-addons' ),
|
210 |
+
'type' => Controls_Manager::COLOR,
|
211 |
+
'default' => '#f94213',
|
212 |
+
] );
|
213 |
+
$this->add_control( 'track_color', [
|
214 |
+
'label' => __( 'Track color', 'livemesh-el-addons' ),
|
215 |
+
'type' => Controls_Manager::COLOR,
|
216 |
+
'default' => '#dddddd',
|
217 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
$this->end_controls_section();
|
219 |
+
$this->start_controls_section( 'section_stats_title', [
|
220 |
+
'label' => __( 'Stats Title', 'livemesh-el-addons' ),
|
221 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
222 |
+
] );
|
223 |
+
$this->add_control( 'stats_title_color', [
|
224 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
225 |
+
'type' => Controls_Manager::COLOR,
|
226 |
+
'selectors' => [
|
227 |
+
'{{WRAPPER}} .lae-piechart .lae-label' => 'color: {{VALUE}};',
|
228 |
+
],
|
229 |
+
] );
|
230 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
231 |
+
'name' => 'stats_title_typography',
|
232 |
+
'selector' => '{{WRAPPER}} .lae-piechart .lae-label',
|
233 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
234 |
$this->end_controls_section();
|
235 |
+
$this->start_controls_section( 'section_stats_percentage', [
|
236 |
+
'label' => __( 'Stats Percentage', 'livemesh-el-addons' ),
|
237 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
238 |
+
] );
|
239 |
+
$this->add_control( 'stats_percentage_color', [
|
240 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
241 |
+
'type' => Controls_Manager::COLOR,
|
242 |
+
'selectors' => [
|
243 |
+
'{{WRAPPER}} .lae-piechart .lae-percentage span' => 'color: {{VALUE}};',
|
244 |
+
],
|
245 |
+
] );
|
246 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
247 |
+
'name' => 'stats_percentage_typography',
|
248 |
+
'selector' => '{{WRAPPER}} .lae-piechart .lae-percentage span',
|
249 |
+
] );
|
250 |
+
$this->end_controls_section();
|
251 |
+
$this->start_controls_section( 'section_stats_percentage_symbol', [
|
252 |
+
'label' => __( 'Stats Percentage Symbol', 'livemesh-el-addons' ),
|
253 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
254 |
+
] );
|
255 |
+
$this->add_control( 'stats_percentage_symbol_color', [
|
256 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
257 |
+
'type' => Controls_Manager::COLOR,
|
258 |
+
'selectors' => [
|
259 |
+
'{{WRAPPER}} .lae-piechart .lae-percentage sup' => 'color: {{VALUE}};',
|
260 |
+
],
|
261 |
+
] );
|
262 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
263 |
+
'name' => 'stats_percentage_symbol_typography',
|
264 |
+
'selector' => '{{WRAPPER}} .lae-piechart .lae-percentage sup',
|
265 |
+
] );
|
266 |
}
|
267 |
+
|
268 |
+
protected function render()
|
269 |
+
{
|
270 |
$settings = $this->get_settings_for_display();
|
271 |
+
$settings = apply_filters( 'lae_piecharts_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
272 |
$args['settings'] = $settings;
|
|
|
273 |
$args['widget_instance'] = $this;
|
274 |
+
lae_get_template_part( 'addons/piecharts/loop', $args );
|
|
|
|
|
275 |
}
|
276 |
+
|
277 |
+
protected function content_template()
|
278 |
+
{
|
279 |
}
|
280 |
|
281 |
}
|
includes/widgets/portfolio.php
CHANGED
@@ -6,42 +6,45 @@ Description: Display posts or custom post types in a multi-column grid.
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
public function get_name() {
|
25 |
return 'lae-portfolio';
|
26 |
}
|
27 |
-
|
28 |
-
public function get_title()
|
29 |
-
|
|
|
30 |
}
|
31 |
-
|
32 |
-
public function get_icon()
|
|
|
33 |
return 'lae-icon-posts-grid-masonry';
|
34 |
}
|
35 |
-
|
36 |
-
public function get_categories()
|
37 |
-
|
|
|
38 |
}
|
39 |
-
|
40 |
-
public function get_custom_help_url()
|
|
|
41 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/posts-portfolio-grid/';
|
42 |
}
|
43 |
-
|
44 |
-
public function get_script_depends()
|
|
|
45 |
return [
|
46 |
'isotope.pkgd',
|
47 |
'imagesloaded.pkgd',
|
@@ -49,1363 +52,969 @@ class LAE_Portfolio_Widget extends LAE_Widget_Base {
|
|
49 |
'lae-portfolio-scripts'
|
50 |
];
|
51 |
}
|
52 |
-
|
53 |
-
public function get_style_depends()
|
54 |
-
|
55 |
-
|
56 |
-
'lae-grid-styles',
|
57 |
-
'lae-portfolio-styles'
|
58 |
-
];
|
59 |
}
|
60 |
-
|
61 |
-
protected function _register_controls()
|
62 |
-
|
63 |
-
$this->start_controls_section(
|
64 |
-
'
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
'
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
$this->add_control(
|
99 |
-
'
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
]
|
126 |
-
|
127 |
-
|
128 |
-
$this->add_control(
|
129 |
-
'
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
'
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
]
|
154 |
-
|
155 |
-
|
156 |
-
$this->add_control(
|
157 |
-
'
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
'menu_order' => __('Menu order', 'livemesh-el-addons'),
|
183 |
-
'post__in' => __('By include order', 'livemesh-el-addons'),
|
184 |
-
),
|
185 |
-
'default' => 'date',
|
186 |
-
'condition' => [
|
187 |
-
'query_type' => ['custom_query', 'related']
|
188 |
-
]
|
189 |
-
]
|
190 |
-
);
|
191 |
-
|
192 |
-
$this->add_control(
|
193 |
-
'order',
|
194 |
-
[
|
195 |
-
'label' => __('Order', 'livemesh-el-addons'),
|
196 |
-
'type' => Controls_Manager::SELECT,
|
197 |
-
'options' => array(
|
198 |
-
'ASC' => __('Ascending', 'livemesh-el-addons'),
|
199 |
-
'DESC' => __('Descending', 'livemesh-el-addons'),
|
200 |
-
),
|
201 |
-
'default' => 'DESC',
|
202 |
-
'condition' => [
|
203 |
-
'query_type' => ['custom_query', 'related']
|
204 |
-
]
|
205 |
-
]
|
206 |
-
);
|
207 |
-
|
208 |
-
|
209 |
-
$this->add_control(
|
210 |
-
'offset',
|
211 |
-
[
|
212 |
-
'label' => __('Offset', 'livemesh-el-addons'),
|
213 |
-
'description' => __('Number of posts to skip or pass over.', 'livemesh-el-addons'),
|
214 |
-
'type' => Controls_Manager::NUMBER,
|
215 |
-
'default' => 0,
|
216 |
-
'condition' => [
|
217 |
-
'query_type' => 'custom_query'
|
218 |
-
]
|
219 |
-
]
|
220 |
-
);
|
221 |
-
|
222 |
$this->end_controls_section();
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
'
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
'default' => [],
|
260 |
-
'options' => $this->get_item_template_options(),
|
261 |
-
'condition' => [
|
262 |
-
'grid_skin' => 'custom_skin'
|
263 |
-
],
|
264 |
-
]
|
265 |
-
);
|
266 |
-
|
267 |
-
$this->add_control(
|
268 |
-
'grid_template',
|
269 |
-
[
|
270 |
-
'label' => __('Select the custom grid template for the grid item', 'livemesh-el-addons'),
|
271 |
-
'description' => '<div style="text-align:center;font-style: normal;">'
|
272 |
-
. '<a target="_blank" class="elementor-button elementor-button-default" href="'
|
273 |
-
. esc_url(admin_url('/edit.php?post_type=elementor_library&tabs_group=theme&elementor_library_type=livemesh_grid'))
|
274 |
-
. '">'
|
275 |
-
. __('Create/Edit the Grid Builder Templates', 'livemesh-el-addons')
|
276 |
-
. '</a>'
|
277 |
-
. '</div>',
|
278 |
-
'type' => Controls_Manager::SELECT,
|
279 |
-
'label_block' => true,
|
280 |
-
'default' => [],
|
281 |
-
'options' => $this->get_grid_template_options(),
|
282 |
-
'condition' => [
|
283 |
-
'grid_skin' => 'custom_grid'
|
284 |
-
],
|
285 |
-
]
|
286 |
-
);
|
287 |
-
|
288 |
$this->end_controls_section();
|
289 |
-
|
290 |
-
|
291 |
-
'
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
$this->
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
);
|
308 |
-
|
309 |
-
|
310 |
-
'
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
'
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
);
|
332 |
-
|
333 |
-
|
334 |
-
'
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
'
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
);
|
356 |
-
|
357 |
-
|
358 |
-
'
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
'
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
);
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
'
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
'return_value' => 'yes',
|
390 |
-
'default' => 'yes',
|
391 |
-
]
|
392 |
-
);
|
393 |
-
|
394 |
-
|
395 |
-
$this->add_control(
|
396 |
-
'display_post_date',
|
397 |
-
[
|
398 |
-
'label' => __('Display post date info for the post item?', 'livemesh-el-addons'),
|
399 |
-
'type' => Controls_Manager::SWITCHER,
|
400 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
401 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
402 |
-
'return_value' => 'yes',
|
403 |
-
'default' => 'yes',
|
404 |
-
]
|
405 |
-
);
|
406 |
-
|
407 |
-
|
408 |
-
$this->add_control(
|
409 |
-
'display_taxonomy',
|
410 |
-
[
|
411 |
-
'label' => __('Display taxonomy info for the post item?', 'livemesh-el-addons'),
|
412 |
-
'type' => Controls_Manager::SWITCHER,
|
413 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
414 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
415 |
-
'return_value' => 'yes',
|
416 |
-
'default' => 'yes',
|
417 |
-
]
|
418 |
-
);
|
419 |
-
|
420 |
-
$this->add_control(
|
421 |
-
'display_read_more',
|
422 |
-
[
|
423 |
-
'label' => __('Display read more link to the post/portfolio?', 'livemesh-el-addons'),
|
424 |
-
'type' => Controls_Manager::SWITCHER,
|
425 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
426 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
427 |
-
'return_value' => 'yes',
|
428 |
-
'default' => 'no',
|
429 |
-
]
|
430 |
-
);
|
431 |
-
|
432 |
-
$this->add_control(
|
433 |
-
'read_more_text',
|
434 |
-
[
|
435 |
-
'label' => __('Read more text', 'livemesh-el-addons'),
|
436 |
-
'type' => Controls_Manager::TEXT,
|
437 |
-
"description" => __('Specify the text for the read more link/button', 'livemesh-el-addons'),
|
438 |
-
'default' => __('Read More', 'livemesh-el-addons'),
|
439 |
-
'condition' => [
|
440 |
-
'display_read_more' => ['yes']
|
441 |
-
],
|
442 |
-
]
|
443 |
-
);
|
444 |
-
|
445 |
$this->end_controls_section();
|
446 |
-
|
447 |
-
|
448 |
-
'
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
'
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
|
484 |
-
'
|
485 |
-
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
);
|
494 |
-
|
495 |
-
|
496 |
-
'
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
'options' => [
|
504 |
-
'1' => '1',
|
505 |
-
'2' => '2',
|
506 |
-
'3' => '3',
|
507 |
-
'4' => '4',
|
508 |
-
'5' => '5',
|
509 |
-
'6' => '6',
|
510 |
-
],
|
511 |
-
'frontend_available' => true,
|
512 |
-
]
|
513 |
-
);
|
514 |
-
|
515 |
-
$this->add_control(
|
516 |
-
'layout_mode',
|
517 |
-
[
|
518 |
-
'type' => Controls_Manager::SELECT,
|
519 |
-
'label' => __('Choose a layout for the grid', 'livemesh-el-addons'),
|
520 |
-
'options' => array(
|
521 |
-
'fitRows' => __('Fit Rows', 'livemesh-el-addons'),
|
522 |
-
'masonry' => __('Masonry', 'livemesh-el-addons'),
|
523 |
-
),
|
524 |
-
'default' => 'fitRows',
|
525 |
-
]
|
526 |
-
);
|
527 |
-
|
528 |
$this->end_controls_section();
|
529 |
-
|
530 |
-
|
531 |
-
'
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
|
538 |
-
$this->add_control(
|
539 |
-
'
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
'
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
'(tablet-){{WRAPPER}} .lae-portfolio' => 'margin-left: -{{VALUE}}px; margin-right: -{{VALUE}}px;',
|
579 |
-
'(tablet-){{WRAPPER}} .lae-portfolio .lae-portfolio-item' => 'padding: {{VALUE}}px;',
|
580 |
-
],
|
581 |
-
]
|
582 |
-
);
|
583 |
-
|
584 |
-
|
585 |
-
$this->add_control(
|
586 |
-
'heading_mobile',
|
587 |
-
[
|
588 |
-
'label' => __('Mobile Phone', 'livemesh-el-addons'),
|
589 |
-
'type' => Controls_Manager::HEADING,
|
590 |
-
'separator' => 'after',
|
591 |
-
]
|
592 |
-
);
|
593 |
-
|
594 |
-
$this->add_control(
|
595 |
-
'mobile_gutter',
|
596 |
-
[
|
597 |
-
'label' => __('Gutter', 'livemesh-el-addons'),
|
598 |
-
'description' => __('Space between columns.', 'livemesh-el-addons'),
|
599 |
-
'type' => Controls_Manager::NUMBER,
|
600 |
-
'default' => 10,
|
601 |
-
'selectors' => [
|
602 |
-
'(mobile-){{WRAPPER}} .lae-portfolio' => 'margin-left: -{{VALUE}}px; margin-right: -{{VALUE}}px;',
|
603 |
-
'(mobile-){{WRAPPER}} .lae-portfolio .lae-portfolio-item' => 'padding: {{VALUE}}px;',
|
604 |
-
],
|
605 |
-
]
|
606 |
-
);
|
607 |
-
|
608 |
-
|
609 |
$this->end_controls_section();
|
610 |
-
|
611 |
-
|
612 |
-
'
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
'
|
621 |
-
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
)
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
[
|
640 |
-
'label' => __('Heading Color', 'livemesh-el-addons'),
|
641 |
-
'type' => Controls_Manager::COLOR,
|
642 |
-
'selectors' => [
|
643 |
-
'{{WRAPPER}} .lae-portfolio-wrap .lae-heading' => 'color: {{VALUE}};',
|
644 |
-
],
|
645 |
-
]
|
646 |
-
);
|
647 |
-
|
648 |
-
$this->add_group_control(
|
649 |
-
Group_Control_Typography::get_type(),
|
650 |
-
[
|
651 |
-
'name' => 'heading_typography',
|
652 |
-
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-heading',
|
653 |
-
]
|
654 |
-
);
|
655 |
-
|
656 |
$this->end_controls_section();
|
657 |
-
|
658 |
-
|
659 |
-
'
|
660 |
-
|
661 |
-
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
'
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
);
|
687 |
-
|
688 |
-
$this->add_control(
|
689 |
-
'filter_active_border',
|
690 |
-
[
|
691 |
-
'label' => __('Active Filter Border Color', 'livemesh-el-addons'),
|
692 |
-
'type' => Controls_Manager::COLOR,
|
693 |
-
'selectors' => [
|
694 |
-
'{{WRAPPER}} .lae-portfolio-wrap .lae-taxonomy-filter .lae-filter-item.lae-active:after ' => 'border-color: {{VALUE}};',
|
695 |
-
],
|
696 |
-
]
|
697 |
-
);
|
698 |
-
|
699 |
-
$this->add_group_control(
|
700 |
-
Group_Control_Typography::get_type(),
|
701 |
-
[
|
702 |
-
'name' => 'filter_typography',
|
703 |
-
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-taxonomy-filter .lae-filter-item a',
|
704 |
-
]
|
705 |
-
);
|
706 |
-
|
707 |
$this->end_controls_section();
|
708 |
-
|
709 |
-
|
710 |
-
'
|
711 |
-
[
|
712 |
-
|
713 |
-
|
714 |
-
|
715 |
-
|
716 |
-
|
717 |
-
|
718 |
-
|
719 |
-
|
720 |
-
$this->add_control(
|
721 |
-
'
|
722 |
-
|
723 |
-
|
724 |
-
|
725 |
-
|
726 |
-
|
727 |
-
|
728 |
-
|
729 |
-
|
730 |
-
'
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
|
740 |
-
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
);
|
757 |
-
|
758 |
-
|
759 |
-
'
|
760 |
-
[
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
);
|
776 |
-
|
777 |
-
$this->add_control(
|
778 |
-
'heading_thumbnail_info_taxonomy',
|
779 |
-
[
|
780 |
-
'label' => __('Thumbnail Info Taxonomy Terms', 'livemesh-el-addons'),
|
781 |
-
'type' => Controls_Manager::HEADING,
|
782 |
-
'separator' => 'after',
|
783 |
-
]
|
784 |
-
);
|
785 |
-
|
786 |
-
$this->add_control(
|
787 |
-
'thumbnail_info_tags_color',
|
788 |
-
[
|
789 |
-
'label' => __('Taxonomy Terms Color', 'livemesh-el-addons'),
|
790 |
-
'type' => Controls_Manager::COLOR,
|
791 |
-
'selectors' => [
|
792 |
-
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-terms, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-terms a' => 'color: {{VALUE}};',
|
793 |
-
],
|
794 |
-
]
|
795 |
-
);
|
796 |
-
|
797 |
-
$this->add_control(
|
798 |
-
'thumbnail_info_tags_hover_color',
|
799 |
-
[
|
800 |
-
'label' => __('Taxonomy Terms Hover Color', 'livemesh-el-addons'),
|
801 |
-
'type' => Controls_Manager::COLOR,
|
802 |
-
'selectors' => [
|
803 |
-
'{{WRAPPER}} .lae-block-grid .lae-module .lae-module-image .lae-terms a:hover' => 'color: {{VALUE}};',
|
804 |
-
],
|
805 |
-
]
|
806 |
-
);
|
807 |
-
|
808 |
-
$this->add_group_control(
|
809 |
-
Group_Control_Typography::get_type(),
|
810 |
-
[
|
811 |
-
'name' => 'tags_typography',
|
812 |
-
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-terms:hover, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-terms a:hover',
|
813 |
-
]
|
814 |
-
);
|
815 |
-
|
816 |
$this->end_controls_section();
|
817 |
-
|
818 |
-
|
819 |
-
'
|
820 |
-
[
|
821 |
-
|
822 |
-
|
823 |
-
|
824 |
-
|
825 |
-
|
826 |
-
|
827 |
-
|
828 |
-
|
829 |
-
|
830 |
-
'
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
'
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
|
854 |
-
|
855 |
-
|
856 |
-
);
|
857 |
-
|
858 |
-
$this->add_control(
|
859 |
-
'entry_title_hover_color',
|
860 |
-
[
|
861 |
-
'label' => __('Entry Title Hover Color', 'livemesh-el-addons'),
|
862 |
-
'type' => Controls_Manager::COLOR,
|
863 |
-
'selectors' => [
|
864 |
-
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-title a:hover' => 'color: {{VALUE}};',
|
865 |
-
],
|
866 |
-
]
|
867 |
-
);
|
868 |
-
|
869 |
-
$this->add_group_control(
|
870 |
-
Group_Control_Typography::get_type(),
|
871 |
-
[
|
872 |
-
'name' => 'entry_title_typography',
|
873 |
-
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-title',
|
874 |
-
]
|
875 |
-
);
|
876 |
-
|
877 |
$this->end_controls_section();
|
878 |
-
|
879 |
-
|
880 |
-
'
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-summary' => 'color: {{VALUE}};',
|
894 |
-
],
|
895 |
-
]
|
896 |
-
);
|
897 |
-
|
898 |
-
$this->add_group_control(
|
899 |
-
Group_Control_Typography::get_type(),
|
900 |
-
[
|
901 |
-
'name' => 'entry_summary_typography',
|
902 |
-
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-summary',
|
903 |
-
]
|
904 |
-
);
|
905 |
-
|
906 |
$this->end_controls_section();
|
907 |
-
|
908 |
-
|
909 |
-
'
|
910 |
-
[
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
$this->add_control(
|
920 |
-
'
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
)
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
);
|
946 |
-
|
947 |
-
|
948 |
-
$this->add_control(
|
949 |
-
'heading_entry_meta_link',
|
950 |
-
[
|
951 |
-
'label' => __('Entry Meta Link', 'livemesh-el-addons'),
|
952 |
-
'type' => Controls_Manager::HEADING,
|
953 |
-
'separator' => 'after',
|
954 |
-
]
|
955 |
-
);
|
956 |
-
|
957 |
-
$this->add_control(
|
958 |
-
'entry_meta_link_color',
|
959 |
-
[
|
960 |
-
'label' => __('Entry Meta Link Color', 'livemesh-el-addons'),
|
961 |
-
'type' => Controls_Manager::COLOR,
|
962 |
-
'selectors' => [
|
963 |
-
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-entry-meta span a' => 'color: {{VALUE}};',
|
964 |
-
],
|
965 |
-
]
|
966 |
-
);
|
967 |
-
|
968 |
-
$this->add_group_control(
|
969 |
-
Group_Control_Typography::get_type(),
|
970 |
-
[
|
971 |
-
'name' => 'entry_meta_link_typography',
|
972 |
-
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-entry-meta span a',
|
973 |
-
]
|
974 |
-
);
|
975 |
-
|
976 |
$this->end_controls_section();
|
977 |
-
|
978 |
-
|
979 |
-
'
|
980 |
-
[
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
)
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
[
|
1003 |
-
'label' => __('Read More Hover Color', 'livemesh-el-addons'),
|
1004 |
-
'type' => Controls_Manager::COLOR,
|
1005 |
-
'selectors' => [
|
1006 |
-
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more:hover, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more a:hover' => 'color: {{VALUE}};',
|
1007 |
-
],
|
1008 |
-
]
|
1009 |
-
);
|
1010 |
-
|
1011 |
-
$this->add_group_control(
|
1012 |
-
Group_Control_Typography::get_type(),
|
1013 |
-
[
|
1014 |
-
'name' => 'read_more_typography',
|
1015 |
-
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more a',
|
1016 |
-
]
|
1017 |
-
);
|
1018 |
-
|
1019 |
$this->end_controls_section();
|
1020 |
-
|
1021 |
-
|
1022 |
}
|
1023 |
-
|
1024 |
-
protected function get_item_template_content($template_id, $settings)
|
1025 |
-
|
1026 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
else {
|
1031 |
-
$output = lae_get_item_template_content($template_id, $settings);
|
1032 |
}
|
1033 |
-
|
1034 |
return $output;
|
1035 |
-
|
1036 |
}
|
1037 |
-
|
1038 |
-
protected function get_grid_template_content($template_id, $settings)
|
1039 |
-
|
1040 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
1041 |
-
|
1042 |
-
|
1043 |
-
|
1044 |
-
else {
|
1045 |
-
$output = lae_get_template_content($template_id, $settings);
|
1046 |
}
|
1047 |
-
|
1048 |
return $output;
|
1049 |
-
|
1050 |
}
|
1051 |
-
|
1052 |
-
protected function get_item_template_options()
|
1053 |
-
|
1054 |
$template_options = array();
|
1055 |
-
|
1056 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
1057 |
-
|
1058 |
-
|
1059 |
-
|
1060 |
-
|
|
|
|
|
1061 |
$templates = lae_get_livemesh_item_templates();
|
1062 |
-
|
1063 |
//$template_options = [0 => __('Select a template', 'livemesh-el-addons')];
|
1064 |
-
|
1065 |
-
foreach ($templates as $template) {
|
1066 |
$template_options[$template->ID] = $template->post_title;
|
1067 |
}
|
1068 |
}
|
1069 |
-
|
1070 |
return $template_options;
|
1071 |
}
|
1072 |
-
|
1073 |
-
protected function get_grid_template_options()
|
1074 |
-
|
1075 |
$template_options = array();
|
1076 |
-
|
1077 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
1078 |
-
|
1079 |
-
|
1080 |
-
|
1081 |
-
|
|
|
|
|
1082 |
$templates = lae_get_livemesh_grid_templates();
|
1083 |
-
|
1084 |
//$template_options = [0 => __('Select a template', 'livemesh-el-addons')];
|
1085 |
-
|
1086 |
-
foreach ($templates as $template) {
|
1087 |
$template_options[$template->ID] = $template->post_title;
|
1088 |
}
|
1089 |
}
|
1090 |
-
|
1091 |
return $template_options;
|
1092 |
}
|
1093 |
-
|
1094 |
-
protected function get_item_templates($shortcode_pattern, $grid_template_content)
|
1095 |
-
|
1096 |
$matches = array();
|
1097 |
-
|
1098 |
-
|
1099 |
-
|
1100 |
-
$attributes = array_pop($matches); // fetch last array element
|
1101 |
-
|
1102 |
$item_templates = array();
|
1103 |
-
|
1104 |
-
|
1105 |
-
|
1106 |
-
list($key, $val) = explode("=", $attribute);
|
1107 |
-
|
1108 |
-
$item_templates[] = trim($val, '"');
|
1109 |
-
|
1110 |
}
|
1111 |
return $item_templates;
|
1112 |
}
|
1113 |
-
|
1114 |
-
protected function render()
|
1115 |
-
|
1116 |
$settings = $this->get_settings_for_display();
|
1117 |
-
|
1118 |
-
$settings = apply_filters('lae_posts_grid_' . $this->get_id() . '_settings', $settings);
|
1119 |
-
|
1120 |
// Use the processed post selector query to find posts.
|
1121 |
-
$query_args = lae_build_query_args($settings);
|
1122 |
-
|
1123 |
-
$
|
1124 |
-
|
1125 |
-
$loop = new \WP_Query($query_args);
|
1126 |
-
|
1127 |
// Loop through the posts and do something with them.
|
1128 |
-
|
1129 |
-
|
1130 |
-
$dir = is_rtl() ? ' dir="rtl"' : '';
|
1131 |
-
|
1132 |
-
$target = $settings['post_link_new_window'] == 'yes' ? ' target="_blank"' : '';
|
1133 |
-
|
1134 |
// Check if any taxonomy filter has been applied
|
1135 |
-
list($chosen_terms, $taxonomies) = lae_get_chosen_terms($query_args);
|
1136 |
-
|
1137 |
-
if (empty($chosen_terms))
|
1138 |
$taxonomies[] = $settings['taxonomy_filter'];
|
1139 |
-
|
1140 |
$output = '<div class="lae-portfolio-wrap lae-gapless-grid">';
|
1141 |
-
|
1142 |
-
if (!empty($settings['heading']) || $settings['filterable'] == 'yes')
|
1143 |
-
|
1144 |
-
$header_class = (trim($settings['heading']) === '') ? ' lae-no-heading' : '';
|
1145 |
-
|
1146 |
$grid_header = '<div class="lae-portfolio-header ' . $header_class . '">';
|
1147 |
-
|
1148 |
-
|
1149 |
-
|
1150 |
-
|
1151 |
-
|
1152 |
-
|
1153 |
-
|
1154 |
-
endif;
|
1155 |
-
|
1156 |
-
if ($settings['filterable'] == 'yes')
|
1157 |
-
$grid_header .= lae_get_taxonomy_terms_filter($taxonomies, $chosen_terms);
|
1158 |
-
|
1159 |
$grid_header .= '</div>';
|
1160 |
-
|
1161 |
-
|
1162 |
-
|
1163 |
-
|
1164 |
-
|
1165 |
-
if ($settings['grid_skin'] == 'custom_grid') :
|
1166 |
-
|
1167 |
$grid_template_id = $settings['grid_template'];
|
1168 |
-
|
1169 |
-
if (!$grid_template_id)
|
1170 |
-
|
1171 |
-
|
1172 |
-
|
1173 |
-
|
1174 |
-
|
1175 |
-
$shortcode_pattern = "/\[livemesh_grid_item (.+?)\]/";
|
1176 |
-
|
1177 |
-
$grid_template_content = $this->get_grid_template_content($grid_template_id, $settings);
|
1178 |
-
|
1179 |
-
$item_templates = $this->get_item_templates($shortcode_pattern, $grid_template_content);
|
1180 |
-
|
1181 |
$item_template_walker = array();
|
1182 |
-
|
1183 |
-
$output .= '<div' . $dir . ' id="lae-portfolio-' . uniqid()
|
1184 |
-
. '" class="lae-portfolio lae-grid-container '
|
1185 |
-
. 'lae-' . str_replace('_', '-', $settings['grid_skin'])
|
1186 |
-
. '">';
|
1187 |
-
|
1188 |
$template_output = '';
|
1189 |
-
|
1190 |
-
|
1191 |
-
|
1192 |
-
if (empty($item_template_walker)) {
|
1193 |
$template_output .= $grid_template_content;
|
1194 |
-
|
1195 |
$item_template_walker = $item_templates;
|
1196 |
-
|
1197 |
}
|
1198 |
-
|
1199 |
-
$item_template_id = array_shift($item_template_walker);
|
1200 |
-
|
1201 |
-
$item_template_content = $this->get_item_template_content($item_template_id, $settings);
|
1202 |
-
|
1203 |
// Replace the first element with the grid template content for the item
|
1204 |
-
$template_output = preg_replace(
|
1205 |
-
|
1206 |
-
|
1207 |
-
|
|
|
|
|
|
|
1208 |
// Replace the remaining shortcode occurrences in the grid template content with a placeholder string
|
1209 |
-
$template_output = preg_replace($shortcode_pattern, '', $template_output);
|
1210 |
-
|
1211 |
-
|
1212 |
-
|
1213 |
-
|
1214 |
-
|
1215 |
-
|
1216 |
-
|
1217 |
-
|
1218 |
-
|
1219 |
-
|
1220 |
-
. lae_get_grid_classes($settings)
|
1221 |
-
. '" data-isotope-options=\'{ "itemSelector": ".lae-portfolio-item", "layoutMode": "' . esc_attr($settings['layout_mode']) . '", "originLeft": ' . esc_attr(!is_rtl() ? 'true' : 'false') . '}\'>';
|
1222 |
-
|
1223 |
$current_page = get_queried_object_id();
|
1224 |
-
|
1225 |
-
|
1226 |
-
|
1227 |
$post_id = get_the_ID();
|
1228 |
-
|
1229 |
-
|
1230 |
-
|
1231 |
-
|
1232 |
$style = '';
|
1233 |
-
foreach ($taxonomies as $taxonomy) {
|
1234 |
-
$terms = get_the_terms($post_id, $taxonomy);
|
1235 |
-
if (!empty($terms) && !is_wp_error($terms)) {
|
1236 |
-
foreach ($terms as $term) {
|
1237 |
$style .= ' term-' . $term->term_id;
|
1238 |
}
|
1239 |
}
|
1240 |
}
|
1241 |
-
|
1242 |
$entry_output = '<div data-id="id-' . $post_id . '" class="lae-grid-item lae-portfolio-item ' . $style . '">';
|
1243 |
-
|
1244 |
-
|
1245 |
-
|
1246 |
-
if ($settings['grid_skin'] == 'custom_skin') :
|
1247 |
-
|
1248 |
$item_template_id = $settings['item_template'];
|
1249 |
-
|
1250 |
-
if ($item_template_id)
|
1251 |
-
|
1252 |
-
$
|
1253 |
-
|
1254 |
-
|
1255 |
-
|
1256 |
-
|
1257 |
-
|
1258 |
-
|
1259 |
-
|
1260 |
-
|
1261 |
-
|
1262 |
-
|
1263 |
-
|
1264 |
-
|
1265 |
-
|
1266 |
$entry_image = '<div class="lae-project-image">';
|
1267 |
-
|
1268 |
-
|
1269 |
-
|
1270 |
-
$thumbnail_html = lae_get_image_html(
|
1271 |
-
|
1272 |
-
|
1273 |
-
|
|
|
|
|
|
|
1274 |
$thumbnail_html = '<a href="' . get_the_permalink() . '"̌̌' . $target . '>' . $thumbnail_html . '</a>';
|
1275 |
-
|
1276 |
-
|
1277 |
-
|
1278 |
-
|
1279 |
-
|
1280 |
-
|
1281 |
-
|
|
|
|
|
1282 |
$image_info = '<div class="lae-image-info">';
|
1283 |
-
|
1284 |
$image_info .= '<div class="lae-entry-info">';
|
1285 |
-
|
1286 |
-
if ($settings['display_title_on_thumbnail'] == 'yes'):
|
1287 |
-
|
1288 |
$image_info .= '<' . $settings['title_tag'] . ' class="lae-post-title"><a href="' . get_permalink() . '" title="' . get_the_title() . '" rel="bookmark"' . $target . '>' . get_the_title() . '</a></' . $settings['title_tag'] . '>';
|
1289 |
-
|
1290 |
-
|
1291 |
-
|
1292 |
-
|
1293 |
-
|
1294 |
-
$image_info .= lae_get_info_for_taxonomies($taxonomies);
|
1295 |
-
|
1296 |
-
endif;
|
1297 |
-
|
1298 |
$image_info .= '</div>';
|
1299 |
-
|
1300 |
$image_info .= '</div><!-- .lae-image-info -->';
|
1301 |
-
|
1302 |
-
|
1303 |
-
|
|
|
|
|
|
|
1304 |
$entry_image .= '</div>';
|
1305 |
-
|
1306 |
-
|
1307 |
-
|
1308 |
-
|
1309 |
-
|
1310 |
-
|
1311 |
-
|
1312 |
-
|
1313 |
-
|
1314 |
-
|
1315 |
-
|
1316 |
-
|
1317 |
-
|
|
|
|
|
1318 |
$entry_title = '<' . $settings['entry_title_tag'] . ' class="entry-title"><a href="' . get_permalink() . '" title="' . get_the_title() . '" rel="bookmark"' . $target . '>' . get_the_title() . '</a></' . $settings['entry_title_tag'] . '>';
|
1319 |
-
|
1320 |
-
|
1321 |
-
|
1322 |
-
|
1323 |
-
|
1324 |
-
|
1325 |
-
|
|
|
|
|
|
|
1326 |
$entry_meta = '<div class="lae-entry-meta">';
|
1327 |
-
|
1328 |
-
if ($settings['display_author'] == 'yes'):
|
1329 |
-
|
1330 |
$entry_meta .= lae_entry_author();
|
1331 |
-
|
1332 |
-
|
1333 |
-
|
1334 |
-
if ($settings['display_post_date'] == 'yes'):
|
1335 |
-
|
1336 |
$entry_meta .= lae_entry_published();
|
1337 |
-
|
1338 |
-
|
1339 |
-
|
1340 |
-
|
1341 |
-
|
1342 |
-
$entry_meta .= lae_get_info_for_taxonomies($taxonomies);
|
1343 |
-
|
1344 |
-
endif;
|
1345 |
-
|
1346 |
$entry_meta .= '</div>';
|
1347 |
-
|
1348 |
-
|
1349 |
-
|
1350 |
-
|
1351 |
-
|
1352 |
-
|
1353 |
-
|
|
|
|
|
|
|
1354 |
$excerpt = '<div class="entry-summary">';
|
1355 |
-
|
1356 |
$excerpt .= get_the_excerpt();
|
1357 |
-
|
1358 |
$excerpt .= '</div>';
|
1359 |
-
|
1360 |
-
|
1361 |
-
|
1362 |
-
|
1363 |
-
|
1364 |
-
|
1365 |
-
|
|
|
|
|
|
|
1366 |
$read_more_text = $settings['read_more_text'];
|
1367 |
-
|
1368 |
$read_more = '<div class="lae-read-more">';
|
1369 |
-
|
1370 |
$read_more .= '<a href="' . get_the_permalink() . '"' . $target . '>' . $read_more_text . '</a>';
|
1371 |
-
|
1372 |
$read_more .= '</div>';
|
1373 |
-
|
1374 |
-
|
1375 |
-
|
1376 |
-
|
1377 |
-
|
|
|
|
|
|
|
1378 |
$entry_text .= '</div>';
|
1379 |
-
|
1380 |
-
|
1381 |
-
|
1382 |
-
|
1383 |
-
|
1384 |
-
|
1385 |
-
|
|
|
|
|
|
|
1386 |
$entry_output .= '</article><!-- .hentry -->';
|
1387 |
-
|
1388 |
$entry_output .= '</div>';
|
1389 |
-
|
1390 |
-
|
1391 |
-
|
1392 |
-
|
1393 |
-
|
|
|
|
|
1394 |
wp_reset_postdata();
|
1395 |
-
|
1396 |
$output .= '</div><!-- .lae-portfolio -->';
|
1397 |
-
|
1398 |
$output .= '</div><!-- .lae-portfolio-wrap -->';
|
1399 |
-
|
1400 |
-
|
1401 |
-
|
1402 |
-
|
1403 |
-
|
1404 |
-
endif;
|
1405 |
-
|
1406 |
}
|
1407 |
-
|
1408 |
-
protected function content_template()
|
|
|
1409 |
}
|
1410 |
|
1411 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Widget_Base ;
|
12 |
+
use Elementor\Controls_Manager ;
|
13 |
+
use Elementor\Group_Control_Image_Size ;
|
14 |
+
use Elementor\Group_Control_Typography ;
|
15 |
+
if ( !defined( 'ABSPATH' ) ) {
|
16 |
+
exit;
|
17 |
+
}
|
18 |
+
// Exit if accessed directly
|
19 |
+
class LAE_Portfolio_Widget extends LAE_Widget_Base
|
20 |
+
{
|
21 |
+
public function get_name()
|
22 |
+
{
|
|
|
23 |
return 'lae-portfolio';
|
24 |
}
|
25 |
+
|
26 |
+
public function get_title()
|
27 |
+
{
|
28 |
+
return __( 'Posts Grid', 'livemesh-el-addons' );
|
29 |
}
|
30 |
+
|
31 |
+
public function get_icon()
|
32 |
+
{
|
33 |
return 'lae-icon-posts-grid-masonry';
|
34 |
}
|
35 |
+
|
36 |
+
public function get_categories()
|
37 |
+
{
|
38 |
+
return array( 'livemesh-addons' );
|
39 |
}
|
40 |
+
|
41 |
+
public function get_custom_help_url()
|
42 |
+
{
|
43 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/posts-portfolio-grid/';
|
44 |
}
|
45 |
+
|
46 |
+
public function get_script_depends()
|
47 |
+
{
|
48 |
return [
|
49 |
'isotope.pkgd',
|
50 |
'imagesloaded.pkgd',
|
52 |
'lae-portfolio-scripts'
|
53 |
];
|
54 |
}
|
55 |
+
|
56 |
+
public function get_style_depends()
|
57 |
+
{
|
58 |
+
return [ 'lae-frontend-styles', 'lae-grid-styles', 'lae-portfolio-styles' ];
|
|
|
|
|
|
|
59 |
}
|
60 |
+
|
61 |
+
protected function _register_controls()
|
62 |
+
{
|
63 |
+
$this->start_controls_section( 'section_query', [
|
64 |
+
'label' => __( 'Post Query', 'livemesh-el-addons' ),
|
65 |
+
] );
|
66 |
+
$this->add_control( 'query_type', [
|
67 |
+
'label' => __( 'Source', 'livemesh-el-addons' ),
|
68 |
+
'type' => Controls_Manager::SELECT,
|
69 |
+
'options' => array(
|
70 |
+
'custom_query' => __( 'Custom Query', 'livemesh-el-addons' ),
|
71 |
+
'current_query' => __( 'Current Query', 'livemesh-el-addons' ),
|
72 |
+
'related' => __( 'Related', 'livemesh-el-addons' ),
|
73 |
+
),
|
74 |
+
'default' => 'custom_query',
|
75 |
+
] );
|
76 |
+
$this->add_control( 'post_types', [
|
77 |
+
'label' => __( 'Post Types', 'livemesh-el-addons' ),
|
78 |
+
'type' => Controls_Manager::SELECT2,
|
79 |
+
'default' => 'post',
|
80 |
+
'options' => lae_get_all_post_type_options(),
|
81 |
+
'multiple' => true,
|
82 |
+
'condition' => [
|
83 |
+
'query_type' => 'custom_query',
|
84 |
+
],
|
85 |
+
] );
|
86 |
+
$this->add_control( 'taxonomies', [
|
87 |
+
'type' => Controls_Manager::SELECT2,
|
88 |
+
'label' => __( 'Choose the taxonomies to display related posts.', 'livemesh-el-addons' ),
|
89 |
+
'label_block' => true,
|
90 |
+
'description' => __( 'Choose the taxonomies to be used for displaying posts related to current post, page or custom post type.', 'livemesh-el-addons' ),
|
91 |
+
'options' => lae_get_taxonomies_map(),
|
92 |
+
'default' => 'category',
|
93 |
+
'multiple' => true,
|
94 |
+
'condition' => [
|
95 |
+
'query_type' => 'related',
|
96 |
+
],
|
97 |
+
] );
|
98 |
+
$this->add_control( 'tax_query', [
|
99 |
+
'label' => __( 'Taxonomies', 'livemesh-el-addons' ),
|
100 |
+
'type' => Controls_Manager::SELECT2,
|
101 |
+
'options' => lae_get_all_taxonomy_options(),
|
102 |
+
'multiple' => true,
|
103 |
+
'label_block' => true,
|
104 |
+
'condition' => [
|
105 |
+
'query_type' => 'custom_query',
|
106 |
+
],
|
107 |
+
] );
|
108 |
+
$this->add_control( 'post_in', [
|
109 |
+
'label' => __( 'Post In', 'livemesh-el-addons' ),
|
110 |
+
'description' => __( 'Provide a comma separated list of Post IDs to display in the grid.', 'livemesh-el-addons' ),
|
111 |
+
'type' => Controls_Manager::TEXT,
|
112 |
+
'label_block' => true,
|
113 |
+
'condition' => [
|
114 |
+
'query_type' => 'custom_query',
|
115 |
+
],
|
116 |
+
] );
|
117 |
+
$this->add_control( 'posts_per_page', [
|
118 |
+
'label' => __( 'Posts Per Page', 'livemesh-el-addons' ),
|
119 |
+
'type' => Controls_Manager::NUMBER,
|
120 |
+
'min' => 1,
|
121 |
+
'max' => 50,
|
122 |
+
'step' => 1,
|
123 |
+
'default' => 6,
|
124 |
+
'condition' => [
|
125 |
+
'query_type' => [ 'custom_query', 'related' ],
|
126 |
+
],
|
127 |
+
] );
|
128 |
+
$this->add_control( 'advanced', [
|
129 |
+
'label' => __( 'Advanced', 'livemesh-el-addons' ),
|
130 |
+
'type' => Controls_Manager::HEADING,
|
131 |
+
'condition' => [
|
132 |
+
'query_type' => [ 'custom_query', 'related' ],
|
133 |
+
],
|
134 |
+
] );
|
135 |
+
$this->add_control( 'orderby', [
|
136 |
+
'label' => __( 'Order By', 'livemesh-el-addons' ),
|
137 |
+
'type' => Controls_Manager::SELECT,
|
138 |
+
'options' => array(
|
139 |
+
'none' => __( 'No order', 'livemesh-el-addons' ),
|
140 |
+
'ID' => __( 'Post ID', 'livemesh-el-addons' ),
|
141 |
+
'author' => __( 'Author', 'livemesh-el-addons' ),
|
142 |
+
'title' => __( 'Title', 'livemesh-el-addons' ),
|
143 |
+
'date' => __( 'Published date', 'livemesh-el-addons' ),
|
144 |
+
'modified' => __( 'Modified date', 'livemesh-el-addons' ),
|
145 |
+
'parent' => __( 'By parent', 'livemesh-el-addons' ),
|
146 |
+
'rand' => __( 'Random order', 'livemesh-el-addons' ),
|
147 |
+
'comment_count' => __( 'Comment count', 'livemesh-el-addons' ),
|
148 |
+
'menu_order' => __( 'Menu order', 'livemesh-el-addons' ),
|
149 |
+
'post__in' => __( 'By include order', 'livemesh-el-addons' ),
|
150 |
+
),
|
151 |
+
'default' => 'date',
|
152 |
+
'condition' => [
|
153 |
+
'query_type' => [ 'custom_query', 'related' ],
|
154 |
+
],
|
155 |
+
] );
|
156 |
+
$this->add_control( 'order', [
|
157 |
+
'label' => __( 'Order', 'livemesh-el-addons' ),
|
158 |
+
'type' => Controls_Manager::SELECT,
|
159 |
+
'options' => array(
|
160 |
+
'ASC' => __( 'Ascending', 'livemesh-el-addons' ),
|
161 |
+
'DESC' => __( 'Descending', 'livemesh-el-addons' ),
|
162 |
+
),
|
163 |
+
'default' => 'DESC',
|
164 |
+
'condition' => [
|
165 |
+
'query_type' => [ 'custom_query', 'related' ],
|
166 |
+
],
|
167 |
+
] );
|
168 |
+
$this->add_control( 'offset', [
|
169 |
+
'label' => __( 'Offset', 'livemesh-el-addons' ),
|
170 |
+
'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
|
171 |
+
'type' => Controls_Manager::NUMBER,
|
172 |
+
'default' => 0,
|
173 |
+
'condition' => [
|
174 |
+
'query_type' => 'custom_query',
|
175 |
+
],
|
176 |
+
] );
|
177 |
+
$this->add_control( 'upgrade_notice', [
|
178 |
+
'type' => Controls_Manager::RAW_HTML,
|
179 |
+
'separator' => 'before',
|
180 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
181 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
$this->end_controls_section();
|
183 |
+
$this->start_controls_section( 'section_grid_skin', [
|
184 |
+
'label' => __( 'Grid Skin', 'livemesh-el-addons' ),
|
185 |
+
] );
|
186 |
+
$this->add_control( 'grid_skin', [
|
187 |
+
'label' => __( 'Choose Grid Skin', 'livemesh-el-addons' ),
|
188 |
+
'description' => __( 'The "Classic Skin" is the built-in styling provided for the grid items. Choose "Custom Skin" if you want to use theme builder template for the grid item. The option "Custom Grid" is the most flexible one that lets you use a theme builder template for the grid layout with choice of custom template for one or more of its items.', 'livemesh-el-addons' ),
|
189 |
+
'type' => Controls_Manager::SELECT,
|
190 |
+
'options' => array(
|
191 |
+
'classic_skin' => __( 'Classic Skin', 'livemesh-el-addons' ),
|
192 |
+
'custom_skin' => __( 'Custom Skin', 'livemesh-el-addons' ),
|
193 |
+
'custom_grid' => __( 'Custom Grid', 'livemesh-el-addons' ),
|
194 |
+
),
|
195 |
+
'default' => 'classic_skin',
|
196 |
+
] );
|
197 |
+
$this->add_control( 'item_template', [
|
198 |
+
'label' => __( 'Select the custom skin template for the grid item', 'livemesh-el-addons' ),
|
199 |
+
'description' => '<div style="text-align:center;font-style: normal;">' . '<a target="_blank" class="elementor-button elementor-button-default" href="' . esc_url( admin_url( '/edit.php?post_type=elementor_library&tabs_group=theme&elementor_library_type=livemesh_item' ) ) . '">' . __( 'Create/Edit the Item Skin Builder Templates', 'livemesh-el-addons' ) . '</a>' . '</div>',
|
200 |
+
'type' => Controls_Manager::SELECT,
|
201 |
+
'label_block' => true,
|
202 |
+
'default' => [],
|
203 |
+
'options' => $this->get_item_template_options(),
|
204 |
+
'condition' => [
|
205 |
+
'grid_skin' => 'custom_skin',
|
206 |
+
],
|
207 |
+
] );
|
208 |
+
$this->add_control( 'grid_template', [
|
209 |
+
'label' => __( 'Select the custom grid template for the grid item', 'livemesh-el-addons' ),
|
210 |
+
'description' => '<div style="text-align:center;font-style: normal;">' . '<a target="_blank" class="elementor-button elementor-button-default" href="' . esc_url( admin_url( '/edit.php?post_type=elementor_library&tabs_group=theme&elementor_library_type=livemesh_grid' ) ) . '">' . __( 'Create/Edit the Grid Builder Templates', 'livemesh-el-addons' ) . '</a>' . '</div>',
|
211 |
+
'type' => Controls_Manager::SELECT,
|
212 |
+
'label_block' => true,
|
213 |
+
'default' => [],
|
214 |
+
'options' => $this->get_grid_template_options(),
|
215 |
+
'condition' => [
|
216 |
+
'grid_skin' => 'custom_grid',
|
217 |
+
],
|
218 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
219 |
$this->end_controls_section();
|
220 |
+
$this->start_controls_section( 'section_post_content', [
|
221 |
+
'label' => __( 'Post Content', 'livemesh-el-addons' ),
|
222 |
+
'condition' => [
|
223 |
+
'grid_skin' => 'classic_skin',
|
224 |
+
],
|
225 |
+
] );
|
226 |
+
$this->add_group_control( Group_Control_Image_Size::get_type(), [
|
227 |
+
'name' => 'thumbnail_size',
|
228 |
+
'label' => __( 'Image Size', 'livemesh-el-addons' ),
|
229 |
+
'default' => 'large',
|
230 |
+
] );
|
231 |
+
$this->add_control( 'image_linkable', [
|
232 |
+
'label' => __( 'Link Images to Posts?', 'livemesh-el-addons' ),
|
233 |
+
'type' => Controls_Manager::SWITCHER,
|
234 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
235 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
236 |
+
'return_value' => 'yes',
|
237 |
+
'default' => 'yes',
|
238 |
+
] );
|
239 |
+
$this->add_control( 'post_link_new_window', [
|
240 |
+
'label' => __( 'Open post links in new window?', 'livemesh-el-addons' ),
|
241 |
+
'type' => Controls_Manager::SWITCHER,
|
242 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
243 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
244 |
+
'return_value' => 'yes',
|
245 |
+
'default' => '',
|
246 |
+
] );
|
247 |
+
$this->add_control( 'display_title_on_thumbnail', [
|
248 |
+
'label' => __( 'Display posts title on the post/portfolio thumbnail?', 'livemesh-el-addons' ),
|
249 |
+
'type' => Controls_Manager::SWITCHER,
|
250 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
251 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
252 |
+
'return_value' => 'yes',
|
253 |
+
'default' => 'yes',
|
254 |
+
] );
|
255 |
+
$this->add_control( 'display_taxonomy_on_thumbnail', [
|
256 |
+
'label' => __( 'Display taxonomy info on post/project thumbnail?', 'livemesh-el-addons' ),
|
257 |
+
'type' => Controls_Manager::SWITCHER,
|
258 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
259 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
260 |
+
'return_value' => 'yes',
|
261 |
+
'default' => 'yes',
|
262 |
+
] );
|
263 |
+
$this->add_control( 'display_title', [
|
264 |
+
'label' => __( 'Display posts title for the post/portfolio item?', 'livemesh-el-addons' ),
|
265 |
+
'type' => Controls_Manager::SWITCHER,
|
266 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
267 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
268 |
+
'return_value' => 'yes',
|
269 |
+
'default' => 'yes',
|
270 |
+
] );
|
271 |
+
$this->add_control( 'display_summary', [
|
272 |
+
'label' => __( 'Display post excerpt/summary for the post/portfolio item?', 'livemesh-el-addons' ),
|
273 |
+
'type' => Controls_Manager::SWITCHER,
|
274 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
275 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
276 |
+
'return_value' => 'yes',
|
277 |
+
'default' => 'yes',
|
278 |
+
] );
|
279 |
+
$this->add_control( 'display_author', [
|
280 |
+
'label' => __( 'Display post author info for the post/portfolio item?', 'livemesh-el-addons' ),
|
281 |
+
'type' => Controls_Manager::SWITCHER,
|
282 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
283 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
284 |
+
'return_value' => 'yes',
|
285 |
+
'default' => 'yes',
|
286 |
+
] );
|
287 |
+
$this->add_control( 'display_post_date', [
|
288 |
+
'label' => __( 'Display post date info for the post item?', 'livemesh-el-addons' ),
|
289 |
+
'type' => Controls_Manager::SWITCHER,
|
290 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
291 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
292 |
+
'return_value' => 'yes',
|
293 |
+
'default' => 'yes',
|
294 |
+
] );
|
295 |
+
$this->add_control( 'display_taxonomy', [
|
296 |
+
'label' => __( 'Display taxonomy info for the post item?', 'livemesh-el-addons' ),
|
297 |
+
'type' => Controls_Manager::SWITCHER,
|
298 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
299 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
300 |
+
'return_value' => 'yes',
|
301 |
+
'default' => 'yes',
|
302 |
+
] );
|
303 |
+
$this->add_control( 'display_read_more', [
|
304 |
+
'label' => __( 'Display read more link to the post/portfolio?', 'livemesh-el-addons' ),
|
305 |
+
'type' => Controls_Manager::SWITCHER,
|
306 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
307 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
308 |
+
'return_value' => 'yes',
|
309 |
+
'default' => 'no',
|
310 |
+
] );
|
311 |
+
$this->add_control( 'read_more_text', [
|
312 |
+
'label' => __( 'Read more text', 'livemesh-el-addons' ),
|
313 |
+
'type' => Controls_Manager::TEXT,
|
314 |
+
"description" => __( 'Specify the text for the read more link/button', 'livemesh-el-addons' ),
|
315 |
+
'default' => __( 'Read More', 'livemesh-el-addons' ),
|
316 |
+
'condition' => [
|
317 |
+
'display_read_more' => [ 'yes' ],
|
318 |
+
],
|
319 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
320 |
$this->end_controls_section();
|
321 |
+
$this->start_controls_section( 'section_general_settings', [
|
322 |
+
'label' => __( 'General', 'livemesh-el-addons' ),
|
323 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
324 |
+
] );
|
325 |
+
$this->add_control( 'heading', [
|
326 |
+
'label' => __( 'Heading for the grid', 'livemesh-el-addons' ),
|
327 |
+
'type' => Controls_Manager::TEXT,
|
328 |
+
'placeholder' => __( 'My Posts', 'livemesh-el-addons' ),
|
329 |
+
'default' => __( 'My Posts', 'livemesh-el-addons' ),
|
330 |
+
'dynamic' => [
|
331 |
+
'active' => true,
|
332 |
+
],
|
333 |
+
] );
|
334 |
+
$this->add_control( 'filterable', [
|
335 |
+
'label' => __( 'Filterable?', 'livemesh-el-addons' ),
|
336 |
+
'type' => Controls_Manager::SWITCHER,
|
337 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
338 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
339 |
+
'return_value' => 'yes',
|
340 |
+
'default' => 'yes',
|
341 |
+
'condition' => [
|
342 |
+
'grid_skin' => [ 'classic_skin', 'custom_skin' ],
|
343 |
+
],
|
344 |
+
] );
|
345 |
+
$this->add_control( 'taxonomy_filter', [
|
346 |
+
'type' => Controls_Manager::SELECT,
|
347 |
+
'label' => __( 'Choose the taxonomy to display and filter on.', 'livemesh-el-addons' ),
|
348 |
+
'label_block' => true,
|
349 |
+
'description' => __( 'Choose the taxonomy information to display for posts/portfolio and the taxonomy that is used to filter the portfolio/post. Takes effect only if no taxonomy filters are specified when building query.', 'livemesh-el-addons' ),
|
350 |
+
'options' => lae_get_taxonomies_map(),
|
351 |
+
'default' => 'category',
|
352 |
+
] );
|
353 |
+
$this->add_responsive_control( 'per_line', [
|
354 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
355 |
+
'type' => Controls_Manager::SELECT,
|
356 |
+
'default' => '3',
|
357 |
+
'tablet_default' => '2',
|
358 |
+
'mobile_default' => '1',
|
359 |
+
'options' => [
|
360 |
+
'1' => '1',
|
361 |
+
'2' => '2',
|
362 |
+
'3' => '3',
|
363 |
+
'4' => '4',
|
364 |
+
'5' => '5',
|
365 |
+
'6' => '6',
|
366 |
+
],
|
367 |
+
'frontend_available' => true,
|
368 |
+
] );
|
369 |
+
$this->add_control( 'layout_mode', [
|
370 |
+
'type' => Controls_Manager::SELECT,
|
371 |
+
'label' => __( 'Choose a layout for the grid', 'livemesh-el-addons' ),
|
372 |
+
'options' => array(
|
373 |
+
'fitRows' => __( 'Fit Rows', 'livemesh-el-addons' ),
|
374 |
+
'masonry' => __( 'Masonry', 'livemesh-el-addons' ),
|
375 |
+
),
|
376 |
+
'default' => 'fitRows',
|
377 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
$this->end_controls_section();
|
379 |
+
$this->start_controls_section( 'section_responsive', [
|
380 |
+
'label' => __( 'Gutter Options', 'livemesh-el-addons' ),
|
381 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
382 |
+
] );
|
383 |
+
$this->add_control( 'heading_desktop', [
|
384 |
+
'label' => __( 'Desktop', 'livemesh-el-addons' ),
|
385 |
+
'type' => Controls_Manager::HEADING,
|
386 |
+
'separator' => 'after',
|
387 |
+
] );
|
388 |
+
$this->add_control( 'gutter', [
|
389 |
+
'label' => __( 'Gutter', 'livemesh-el-addons' ),
|
390 |
+
'description' => __( 'Space between columns in the grid.', 'livemesh-el-addons' ),
|
391 |
+
'type' => Controls_Manager::NUMBER,
|
392 |
+
'default' => 20,
|
393 |
+
'selectors' => [
|
394 |
+
'{{WRAPPER}} .lae-portfolio' => 'margin-left: -{{VALUE}}px; margin-right: -{{VALUE}}px;',
|
395 |
+
'{{WRAPPER}} .lae-portfolio .lae-portfolio-item' => 'padding: {{VALUE}}px;',
|
396 |
+
],
|
397 |
+
] );
|
398 |
+
$this->add_control( 'heading_tablet', [
|
399 |
+
'label' => __( 'Tablet', 'livemesh-el-addons' ),
|
400 |
+
'type' => Controls_Manager::HEADING,
|
401 |
+
'separator' => 'after',
|
402 |
+
] );
|
403 |
+
$this->add_control( 'tablet_gutter', [
|
404 |
+
'label' => __( 'Gutter', 'livemesh-el-addons' ),
|
405 |
+
'description' => __( 'Space between columns.', 'livemesh-el-addons' ),
|
406 |
+
'type' => Controls_Manager::NUMBER,
|
407 |
+
'default' => 10,
|
408 |
+
'selectors' => [
|
409 |
+
'(tablet-){{WRAPPER}} .lae-portfolio' => 'margin-left: -{{VALUE}}px; margin-right: -{{VALUE}}px;',
|
410 |
+
'(tablet-){{WRAPPER}} .lae-portfolio .lae-portfolio-item' => 'padding: {{VALUE}}px;',
|
411 |
+
],
|
412 |
+
] );
|
413 |
+
$this->add_control( 'heading_mobile', [
|
414 |
+
'label' => __( 'Mobile Phone', 'livemesh-el-addons' ),
|
415 |
+
'type' => Controls_Manager::HEADING,
|
416 |
+
'separator' => 'after',
|
417 |
+
] );
|
418 |
+
$this->add_control( 'mobile_gutter', [
|
419 |
+
'label' => __( 'Gutter', 'livemesh-el-addons' ),
|
420 |
+
'description' => __( 'Space between columns.', 'livemesh-el-addons' ),
|
421 |
+
'type' => Controls_Manager::NUMBER,
|
422 |
+
'default' => 10,
|
423 |
+
'selectors' => [
|
424 |
+
'(mobile-){{WRAPPER}} .lae-portfolio' => 'margin-left: -{{VALUE}}px; margin-right: -{{VALUE}}px;',
|
425 |
+
'(mobile-){{WRAPPER}} .lae-portfolio .lae-portfolio-item' => 'padding: {{VALUE}}px;',
|
426 |
+
],
|
427 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
428 |
$this->end_controls_section();
|
429 |
+
$this->start_controls_section( 'section_heading_styling', [
|
430 |
+
'label' => __( 'Grid Heading', 'livemesh-el-addons' ),
|
431 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
432 |
+
] );
|
433 |
+
$this->add_control( 'heading_tag', [
|
434 |
+
'label' => __( 'Heading HTML Tag', 'livemesh-el-addons' ),
|
435 |
+
'type' => Controls_Manager::SELECT,
|
436 |
+
'options' => [
|
437 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
438 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
439 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
440 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
441 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
442 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
443 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
444 |
+
],
|
445 |
+
'default' => 'h3',
|
446 |
+
] );
|
447 |
+
$this->add_control( 'heading_color', [
|
448 |
+
'label' => __( 'Heading Color', 'livemesh-el-addons' ),
|
449 |
+
'type' => Controls_Manager::COLOR,
|
450 |
+
'selectors' => [
|
451 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-heading' => 'color: {{VALUE}};',
|
452 |
+
],
|
453 |
+
] );
|
454 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
455 |
+
'name' => 'heading_typography',
|
456 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-heading',
|
457 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
458 |
$this->end_controls_section();
|
459 |
+
$this->start_controls_section( 'section_filters_styling', [
|
460 |
+
'label' => __( 'Grid Filters', 'livemesh-el-addons' ),
|
461 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
462 |
+
] );
|
463 |
+
$this->add_control( 'filter_color', [
|
464 |
+
'label' => __( 'Filter Color', 'livemesh-el-addons' ),
|
465 |
+
'type' => Controls_Manager::COLOR,
|
466 |
+
'selectors' => [
|
467 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-taxonomy-filter .lae-filter-item a' => 'color: {{VALUE}};',
|
468 |
+
],
|
469 |
+
] );
|
470 |
+
$this->add_control( 'filter_hover_color', [
|
471 |
+
'label' => __( 'Filter Hover Color', 'livemesh-el-addons' ),
|
472 |
+
'type' => Controls_Manager::COLOR,
|
473 |
+
'selectors' => [
|
474 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-taxonomy-filter .lae-filter-item a:hover, {{WRAPPER}} .lae-portfolio-wrap .lae-taxonomy-filter .lae-filter-item.lae-active a' => 'color: {{VALUE}};',
|
475 |
+
],
|
476 |
+
] );
|
477 |
+
$this->add_control( 'filter_active_border', [
|
478 |
+
'label' => __( 'Active Filter Border Color', 'livemesh-el-addons' ),
|
479 |
+
'type' => Controls_Manager::COLOR,
|
480 |
+
'selectors' => [
|
481 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-taxonomy-filter .lae-filter-item.lae-active:after ' => 'border-color: {{VALUE}};',
|
482 |
+
],
|
483 |
+
] );
|
484 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
485 |
+
'name' => 'filter_typography',
|
486 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-taxonomy-filter .lae-filter-item a',
|
487 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
488 |
$this->end_controls_section();
|
489 |
+
$this->start_controls_section( 'section_grid_thumbnail_styling', [
|
490 |
+
'label' => __( 'Grid Thumbnail', 'livemesh-el-addons' ),
|
491 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
492 |
+
'condition' => [
|
493 |
+
'grid_skin' => 'classic_skin',
|
494 |
+
],
|
495 |
+
] );
|
496 |
+
$this->add_control( 'heading_thumbnail_info', [
|
497 |
+
'label' => __( 'Thumbnail Info Entry Title', 'livemesh-el-addons' ),
|
498 |
+
'type' => Controls_Manager::HEADING,
|
499 |
+
'separator' => 'after',
|
500 |
+
] );
|
501 |
+
$this->add_control( 'title_tag', [
|
502 |
+
'label' => __( 'Title HTML Tag', 'livemesh-el-addons' ),
|
503 |
+
'type' => Controls_Manager::SELECT,
|
504 |
+
'options' => [
|
505 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
506 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
507 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
508 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
509 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
510 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
511 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
512 |
+
],
|
513 |
+
'default' => 'h3',
|
514 |
+
] );
|
515 |
+
$this->add_control( 'title_color', [
|
516 |
+
'label' => __( 'Title Color', 'livemesh-el-addons' ),
|
517 |
+
'type' => Controls_Manager::COLOR,
|
518 |
+
'selectors' => [
|
519 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-post-title a' => 'color: {{VALUE}};',
|
520 |
+
],
|
521 |
+
] );
|
522 |
+
$this->add_control( 'title_hover_border_color', [
|
523 |
+
'label' => __( 'Title Hover Border Color', 'livemesh-el-addons' ),
|
524 |
+
'type' => Controls_Manager::COLOR,
|
525 |
+
'selectors' => [
|
526 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-post-title a:hover' => 'border-color: {{VALUE}};',
|
527 |
+
],
|
528 |
+
] );
|
529 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
530 |
+
'name' => 'title_typography',
|
531 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-post-title',
|
532 |
+
] );
|
533 |
+
$this->add_control( 'heading_thumbnail_info_taxonomy', [
|
534 |
+
'label' => __( 'Thumbnail Info Taxonomy Terms', 'livemesh-el-addons' ),
|
535 |
+
'type' => Controls_Manager::HEADING,
|
536 |
+
'separator' => 'after',
|
537 |
+
] );
|
538 |
+
$this->add_control( 'thumbnail_info_tags_color', [
|
539 |
+
'label' => __( 'Taxonomy Terms Color', 'livemesh-el-addons' ),
|
540 |
+
'type' => Controls_Manager::COLOR,
|
541 |
+
'selectors' => [
|
542 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-terms, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-terms a' => 'color: {{VALUE}};',
|
543 |
+
],
|
544 |
+
] );
|
545 |
+
$this->add_control( 'thumbnail_info_tags_hover_color', [
|
546 |
+
'label' => __( 'Taxonomy Terms Hover Color', 'livemesh-el-addons' ),
|
547 |
+
'type' => Controls_Manager::COLOR,
|
548 |
+
'selectors' => [
|
549 |
+
'{{WRAPPER}} .lae-block-grid .lae-module .lae-module-image .lae-terms a:hover' => 'color: {{VALUE}};',
|
550 |
+
],
|
551 |
+
] );
|
552 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
553 |
+
'name' => 'tags_typography',
|
554 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-terms:hover, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-project-image .lae-image-info .lae-terms a:hover',
|
555 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
556 |
$this->end_controls_section();
|
557 |
+
$this->start_controls_section( 'section_entry_title_styling', [
|
558 |
+
'label' => __( 'Grid Item Entry Title', 'livemesh-el-addons' ),
|
559 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
560 |
+
'condition' => [
|
561 |
+
'grid_skin' => 'classic_skin',
|
562 |
+
],
|
563 |
+
] );
|
564 |
+
$this->add_control( 'entry_title_tag', [
|
565 |
+
'label' => __( 'Entry Title HTML Tag', 'livemesh-el-addons' ),
|
566 |
+
'type' => Controls_Manager::SELECT,
|
567 |
+
'options' => [
|
568 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
569 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
570 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
571 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
572 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
573 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
574 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
575 |
+
],
|
576 |
+
'default' => 'h3',
|
577 |
+
] );
|
578 |
+
$this->add_control( 'entry_title_color', [
|
579 |
+
'label' => __( 'Entry Title Color', 'livemesh-el-addons' ),
|
580 |
+
'type' => Controls_Manager::COLOR,
|
581 |
+
'selectors' => [
|
582 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-title a' => 'color: {{VALUE}};',
|
583 |
+
],
|
584 |
+
] );
|
585 |
+
$this->add_control( 'entry_title_hover_color', [
|
586 |
+
'label' => __( 'Entry Title Hover Color', 'livemesh-el-addons' ),
|
587 |
+
'type' => Controls_Manager::COLOR,
|
588 |
+
'selectors' => [
|
589 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-title a:hover' => 'color: {{VALUE}};',
|
590 |
+
],
|
591 |
+
] );
|
592 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
593 |
+
'name' => 'entry_title_typography',
|
594 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-title',
|
595 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
596 |
$this->end_controls_section();
|
597 |
+
$this->start_controls_section( 'section_entry_summary_styling', [
|
598 |
+
'label' => __( 'Grid Item Entry Summary', 'livemesh-el-addons' ),
|
599 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
600 |
+
] );
|
601 |
+
$this->add_control( 'entry_summary_color', [
|
602 |
+
'label' => __( 'Entry Summary Color', 'livemesh-el-addons' ),
|
603 |
+
'type' => Controls_Manager::COLOR,
|
604 |
+
'selectors' => [
|
605 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-summary' => 'color: {{VALUE}};',
|
606 |
+
],
|
607 |
+
] );
|
608 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
609 |
+
'name' => 'entry_summary_typography',
|
610 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .entry-summary',
|
611 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
612 |
$this->end_controls_section();
|
613 |
+
$this->start_controls_section( 'section_entry_meta_styling', [
|
614 |
+
'label' => __( 'Grid Item Entry Meta', 'livemesh-el-addons' ),
|
615 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
616 |
+
'condition' => [
|
617 |
+
'grid_skin' => 'classic_skin',
|
618 |
+
],
|
619 |
+
] );
|
620 |
+
$this->add_control( 'heading_entry_meta', [
|
621 |
+
'label' => __( 'Entry Meta', 'livemesh-el-addons' ),
|
622 |
+
'type' => Controls_Manager::HEADING,
|
623 |
+
'separator' => 'after',
|
624 |
+
] );
|
625 |
+
$this->add_control( 'entry_meta_color', [
|
626 |
+
'label' => __( 'Entry Meta Color', 'livemesh-el-addons' ),
|
627 |
+
'type' => Controls_Manager::COLOR,
|
628 |
+
'selectors' => [
|
629 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-entry-meta span' => 'color: {{VALUE}};',
|
630 |
+
],
|
631 |
+
] );
|
632 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
633 |
+
'name' => 'entry_meta_typography',
|
634 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-entry-meta span',
|
635 |
+
] );
|
636 |
+
$this->add_control( 'heading_entry_meta_link', [
|
637 |
+
'label' => __( 'Entry Meta Link', 'livemesh-el-addons' ),
|
638 |
+
'type' => Controls_Manager::HEADING,
|
639 |
+
'separator' => 'after',
|
640 |
+
] );
|
641 |
+
$this->add_control( 'entry_meta_link_color', [
|
642 |
+
'label' => __( 'Entry Meta Link Color', 'livemesh-el-addons' ),
|
643 |
+
'type' => Controls_Manager::COLOR,
|
644 |
+
'selectors' => [
|
645 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-entry-meta span a' => 'color: {{VALUE}};',
|
646 |
+
],
|
647 |
+
] );
|
648 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
649 |
+
'name' => 'entry_meta_link_typography',
|
650 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio .lae-portfolio-item .lae-entry-meta span a',
|
651 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
652 |
$this->end_controls_section();
|
653 |
+
$this->start_controls_section( 'section_read_more_styling', [
|
654 |
+
'label' => __( 'Read More', 'livemesh-el-addons' ),
|
655 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
656 |
+
'condition' => [
|
657 |
+
'grid_skin' => 'classic_skin',
|
658 |
+
],
|
659 |
+
] );
|
660 |
+
$this->add_control( 'read_more_color', [
|
661 |
+
'label' => __( 'Read More Color', 'livemesh-el-addons' ),
|
662 |
+
'type' => Controls_Manager::COLOR,
|
663 |
+
'selectors' => [
|
664 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more a' => 'color: {{VALUE}};',
|
665 |
+
],
|
666 |
+
] );
|
667 |
+
$this->add_control( 'read_more_hover_color', [
|
668 |
+
'label' => __( 'Read More Hover Color', 'livemesh-el-addons' ),
|
669 |
+
'type' => Controls_Manager::COLOR,
|
670 |
+
'selectors' => [
|
671 |
+
'{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more:hover, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more a:hover' => 'color: {{VALUE}};',
|
672 |
+
],
|
673 |
+
] );
|
674 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
675 |
+
'name' => 'read_more_typography',
|
676 |
+
'selector' => '{{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more, {{WRAPPER}} .lae-portfolio-wrap .lae-portfolio-item .lae-read-more a',
|
677 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
678 |
$this->end_controls_section();
|
|
|
|
|
679 |
}
|
680 |
+
|
681 |
+
protected function get_item_template_content( $template_id, $settings )
|
682 |
+
{
|
683 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
684 |
+
|
685 |
+
if ( !is_plugin_active( 'elementor-pro/elementor-pro.php' ) ) {
|
686 |
+
$output = lae_template_error( __( 'Custom skin requires Elementor Pro but the plugin is not installed/active', 'livemesh-el-addons' ) );
|
687 |
+
} else {
|
688 |
+
$output = lae_get_item_template_content( $template_id, $settings );
|
689 |
}
|
690 |
+
|
691 |
return $output;
|
|
|
692 |
}
|
693 |
+
|
694 |
+
protected function get_grid_template_content( $template_id, $settings )
|
695 |
+
{
|
696 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
697 |
+
|
698 |
+
if ( !is_plugin_active( 'elementor-pro/elementor-pro.php' ) ) {
|
699 |
+
$output = lae_template_error( __( 'Custom skin requires Elementor Pro but the plugin is not installed/active', 'livemesh-el-addons' ) );
|
700 |
+
} else {
|
701 |
+
$output = lae_get_template_content( $template_id, $settings );
|
702 |
}
|
703 |
+
|
704 |
return $output;
|
|
|
705 |
}
|
706 |
+
|
707 |
+
protected function get_item_template_options()
|
708 |
+
{
|
709 |
$template_options = array();
|
|
|
710 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
711 |
+
|
712 |
+
if ( !is_plugin_active( 'elementor-pro/elementor-pro.php' ) ) {
|
713 |
+
$template_options = [
|
714 |
+
0 => __( 'No templates found. Elementor Pro is not installed/active', 'livemesh-el-addons' ),
|
715 |
+
];
|
716 |
+
} else {
|
717 |
$templates = lae_get_livemesh_item_templates();
|
|
|
718 |
//$template_options = [0 => __('Select a template', 'livemesh-el-addons')];
|
719 |
+
foreach ( $templates as $template ) {
|
|
|
720 |
$template_options[$template->ID] = $template->post_title;
|
721 |
}
|
722 |
}
|
723 |
+
|
724 |
return $template_options;
|
725 |
}
|
726 |
+
|
727 |
+
protected function get_grid_template_options()
|
728 |
+
{
|
729 |
$template_options = array();
|
|
|
730 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
731 |
+
|
732 |
+
if ( !is_plugin_active( 'elementor-pro/elementor-pro.php' ) ) {
|
733 |
+
$template_options = [
|
734 |
+
0 => __( 'No templates found. Elementor Pro is not installed/active', 'livemesh-el-addons' ),
|
735 |
+
];
|
736 |
+
} else {
|
737 |
$templates = lae_get_livemesh_grid_templates();
|
|
|
738 |
//$template_options = [0 => __('Select a template', 'livemesh-el-addons')];
|
739 |
+
foreach ( $templates as $template ) {
|
|
|
740 |
$template_options[$template->ID] = $template->post_title;
|
741 |
}
|
742 |
}
|
743 |
+
|
744 |
return $template_options;
|
745 |
}
|
746 |
+
|
747 |
+
protected function get_item_templates( $shortcode_pattern, $grid_template_content )
|
748 |
+
{
|
749 |
$matches = array();
|
750 |
+
preg_match_all( $shortcode_pattern, $grid_template_content, $matches );
|
751 |
+
$attributes = array_pop( $matches );
|
752 |
+
// fetch last array element
|
|
|
|
|
753 |
$item_templates = array();
|
754 |
+
foreach ( $attributes as $attribute ) {
|
755 |
+
list( $key, $val ) = explode( "=", $attribute );
|
756 |
+
$item_templates[] = trim( $val, '"' );
|
|
|
|
|
|
|
|
|
757 |
}
|
758 |
return $item_templates;
|
759 |
}
|
760 |
+
|
761 |
+
protected function render()
|
762 |
+
{
|
763 |
$settings = $this->get_settings_for_display();
|
764 |
+
$settings = apply_filters( 'lae_posts_grid_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
765 |
// Use the processed post selector query to find posts.
|
766 |
+
$query_args = lae_build_query_args( $settings );
|
767 |
+
$query_args = apply_filters( 'lae_posts_grid_' . $this->get_id() . '_query_args', $query_args, $settings );
|
768 |
+
$loop = new \WP_Query( $query_args );
|
|
|
|
|
|
|
769 |
// Loop through the posts and do something with them.
|
770 |
+
|
771 |
+
if ( $loop->have_posts() ) {
|
772 |
+
$dir = ( is_rtl() ? ' dir="rtl"' : '' );
|
773 |
+
$target = ( $settings['post_link_new_window'] == 'yes' ? ' target="_blank"' : '' );
|
|
|
|
|
774 |
// Check if any taxonomy filter has been applied
|
775 |
+
list( $chosen_terms, $taxonomies ) = lae_get_chosen_terms( $query_args );
|
776 |
+
if ( empty($chosen_terms) ) {
|
|
|
777 |
$taxonomies[] = $settings['taxonomy_filter'];
|
778 |
+
}
|
779 |
$output = '<div class="lae-portfolio-wrap lae-gapless-grid">';
|
780 |
+
|
781 |
+
if ( !empty($settings['heading']) || $settings['filterable'] == 'yes' ) {
|
782 |
+
$header_class = ( trim( $settings['heading'] ) === '' ? ' lae-no-heading' : '' );
|
|
|
|
|
783 |
$grid_header = '<div class="lae-portfolio-header ' . $header_class . '">';
|
784 |
+
if ( !empty($settings['heading']) ) {
|
785 |
+
$grid_header .= '<' . $settings['heading_tag'] . ' class="lae-heading">' . wp_kses_post( $settings['heading'] ) . '</' . $settings['heading_tag'] . '>';
|
786 |
+
}
|
787 |
+
if ( $settings['filterable'] == 'yes' ) {
|
788 |
+
$grid_header .= lae_get_taxonomy_terms_filter( $taxonomies, $chosen_terms );
|
789 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
790 |
$grid_header .= '</div>';
|
791 |
+
$output .= apply_filters( 'lae_posts_grid_header', $grid_header, $settings );
|
792 |
+
}
|
793 |
+
|
794 |
+
|
795 |
+
if ( $settings['grid_skin'] == 'custom_grid' ) {
|
|
|
|
|
796 |
$grid_template_id = $settings['grid_template'];
|
797 |
+
|
798 |
+
if ( !$grid_template_id ) {
|
799 |
+
$output .= lae_template_error( __( 'Choose a custom template for the grid', 'livemesh-el-addons' ) );
|
800 |
+
} else {
|
801 |
+
$shortcode_pattern = "/\\[livemesh_grid_item (.+?)\\]/";
|
802 |
+
$grid_template_content = $this->get_grid_template_content( $grid_template_id, $settings );
|
803 |
+
$item_templates = $this->get_item_templates( $shortcode_pattern, $grid_template_content );
|
|
|
|
|
|
|
|
|
|
|
|
|
804 |
$item_template_walker = array();
|
805 |
+
$output .= '<div' . $dir . ' id="lae-portfolio-' . uniqid() . '" class="lae-portfolio lae-grid-container ' . 'lae-' . str_replace( '_', '-', $settings['grid_skin'] ) . '">';
|
|
|
|
|
|
|
|
|
|
|
806 |
$template_output = '';
|
807 |
+
while ( $loop->have_posts() ) {
|
808 |
+
$loop->the_post();
|
809 |
+
|
810 |
+
if ( empty($item_template_walker) ) {
|
811 |
$template_output .= $grid_template_content;
|
|
|
812 |
$item_template_walker = $item_templates;
|
|
|
813 |
}
|
814 |
+
|
815 |
+
$item_template_id = array_shift( $item_template_walker );
|
816 |
+
$item_template_content = $this->get_item_template_content( $item_template_id, $settings );
|
|
|
|
|
817 |
// Replace the first element with the grid template content for the item
|
818 |
+
$template_output = preg_replace(
|
819 |
+
$shortcode_pattern,
|
820 |
+
$item_template_content,
|
821 |
+
$template_output,
|
822 |
+
1
|
823 |
+
);
|
824 |
+
}
|
825 |
// Replace the remaining shortcode occurrences in the grid template content with a placeholder string
|
826 |
+
$template_output = preg_replace( $shortcode_pattern, '', $template_output );
|
827 |
+
$output .= apply_filters(
|
828 |
+
'lae_posts_grid_template_output',
|
829 |
+
$template_output,
|
830 |
+
$loop,
|
831 |
+
$settings
|
832 |
+
);
|
833 |
+
}
|
834 |
+
|
835 |
+
} else {
|
836 |
+
$output .= '<div' . $dir . ' id="lae-portfolio-' . uniqid() . '" class="lae-portfolio js-isotope lae-' . esc_attr( $settings['layout_mode'] ) . ' lae-grid-container ' . 'lae-' . str_replace( '_', '-', $settings['grid_skin'] ) . lae_get_grid_classes( $settings ) . '" data-isotope-options=\'{ "itemSelector": ".lae-portfolio-item", "layoutMode": "' . esc_attr( $settings['layout_mode'] ) . '", "originLeft": ' . esc_attr( ( !is_rtl() ? 'true' : 'false' ) ) . '}\'>';
|
|
|
|
|
|
|
837 |
$current_page = get_queried_object_id();
|
838 |
+
while ( $loop->have_posts() ) {
|
839 |
+
$loop->the_post();
|
|
|
840 |
$post_id = get_the_ID();
|
841 |
+
if ( $post_id === $current_page ) {
|
842 |
+
continue;
|
843 |
+
}
|
844 |
+
// skip current page since we can run into infinite loop when users choose All option in build query
|
845 |
$style = '';
|
846 |
+
foreach ( $taxonomies as $taxonomy ) {
|
847 |
+
$terms = get_the_terms( $post_id, $taxonomy );
|
848 |
+
if ( !empty($terms) && !is_wp_error( $terms ) ) {
|
849 |
+
foreach ( $terms as $term ) {
|
850 |
$style .= ' term-' . $term->term_id;
|
851 |
}
|
852 |
}
|
853 |
}
|
|
|
854 |
$entry_output = '<div data-id="id-' . $post_id . '" class="lae-grid-item lae-portfolio-item ' . $style . '">';
|
855 |
+
$entry_output .= '<article id="post-' . $post_id . '" class="' . join( ' ', get_post_class( '', $post_id ) ) . '">';
|
856 |
+
|
857 |
+
if ( $settings['grid_skin'] == 'custom_skin' ) {
|
|
|
|
|
858 |
$item_template_id = $settings['item_template'];
|
859 |
+
|
860 |
+
if ( $item_template_id ) {
|
861 |
+
$item_template_output = $this->get_item_template_content( $item_template_id, $settings );
|
862 |
+
$entry_output .= apply_filters(
|
863 |
+
'lae_posts_grid_item_template_output',
|
864 |
+
$item_template_output,
|
865 |
+
$item_template_id,
|
866 |
+
$post_id,
|
867 |
+
$settings
|
868 |
+
);
|
869 |
+
} else {
|
870 |
+
$entry_output .= lae_template_error( __( 'Choose a custom skin template for the grid item', 'livemesh-el-addons' ) );
|
871 |
+
}
|
872 |
+
|
873 |
+
} else {
|
874 |
+
|
875 |
+
if ( $thumbnail_exists = has_post_thumbnail() ) {
|
876 |
$entry_image = '<div class="lae-project-image">';
|
877 |
+
$image_setting = [
|
878 |
+
'id' => get_post_thumbnail_id( $post_id ),
|
879 |
+
];
|
880 |
+
$thumbnail_html = lae_get_image_html(
|
881 |
+
$image_setting,
|
882 |
+
'thumbnail_size',
|
883 |
+
$settings,
|
884 |
+
true
|
885 |
+
);
|
886 |
+
if ( $settings['image_linkable'] == 'yes' ) {
|
887 |
$thumbnail_html = '<a href="' . get_the_permalink() . '"̌̌' . $target . '>' . $thumbnail_html . '</a>';
|
888 |
+
}
|
889 |
+
$entry_image .= apply_filters(
|
890 |
+
'lae_posts_grid_thumbnail_html',
|
891 |
+
$thumbnail_html,
|
892 |
+
$image_setting,
|
893 |
+
$settings
|
894 |
+
);
|
895 |
+
|
896 |
+
if ( $settings['display_title_on_thumbnail'] == 'yes' || $settings['display_taxonomy_on_thumbnail'] == 'yes' ) {
|
897 |
$image_info = '<div class="lae-image-info">';
|
|
|
898 |
$image_info .= '<div class="lae-entry-info">';
|
899 |
+
if ( $settings['display_title_on_thumbnail'] == 'yes' ) {
|
|
|
|
|
900 |
$image_info .= '<' . $settings['title_tag'] . ' class="lae-post-title"><a href="' . get_permalink() . '" title="' . get_the_title() . '" rel="bookmark"' . $target . '>' . get_the_title() . '</a></' . $settings['title_tag'] . '>';
|
901 |
+
}
|
902 |
+
if ( $settings['display_taxonomy_on_thumbnail'] == 'yes' ) {
|
903 |
+
$image_info .= lae_get_info_for_taxonomies( $taxonomies );
|
904 |
+
}
|
|
|
|
|
|
|
|
|
|
|
905 |
$image_info .= '</div>';
|
|
|
906 |
$image_info .= '</div><!-- .lae-image-info -->';
|
907 |
+
$entry_image .= apply_filters(
|
908 |
+
'lae_posts_grid_image_info',
|
909 |
+
$image_info,
|
910 |
+
$post_id,
|
911 |
+
$settings
|
912 |
+
);
|
913 |
$entry_image .= '</div>';
|
914 |
+
}
|
915 |
+
|
916 |
+
$entry_output .= apply_filters(
|
917 |
+
'lae_posts_grid_entry_image',
|
918 |
+
$entry_image,
|
919 |
+
$image_setting,
|
920 |
+
$settings
|
921 |
+
);
|
922 |
+
}
|
923 |
+
|
924 |
+
|
925 |
+
if ( $settings['display_title'] == 'yes' || $settings['display_summary'] == 'yes' ) {
|
926 |
+
$entry_text = '<div class="lae-entry-text-wrap ' . (( $thumbnail_exists ? '' : ' nothumbnail' )) . '">';
|
927 |
+
|
928 |
+
if ( $settings['display_title'] == 'yes' ) {
|
929 |
$entry_title = '<' . $settings['entry_title_tag'] . ' class="entry-title"><a href="' . get_permalink() . '" title="' . get_the_title() . '" rel="bookmark"' . $target . '>' . get_the_title() . '</a></' . $settings['entry_title_tag'] . '>';
|
930 |
+
$entry_text .= apply_filters(
|
931 |
+
'lae_posts_grid_entry_title',
|
932 |
+
$entry_title,
|
933 |
+
$post_id,
|
934 |
+
$settings
|
935 |
+
);
|
936 |
+
}
|
937 |
+
|
938 |
+
|
939 |
+
if ( $settings['display_post_date'] == 'yes' || $settings['display_author'] == 'yes' || $settings['display_taxonomy'] == 'yes' ) {
|
940 |
$entry_meta = '<div class="lae-entry-meta">';
|
941 |
+
if ( $settings['display_author'] == 'yes' ) {
|
|
|
|
|
942 |
$entry_meta .= lae_entry_author();
|
943 |
+
}
|
944 |
+
if ( $settings['display_post_date'] == 'yes' ) {
|
|
|
|
|
|
|
945 |
$entry_meta .= lae_entry_published();
|
946 |
+
}
|
947 |
+
if ( $settings['display_taxonomy'] == 'yes' ) {
|
948 |
+
$entry_meta .= lae_get_info_for_taxonomies( $taxonomies );
|
949 |
+
}
|
|
|
|
|
|
|
|
|
|
|
950 |
$entry_meta .= '</div>';
|
951 |
+
$entry_text .= apply_filters(
|
952 |
+
'lae_posts_grid_entry_meta',
|
953 |
+
$entry_meta,
|
954 |
+
$post_id,
|
955 |
+
$settings
|
956 |
+
);
|
957 |
+
}
|
958 |
+
|
959 |
+
|
960 |
+
if ( $settings['display_summary'] == 'yes' ) {
|
961 |
$excerpt = '<div class="entry-summary">';
|
|
|
962 |
$excerpt .= get_the_excerpt();
|
|
|
963 |
$excerpt .= '</div>';
|
964 |
+
$entry_text .= apply_filters(
|
965 |
+
'lae_posts_grid_entry_excerpt',
|
966 |
+
$excerpt,
|
967 |
+
$post_id,
|
968 |
+
$settings
|
969 |
+
);
|
970 |
+
}
|
971 |
+
|
972 |
+
|
973 |
+
if ( $settings['display_read_more'] == 'yes' ) {
|
974 |
$read_more_text = $settings['read_more_text'];
|
|
|
975 |
$read_more = '<div class="lae-read-more">';
|
|
|
976 |
$read_more .= '<a href="' . get_the_permalink() . '"' . $target . '>' . $read_more_text . '</a>';
|
|
|
977 |
$read_more .= '</div>';
|
978 |
+
$entry_text .= apply_filters(
|
979 |
+
'lae_posts_grid_read_more_link',
|
980 |
+
$read_more,
|
981 |
+
$post_id,
|
982 |
+
$settings
|
983 |
+
);
|
984 |
+
}
|
985 |
+
|
986 |
$entry_text .= '</div>';
|
987 |
+
$entry_output .= apply_filters(
|
988 |
+
'lae_posts_grid_entry_text',
|
989 |
+
$entry_text,
|
990 |
+
$post_id,
|
991 |
+
$settings
|
992 |
+
);
|
993 |
+
}
|
994 |
+
|
995 |
+
}
|
996 |
+
|
997 |
$entry_output .= '</article><!-- .hentry -->';
|
|
|
998 |
$entry_output .= '</div>';
|
999 |
+
$output .= apply_filters(
|
1000 |
+
'lae_posts_grid_entry_output',
|
1001 |
+
$entry_output,
|
1002 |
+
$post_id,
|
1003 |
+
$settings
|
1004 |
+
);
|
1005 |
+
}
|
1006 |
wp_reset_postdata();
|
|
|
1007 |
$output .= '</div><!-- .lae-portfolio -->';
|
|
|
1008 |
$output .= '</div><!-- .lae-portfolio-wrap -->';
|
1009 |
+
}
|
1010 |
+
|
1011 |
+
echo apply_filters( 'lae_posts_grid_output', $output, $settings ) ;
|
1012 |
+
}
|
1013 |
+
|
|
|
|
|
1014 |
}
|
1015 |
+
|
1016 |
+
protected function content_template()
|
1017 |
+
{
|
1018 |
}
|
1019 |
|
1020 |
}
|
includes/widgets/posts-carousel.php
CHANGED
@@ -6,42 +6,47 @@ Description: Display blog posts or custom post types as a carousel.
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
class LAE_Posts_Carousel_Widget extends LAE_Widget_Base
|
23 |
-
|
24 |
-
public function get_name()
|
|
|
25 |
return 'lae-posts-carousel';
|
26 |
}
|
27 |
-
|
28 |
-
public function get_title()
|
29 |
-
|
|
|
30 |
}
|
31 |
-
|
32 |
-
public function get_icon()
|
|
|
33 |
return 'lae-icon-posts-carousel';
|
34 |
}
|
35 |
-
|
36 |
-
public function get_categories()
|
37 |
-
|
|
|
38 |
}
|
39 |
-
|
40 |
-
public function get_custom_help_url()
|
|
|
41 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/posts-carousel/';
|
42 |
}
|
43 |
-
|
44 |
-
public function get_script_depends()
|
|
|
45 |
return [
|
46 |
'lae-jquery-slick',
|
47 |
'lae-frontend-scripts',
|
@@ -49,8 +54,9 @@ class LAE_Posts_Carousel_Widget extends LAE_Widget_Base {
|
|
49 |
'lae-posts-carousel-scripts'
|
50 |
];
|
51 |
}
|
52 |
-
|
53 |
-
public function get_style_depends()
|
|
|
54 |
return [
|
55 |
'lae-icomoon-styles',
|
56 |
'lae-slick-carousel-styles',
|
@@ -59,1004 +65,659 @@ class LAE_Posts_Carousel_Widget extends LAE_Widget_Base {
|
|
59 |
'lae-posts-carousel-styles'
|
60 |
];
|
61 |
}
|
62 |
-
|
63 |
-
protected function _register_controls()
|
64 |
-
|
65 |
-
$this->start_controls_section(
|
66 |
-
'
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
'
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
$this->add_control(
|
101 |
-
'
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
]
|
128 |
-
|
129 |
-
|
130 |
-
$this->add_control(
|
131 |
-
'
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
'
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
]
|
156 |
-
|
157 |
-
|
158 |
-
$this->add_control(
|
159 |
-
'
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
'menu_order' => __('Menu order', 'livemesh-el-addons'),
|
185 |
-
'post__in' => __('By include order', 'livemesh-el-addons'),
|
186 |
-
),
|
187 |
-
'default' => 'date',
|
188 |
-
'condition' => [
|
189 |
-
'query_type' => ['custom_query', 'related']
|
190 |
-
]
|
191 |
-
]
|
192 |
-
);
|
193 |
-
|
194 |
-
$this->add_control(
|
195 |
-
'order',
|
196 |
-
[
|
197 |
-
'label' => __('Order', 'livemesh-el-addons'),
|
198 |
-
'type' => Controls_Manager::SELECT,
|
199 |
-
'options' => array(
|
200 |
-
'ASC' => __('Ascending', 'livemesh-el-addons'),
|
201 |
-
'DESC' => __('Descending', 'livemesh-el-addons'),
|
202 |
-
),
|
203 |
-
'default' => 'DESC',
|
204 |
-
'condition' => [
|
205 |
-
'query_type' => ['custom_query', 'related']
|
206 |
-
]
|
207 |
-
]
|
208 |
-
);
|
209 |
-
|
210 |
-
|
211 |
-
$this->add_control(
|
212 |
-
'offset',
|
213 |
-
[
|
214 |
-
'label' => __('Offset', 'livemesh-el-addons'),
|
215 |
-
'description' => __('Number of posts to skip or pass over.', 'livemesh-el-addons'),
|
216 |
-
'type' => Controls_Manager::NUMBER,
|
217 |
-
'default' => 0,
|
218 |
-
'condition' => [
|
219 |
-
'query_type' => 'custom_query'
|
220 |
-
]
|
221 |
-
]
|
222 |
-
);
|
223 |
-
|
224 |
$this->end_controls_section();
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
'
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
[
|
250 |
-
'label' => __('Select the custom skin template for the carousel item', 'livemesh-el-addons'),
|
251 |
-
'description' => '<div style="text-align:center;font-style: normal;">'
|
252 |
-
. '<a target="_blank" class="elementor-button elementor-button-default" href="'
|
253 |
-
. esc_url(admin_url('/edit.php?post_type=elementor_library&tabs_group=theme&elementor_library_type=livemesh_item'))
|
254 |
-
. '">'
|
255 |
-
. __('Create/Edit the Item Skin Builder Templates', 'livemesh-el-addons')
|
256 |
-
. '</a>'
|
257 |
-
. '</div>',
|
258 |
-
'type' => Controls_Manager::SELECT,
|
259 |
-
'label_block' => true,
|
260 |
-
'default' => [],
|
261 |
-
'options' => $this->get_item_template_options(),
|
262 |
-
'condition' => [
|
263 |
-
'carousel_skin' => 'custom_skin'
|
264 |
-
],
|
265 |
-
]
|
266 |
-
);
|
267 |
-
|
268 |
$this->end_controls_section();
|
269 |
-
|
270 |
-
|
271 |
-
'
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
'
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
);
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
'
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
$this->add_control(
|
319 |
-
'
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
'
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
'
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
'
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
)
|
374 |
-
|
375 |
-
|
376 |
-
'
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
);
|
398 |
-
|
399 |
-
$this->add_control(
|
400 |
-
'display_author',
|
401 |
-
[
|
402 |
-
'label' => __('Display post author info?', 'livemesh-el-addons'),
|
403 |
-
'type' => Controls_Manager::SWITCHER,
|
404 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
405 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
406 |
-
'return_value' => 'yes',
|
407 |
-
'default' => 'no',
|
408 |
-
]
|
409 |
-
);
|
410 |
-
|
411 |
-
$this->add_control(
|
412 |
-
'display_post_date',
|
413 |
-
[
|
414 |
-
'label' => __('Display post date info?', 'livemesh-el-addons'),
|
415 |
-
'type' => Controls_Manager::SWITCHER,
|
416 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
417 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
418 |
-
'return_value' => 'yes',
|
419 |
-
'default' => 'no',
|
420 |
-
]
|
421 |
-
);
|
422 |
-
|
423 |
-
|
424 |
-
$this->add_control(
|
425 |
-
'display_taxonomy',
|
426 |
-
[
|
427 |
-
'label' => __('Display taxonomy info?', 'livemesh-el-addons'),
|
428 |
-
'type' => Controls_Manager::SWITCHER,
|
429 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
430 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
431 |
-
'return_value' => 'yes',
|
432 |
-
'default' => 'no',
|
433 |
-
]
|
434 |
-
);
|
435 |
-
|
436 |
-
$this->add_control(
|
437 |
-
'display_read_more',
|
438 |
-
[
|
439 |
-
'label' => __('Display read more link to the post/portfolio?', 'livemesh-el-addons'),
|
440 |
-
'type' => Controls_Manager::SWITCHER,
|
441 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
442 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
443 |
-
'return_value' => 'yes',
|
444 |
-
'default' => 'no',
|
445 |
-
]
|
446 |
-
);
|
447 |
-
|
448 |
-
$this->add_control(
|
449 |
-
'read_more_text',
|
450 |
-
[
|
451 |
-
'label' => __('Read more text', 'livemesh-el-addons'),
|
452 |
-
'type' => Controls_Manager::TEXT,
|
453 |
-
"description" => __('Specify the text for the read more link/button', 'livemesh-el-addons'),
|
454 |
-
'default' => __('Read More', 'livemesh-el-addons'),
|
455 |
-
'condition' => [
|
456 |
-
'display_read_more' => ['yes']
|
457 |
-
],
|
458 |
-
]
|
459 |
-
);
|
460 |
-
|
461 |
$this->end_controls_section();
|
462 |
-
|
463 |
-
|
464 |
-
'
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
'
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
);
|
482 |
-
|
483 |
-
|
484 |
-
|
485 |
-
'
|
486 |
-
|
487 |
-
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
'
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
$this->add_control(
|
509 |
-
'
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
]
|
519 |
-
);
|
520 |
-
|
521 |
-
$this->add_control(
|
522 |
-
'adaptive_height',
|
523 |
-
[
|
524 |
-
'type' => Controls_Manager::SWITCHER,
|
525 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
526 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
527 |
-
'return_value' => 'yes',
|
528 |
-
'default' => 'no',
|
529 |
-
'label' => __('Adaptive Height?', 'livemesh-el-addons'),
|
530 |
-
'description' => __('Enables adaptive height for single slide horizontal carousels.', 'livemesh-el-addons'),
|
531 |
-
]
|
532 |
-
);
|
533 |
-
|
534 |
-
$this->add_control(
|
535 |
-
'autoplay_speed',
|
536 |
-
[
|
537 |
-
'label' => __('Autoplay speed in ms', 'livemesh-el-addons'),
|
538 |
-
'type' => Controls_Manager::NUMBER,
|
539 |
-
'default' => 3000,
|
540 |
-
]
|
541 |
-
);
|
542 |
-
|
543 |
-
|
544 |
-
$this->add_control(
|
545 |
-
'animation_speed',
|
546 |
-
[
|
547 |
-
'label' => __('Autoplay animation speed in ms', 'livemesh-el-addons'),
|
548 |
-
'type' => Controls_Manager::NUMBER,
|
549 |
-
'default' => 300,
|
550 |
-
]
|
551 |
-
);
|
552 |
-
|
553 |
$this->end_controls_section();
|
554 |
-
|
555 |
-
|
556 |
-
'
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
$this->add_control(
|
564 |
-
'
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
'
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
|
589 |
-
|
590 |
-
|
591 |
-
|
592 |
-
|
593 |
-
|
594 |
-
|
595 |
-
|
596 |
-
|
597 |
-
|
598 |
-
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
604 |
-
|
605 |
-
|
606 |
-
|
607 |
-
|
608 |
-
|
609 |
-
);
|
610 |
-
|
611 |
-
|
612 |
-
'
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
|
620 |
-
|
621 |
-
'
|
622 |
-
|
623 |
-
|
624 |
-
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
|
629 |
-
|
630 |
-
|
631 |
-
|
632 |
-
|
633 |
-
|
634 |
-
|
635 |
-
'
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
$this->add_control(
|
647 |
-
'
|
648 |
-
|
649 |
-
|
650 |
-
|
651 |
-
|
652 |
-
|
653 |
-
|
654 |
-
|
655 |
-
|
656 |
-
|
657 |
-
|
658 |
-
|
659 |
-
|
660 |
-
[
|
661 |
-
'label' => __('Tablet Resolution', 'livemesh-el-addons'),
|
662 |
-
'description' => __('The resolution to treat as a tablet resolution.', 'livemesh-el-addons'),
|
663 |
-
'type' => Controls_Manager::NUMBER,
|
664 |
-
'default' => 800,
|
665 |
-
]
|
666 |
-
);
|
667 |
-
|
668 |
-
|
669 |
-
$this->add_control(
|
670 |
-
'heading_mobile',
|
671 |
-
[
|
672 |
-
'label' => __('Mobile Phone', 'livemesh-el-addons'),
|
673 |
-
'type' => Controls_Manager::HEADING,
|
674 |
-
'separator' => 'after',
|
675 |
-
]
|
676 |
-
);
|
677 |
-
|
678 |
-
$this->add_control(
|
679 |
-
'mobile_gutter',
|
680 |
-
[
|
681 |
-
'label' => __('Mobile Gutter', 'livemesh-el-addons'),
|
682 |
-
'description' => __('Space between columns.', 'livemesh-el-addons'),
|
683 |
-
'type' => Controls_Manager::NUMBER,
|
684 |
-
'default' => 10,
|
685 |
-
'selectors' => [
|
686 |
-
'(mobile-){{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item' => 'padding: {{VALUE}}px;',
|
687 |
-
],
|
688 |
-
]
|
689 |
-
);
|
690 |
-
|
691 |
-
$this->add_control(
|
692 |
-
'mobile_display_columns',
|
693 |
-
[
|
694 |
-
'label' => __('Columns per row', 'livemesh-el-addons'),
|
695 |
-
'type' => Controls_Manager::NUMBER,
|
696 |
-
'min' => 1,
|
697 |
-
'max' => 3,
|
698 |
-
'step' => 1,
|
699 |
-
'default' => 1,
|
700 |
-
]
|
701 |
-
);
|
702 |
-
|
703 |
-
$this->add_control(
|
704 |
-
'mobile_scroll_columns',
|
705 |
-
[
|
706 |
-
'label' => __('Columns to scroll', 'livemesh-el-addons'),
|
707 |
-
'type' => Controls_Manager::NUMBER,
|
708 |
-
'min' => 1,
|
709 |
-
'max' => 3,
|
710 |
-
'step' => 1,
|
711 |
-
'default' => 1,
|
712 |
-
]
|
713 |
-
);
|
714 |
-
|
715 |
-
$this->add_control(
|
716 |
-
'mobile_width',
|
717 |
-
[
|
718 |
-
'label' => __('Mobile Resolution', 'livemesh-el-addons'),
|
719 |
-
'description' => __('The resolution to treat as a mobile resolution.', 'livemesh-el-addons'),
|
720 |
-
'type' => Controls_Manager::NUMBER,
|
721 |
-
'default' => 480,
|
722 |
-
]
|
723 |
-
);
|
724 |
-
|
725 |
-
|
726 |
$this->end_controls_section();
|
727 |
-
|
728 |
-
|
729 |
-
'
|
730 |
-
[
|
731 |
-
|
732 |
-
|
733 |
-
|
734 |
-
|
735 |
-
|
736 |
-
|
737 |
-
|
738 |
-
|
739 |
-
$this->add_control(
|
740 |
-
'
|
741 |
-
|
742 |
-
|
743 |
-
|
744 |
-
|
745 |
-
|
746 |
-
|
747 |
-
|
748 |
-
|
749 |
-
'
|
750 |
-
|
751 |
-
|
752 |
-
|
753 |
-
|
754 |
-
|
755 |
-
|
756 |
-
|
757 |
-
|
758 |
-
|
759 |
-
|
760 |
-
|
761 |
-
|
762 |
-
|
763 |
-
|
764 |
-
|
765 |
-
|
766 |
-
|
767 |
-
|
768 |
-
|
769 |
-
|
770 |
-
|
771 |
-
|
772 |
-
|
773 |
-
|
774 |
-
|
775 |
-
);
|
776 |
-
|
777 |
-
|
778 |
-
'
|
779 |
-
[
|
780 |
-
|
781 |
-
|
782 |
-
|
783 |
-
|
784 |
-
|
785 |
-
|
786 |
-
);
|
787 |
-
|
788 |
-
$this->add_group_control(
|
789 |
-
Group_Control_Typography::get_type(),
|
790 |
-
[
|
791 |
-
'name' => 'title_typography',
|
792 |
-
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-post-title',
|
793 |
-
]
|
794 |
-
);
|
795 |
-
|
796 |
-
$this->add_control(
|
797 |
-
'heading_thumbnail_info_taxonomy',
|
798 |
-
[
|
799 |
-
'label' => __('Thumbnail Info Taxonomy Terms', 'livemesh-el-addons'),
|
800 |
-
'type' => Controls_Manager::HEADING,
|
801 |
-
'separator' => 'after',
|
802 |
-
]
|
803 |
-
);
|
804 |
-
|
805 |
-
$this->add_control(
|
806 |
-
'thumbnail_info_tags_color',
|
807 |
-
[
|
808 |
-
'label' => __('Taxonomy Terms Color', 'livemesh-el-addons'),
|
809 |
-
'type' => Controls_Manager::COLOR,
|
810 |
-
'selectors' => [
|
811 |
-
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-terms, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-terms a' => 'color: {{VALUE}};',
|
812 |
-
],
|
813 |
-
]
|
814 |
-
);
|
815 |
-
|
816 |
-
$this->add_group_control(
|
817 |
-
Group_Control_Typography::get_type(),
|
818 |
-
[
|
819 |
-
'name' => 'tags_typography',
|
820 |
-
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-terms, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-terms a',
|
821 |
-
]
|
822 |
-
);
|
823 |
-
|
824 |
$this->end_controls_section();
|
825 |
-
|
826 |
-
|
827 |
-
'
|
828 |
-
[
|
829 |
-
|
830 |
-
|
831 |
-
|
832 |
-
|
833 |
-
|
834 |
-
|
835 |
-
|
836 |
-
|
837 |
-
|
838 |
-
'
|
839 |
-
|
840 |
-
|
841 |
-
|
842 |
-
|
843 |
-
|
844 |
-
|
845 |
-
|
846 |
-
|
847 |
-
|
848 |
-
|
849 |
-
|
850 |
-
|
851 |
-
|
852 |
-
|
853 |
-
)
|
854 |
-
|
855 |
-
|
856 |
-
|
857 |
-
[
|
858 |
-
'label' => __('Entry Title Color', 'livemesh-el-addons'),
|
859 |
-
'type' => Controls_Manager::COLOR,
|
860 |
-
'selectors' => [
|
861 |
-
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .entry-title a' => 'color: {{VALUE}};',
|
862 |
-
],
|
863 |
-
]
|
864 |
-
);
|
865 |
-
|
866 |
-
$this->add_group_control(
|
867 |
-
Group_Control_Typography::get_type(),
|
868 |
-
[
|
869 |
-
'name' => 'entry_title_typography',
|
870 |
-
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .entry-title',
|
871 |
-
]
|
872 |
-
);
|
873 |
-
|
874 |
$this->end_controls_section();
|
875 |
-
|
876 |
-
|
877 |
-
'
|
878 |
-
[
|
879 |
-
|
880 |
-
|
881 |
-
|
882 |
-
|
883 |
-
|
884 |
-
|
885 |
-
|
886 |
-
|
887 |
-
|
888 |
-
|
889 |
-
|
890 |
-
|
891 |
-
|
892 |
-
|
893 |
-
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .entry-summary' => 'color: {{VALUE}};',
|
894 |
-
],
|
895 |
-
]
|
896 |
-
);
|
897 |
-
|
898 |
-
$this->add_group_control(
|
899 |
-
Group_Control_Typography::get_type(),
|
900 |
-
[
|
901 |
-
'name' => 'entry_summary_typography',
|
902 |
-
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .entry-summary',
|
903 |
-
]
|
904 |
-
);
|
905 |
-
|
906 |
$this->end_controls_section();
|
907 |
-
|
908 |
-
|
909 |
-
'
|
910 |
-
[
|
911 |
-
|
912 |
-
|
913 |
-
|
914 |
-
|
915 |
-
|
916 |
-
|
917 |
-
|
918 |
-
|
919 |
-
$this->add_control(
|
920 |
-
'
|
921 |
-
|
922 |
-
|
923 |
-
|
924 |
-
|
925 |
-
|
926 |
-
)
|
927 |
-
|
928 |
-
|
929 |
-
|
930 |
-
|
931 |
-
|
932 |
-
|
933 |
-
|
934 |
-
|
935 |
-
|
936 |
-
|
937 |
-
|
938 |
-
|
939 |
-
|
940 |
-
|
941 |
-
|
942 |
-
|
943 |
-
|
944 |
-
|
945 |
-
);
|
946 |
-
|
947 |
-
|
948 |
-
$this->add_control(
|
949 |
-
'heading_entry_meta_link',
|
950 |
-
[
|
951 |
-
'label' => __('Entry Meta Link', 'livemesh-el-addons'),
|
952 |
-
'type' => Controls_Manager::HEADING,
|
953 |
-
'separator' => 'after',
|
954 |
-
]
|
955 |
-
);
|
956 |
-
|
957 |
-
$this->add_control(
|
958 |
-
'entry_meta_link_color',
|
959 |
-
[
|
960 |
-
'label' => __('Entry Meta Link Color', 'livemesh-el-addons'),
|
961 |
-
'type' => Controls_Manager::COLOR,
|
962 |
-
'selectors' => [
|
963 |
-
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-entry-meta span a' => 'color: {{VALUE}};',
|
964 |
-
],
|
965 |
-
]
|
966 |
-
);
|
967 |
-
|
968 |
-
$this->add_group_control(
|
969 |
-
Group_Control_Typography::get_type(),
|
970 |
-
[
|
971 |
-
'name' => 'entry_meta_link_typography',
|
972 |
-
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-entry-meta span a',
|
973 |
-
]
|
974 |
-
);
|
975 |
-
|
976 |
$this->end_controls_section();
|
977 |
-
|
978 |
-
|
979 |
-
'
|
980 |
-
[
|
981 |
-
|
982 |
-
|
983 |
-
|
984 |
-
|
985 |
-
|
986 |
-
|
987 |
-
|
988 |
-
|
989 |
-
|
990 |
-
|
991 |
-
|
992 |
-
|
993 |
-
|
994 |
-
|
995 |
-
|
996 |
-
|
997 |
-
|
998 |
-
)
|
999 |
-
|
1000 |
-
|
1001 |
-
|
1002 |
-
[
|
1003 |
-
'label' => __('Read More Hover Color', 'livemesh-el-addons'),
|
1004 |
-
'type' => Controls_Manager::COLOR,
|
1005 |
-
'selectors' => [
|
1006 |
-
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more:hover, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more a:hover' => 'color: {{VALUE}};',
|
1007 |
-
],
|
1008 |
-
]
|
1009 |
-
);
|
1010 |
-
|
1011 |
-
$this->add_group_control(
|
1012 |
-
Group_Control_Typography::get_type(),
|
1013 |
-
[
|
1014 |
-
'name' => 'read_more_typography',
|
1015 |
-
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more a',
|
1016 |
-
]
|
1017 |
-
);
|
1018 |
-
|
1019 |
$this->end_controls_section();
|
1020 |
-
|
1021 |
-
|
1022 |
}
|
1023 |
-
|
1024 |
-
protected function get_item_template_options()
|
1025 |
-
|
1026 |
$template_options = array();
|
1027 |
-
|
1028 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
1029 |
-
|
1030 |
-
|
1031 |
-
|
1032 |
-
|
|
|
|
|
1033 |
$templates = lae_get_livemesh_item_templates();
|
1034 |
-
|
1035 |
//$template_options = [0 => __('Select a template', 'livemesh-el-addons')];
|
1036 |
-
|
1037 |
-
foreach ($templates as $template) {
|
1038 |
$template_options[$template->ID] = $template->post_title;
|
1039 |
}
|
1040 |
}
|
1041 |
-
|
1042 |
return $template_options;
|
1043 |
}
|
1044 |
-
|
1045 |
-
protected function render()
|
1046 |
-
|
1047 |
$settings = $this->get_settings_for_display();
|
1048 |
-
|
1049 |
-
$settings = apply_filters('lae_posts_carousel_' . $this->get_id() . '_settings', $settings);
|
1050 |
-
|
1051 |
$args['settings'] = $settings;
|
1052 |
-
|
1053 |
$args['widget_instance'] = $this;
|
1054 |
-
|
1055 |
-
lae_get_template_part('addons/posts-carousel/loop', $args);
|
1056 |
-
|
1057 |
}
|
1058 |
-
|
1059 |
-
protected function content_template()
|
|
|
1060 |
}
|
1061 |
|
1062 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Widget_Base ;
|
12 |
+
use Elementor\Controls_Manager ;
|
13 |
+
use Elementor\Scheme_Color ;
|
14 |
+
use Elementor\Group_Control_Typography ;
|
15 |
+
use Elementor\Group_Control_Image_Size ;
|
16 |
+
use Elementor\Scheme_Typography ;
|
17 |
+
if ( !defined( 'ABSPATH' ) ) {
|
18 |
+
exit;
|
19 |
+
}
|
20 |
+
// Exit if accessed directly
|
21 |
+
class LAE_Posts_Carousel_Widget extends LAE_Widget_Base
|
22 |
+
{
|
23 |
+
public function get_name()
|
24 |
+
{
|
25 |
return 'lae-posts-carousel';
|
26 |
}
|
27 |
+
|
28 |
+
public function get_title()
|
29 |
+
{
|
30 |
+
return __( 'Posts Carousel', 'livemesh-el-addons' );
|
31 |
}
|
32 |
+
|
33 |
+
public function get_icon()
|
34 |
+
{
|
35 |
return 'lae-icon-posts-carousel';
|
36 |
}
|
37 |
+
|
38 |
+
public function get_categories()
|
39 |
+
{
|
40 |
+
return array( 'livemesh-addons' );
|
41 |
}
|
42 |
+
|
43 |
+
public function get_custom_help_url()
|
44 |
+
{
|
45 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/posts-carousel/';
|
46 |
}
|
47 |
+
|
48 |
+
public function get_script_depends()
|
49 |
+
{
|
50 |
return [
|
51 |
'lae-jquery-slick',
|
52 |
'lae-frontend-scripts',
|
54 |
'lae-posts-carousel-scripts'
|
55 |
];
|
56 |
}
|
57 |
+
|
58 |
+
public function get_style_depends()
|
59 |
+
{
|
60 |
return [
|
61 |
'lae-icomoon-styles',
|
62 |
'lae-slick-carousel-styles',
|
65 |
'lae-posts-carousel-styles'
|
66 |
];
|
67 |
}
|
68 |
+
|
69 |
+
protected function _register_controls()
|
70 |
+
{
|
71 |
+
$this->start_controls_section( 'section_query', [
|
72 |
+
'label' => __( 'Posts Query', 'livemesh-el-addons' ),
|
73 |
+
] );
|
74 |
+
$this->add_control( 'query_type', [
|
75 |
+
'label' => __( 'Source', 'livemesh-el-addons' ),
|
76 |
+
'type' => Controls_Manager::SELECT,
|
77 |
+
'options' => array(
|
78 |
+
'custom_query' => __( 'Custom Query', 'livemesh-el-addons' ),
|
79 |
+
'current_query' => __( 'Current Query', 'livemesh-el-addons' ),
|
80 |
+
'related' => __( 'Related', 'livemesh-el-addons' ),
|
81 |
+
),
|
82 |
+
'default' => 'custom_query',
|
83 |
+
] );
|
84 |
+
$this->add_control( 'post_types', [
|
85 |
+
'label' => __( 'Post Types', 'livemesh-el-addons' ),
|
86 |
+
'type' => Controls_Manager::SELECT2,
|
87 |
+
'default' => 'post',
|
88 |
+
'options' => lae_get_all_post_type_options(),
|
89 |
+
'multiple' => true,
|
90 |
+
'condition' => [
|
91 |
+
'query_type' => 'custom_query',
|
92 |
+
],
|
93 |
+
] );
|
94 |
+
$this->add_control( 'taxonomies', [
|
95 |
+
'type' => Controls_Manager::SELECT2,
|
96 |
+
'label' => __( 'Choose the taxonomies to display related posts.', 'livemesh-el-addons' ),
|
97 |
+
'label_block' => true,
|
98 |
+
'description' => __( 'Choose the taxonomies to be used for displaying posts related to current post, page or custom post type.', 'livemesh-el-addons' ),
|
99 |
+
'options' => lae_get_taxonomies_map(),
|
100 |
+
'default' => 'category',
|
101 |
+
'multiple' => true,
|
102 |
+
'condition' => [
|
103 |
+
'query_type' => 'related',
|
104 |
+
],
|
105 |
+
] );
|
106 |
+
$this->add_control( 'tax_query', [
|
107 |
+
'label' => __( 'Taxonomies', 'livemesh-el-addons' ),
|
108 |
+
'type' => Controls_Manager::SELECT2,
|
109 |
+
'options' => lae_get_all_taxonomy_options(),
|
110 |
+
'multiple' => true,
|
111 |
+
'label_block' => true,
|
112 |
+
'condition' => [
|
113 |
+
'query_type' => 'custom_query',
|
114 |
+
],
|
115 |
+
] );
|
116 |
+
$this->add_control( 'post_in', [
|
117 |
+
'label' => __( 'Post In', 'livemesh-el-addons' ),
|
118 |
+
'description' => __( 'Provide a comma separated list of Post IDs to display in the grid.', 'livemesh-el-addons' ),
|
119 |
+
'type' => Controls_Manager::TEXT,
|
120 |
+
'label_block' => true,
|
121 |
+
'condition' => [
|
122 |
+
'query_type' => 'custom_query',
|
123 |
+
],
|
124 |
+
] );
|
125 |
+
$this->add_control( 'posts_per_page', [
|
126 |
+
'label' => __( 'Posts Per Page', 'livemesh-el-addons' ),
|
127 |
+
'type' => Controls_Manager::NUMBER,
|
128 |
+
'min' => 1,
|
129 |
+
'max' => 50,
|
130 |
+
'step' => 1,
|
131 |
+
'default' => 6,
|
132 |
+
'condition' => [
|
133 |
+
'query_type' => [ 'custom_query', 'related' ],
|
134 |
+
],
|
135 |
+
] );
|
136 |
+
$this->add_control( 'advanced', [
|
137 |
+
'label' => __( 'Advanced', 'livemesh-el-addons' ),
|
138 |
+
'type' => Controls_Manager::HEADING,
|
139 |
+
'condition' => [
|
140 |
+
'query_type' => [ 'custom_query', 'related' ],
|
141 |
+
],
|
142 |
+
] );
|
143 |
+
$this->add_control( 'orderby', [
|
144 |
+
'label' => __( 'Order By', 'livemesh-el-addons' ),
|
145 |
+
'type' => Controls_Manager::SELECT,
|
146 |
+
'options' => array(
|
147 |
+
'none' => __( 'No order', 'livemesh-el-addons' ),
|
148 |
+
'ID' => __( 'Post ID', 'livemesh-el-addons' ),
|
149 |
+
'author' => __( 'Author', 'livemesh-el-addons' ),
|
150 |
+
'title' => __( 'Title', 'livemesh-el-addons' ),
|
151 |
+
'date' => __( 'Published date', 'livemesh-el-addons' ),
|
152 |
+
'modified' => __( 'Modified date', 'livemesh-el-addons' ),
|
153 |
+
'parent' => __( 'By parent', 'livemesh-el-addons' ),
|
154 |
+
'rand' => __( 'Random order', 'livemesh-el-addons' ),
|
155 |
+
'comment_count' => __( 'Comment count', 'livemesh-el-addons' ),
|
156 |
+
'menu_order' => __( 'Menu order', 'livemesh-el-addons' ),
|
157 |
+
'post__in' => __( 'By include order', 'livemesh-el-addons' ),
|
158 |
+
),
|
159 |
+
'default' => 'date',
|
160 |
+
'condition' => [
|
161 |
+
'query_type' => [ 'custom_query', 'related' ],
|
162 |
+
],
|
163 |
+
] );
|
164 |
+
$this->add_control( 'order', [
|
165 |
+
'label' => __( 'Order', 'livemesh-el-addons' ),
|
166 |
+
'type' => Controls_Manager::SELECT,
|
167 |
+
'options' => array(
|
168 |
+
'ASC' => __( 'Ascending', 'livemesh-el-addons' ),
|
169 |
+
'DESC' => __( 'Descending', 'livemesh-el-addons' ),
|
170 |
+
),
|
171 |
+
'default' => 'DESC',
|
172 |
+
'condition' => [
|
173 |
+
'query_type' => [ 'custom_query', 'related' ],
|
174 |
+
],
|
175 |
+
] );
|
176 |
+
$this->add_control( 'offset', [
|
177 |
+
'label' => __( 'Offset', 'livemesh-el-addons' ),
|
178 |
+
'description' => __( 'Number of posts to skip or pass over.', 'livemesh-el-addons' ),
|
179 |
+
'type' => Controls_Manager::NUMBER,
|
180 |
+
'default' => 0,
|
181 |
+
'condition' => [
|
182 |
+
'query_type' => 'custom_query',
|
183 |
+
],
|
184 |
+
] );
|
185 |
+
$this->add_control( 'upgrade_notice', [
|
186 |
+
'type' => Controls_Manager::RAW_HTML,
|
187 |
+
'separator' => 'before',
|
188 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
189 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
190 |
$this->end_controls_section();
|
191 |
+
$this->start_controls_section( 'section_carousel_skin', [
|
192 |
+
'label' => __( 'Carousel Skin', 'livemesh-el-addons' ),
|
193 |
+
] );
|
194 |
+
$this->add_control( 'carousel_skin', [
|
195 |
+
'label' => __( 'Choose Carousel Skin', 'livemesh-el-addons' ),
|
196 |
+
'description' => __( 'The "Classic Skin" is the built-in styling provided for the carousel items. Choose "Custom Skin" if you want to use theme builder template for the carousel items.', 'livemesh-el-addons' ),
|
197 |
+
'type' => Controls_Manager::SELECT,
|
198 |
+
'options' => array(
|
199 |
+
'classic_skin' => __( 'Classic Skin', 'livemesh-el-addons' ),
|
200 |
+
'custom_skin' => __( 'Custom Skin', 'livemesh-el-addons' ),
|
201 |
+
),
|
202 |
+
'default' => 'classic_skin',
|
203 |
+
] );
|
204 |
+
$this->add_control( 'item_template', [
|
205 |
+
'label' => __( 'Select the custom skin template for the carousel item', 'livemesh-el-addons' ),
|
206 |
+
'description' => '<div style="text-align:center;font-style: normal;">' . '<a target="_blank" class="elementor-button elementor-button-default" href="' . esc_url( admin_url( '/edit.php?post_type=elementor_library&tabs_group=theme&elementor_library_type=livemesh_item' ) ) . '">' . __( 'Create/Edit the Item Skin Builder Templates', 'livemesh-el-addons' ) . '</a>' . '</div>',
|
207 |
+
'type' => Controls_Manager::SELECT,
|
208 |
+
'label_block' => true,
|
209 |
+
'default' => [],
|
210 |
+
'options' => $this->get_item_template_options(),
|
211 |
+
'condition' => [
|
212 |
+
'carousel_skin' => 'custom_skin',
|
213 |
+
],
|
214 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
215 |
$this->end_controls_section();
|
216 |
+
$this->start_controls_section( 'section_post_content', [
|
217 |
+
'label' => __( 'Post Content', 'livemesh-el-addons' ),
|
218 |
+
'condition' => [
|
219 |
+
'carousel_skin' => 'classic_skin',
|
220 |
+
],
|
221 |
+
] );
|
222 |
+
$this->add_control( 'taxonomy_chosen', [
|
223 |
+
'label' => __( 'Choose the taxonomy to display info.', 'livemesh-el-addons' ),
|
224 |
+
'description' => __( 'Choose the taxonomy to use for display of taxonomy information for posts/custom post types.', 'livemesh-el-addons' ),
|
225 |
+
'type' => Controls_Manager::SELECT,
|
226 |
+
'label_block' => true,
|
227 |
+
'default' => 'category',
|
228 |
+
'options' => lae_get_taxonomies_map(),
|
229 |
+
] );
|
230 |
+
$this->add_control( 'display_thumbnail', [
|
231 |
+
'label' => __( 'Display post thumbnail?', 'livemesh-el-addons' ),
|
232 |
+
'type' => Controls_Manager::SWITCHER,
|
233 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
234 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
235 |
+
'return_value' => 'yes',
|
236 |
+
'default' => 'yes',
|
237 |
+
] );
|
238 |
+
$this->add_group_control( Group_Control_Image_Size::get_type(), [
|
239 |
+
'name' => 'thumbnail_size',
|
240 |
+
'label' => __( 'Image Size', 'livemesh-el-addons' ),
|
241 |
+
'default' => 'large',
|
242 |
+
'condition' => [
|
243 |
+
'display_thumbnail' => 'yes',
|
244 |
+
],
|
245 |
+
] );
|
246 |
+
$this->add_control( 'image_linkable', [
|
247 |
+
'label' => __( 'Link Images to Posts?', 'livemesh-el-addons' ),
|
248 |
+
'type' => Controls_Manager::SWITCHER,
|
249 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
250 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
251 |
+
'return_value' => 'yes',
|
252 |
+
'default' => 'yes',
|
253 |
+
'condition' => [
|
254 |
+
'display_thumbnail' => 'yes',
|
255 |
+
],
|
256 |
+
] );
|
257 |
+
$this->add_control( 'post_link_new_window', [
|
258 |
+
'label' => __( 'Open post links in new window?', 'livemesh-el-addons' ),
|
259 |
+
'type' => Controls_Manager::SWITCHER,
|
260 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
261 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
262 |
+
'return_value' => 'yes',
|
263 |
+
'default' => '',
|
264 |
+
] );
|
265 |
+
$this->add_control( 'display_title_on_thumbnail', [
|
266 |
+
'label' => __( 'Display posts title on the post/portfolio thumbnail?', 'livemesh-el-addons' ),
|
267 |
+
'type' => Controls_Manager::SWITCHER,
|
268 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
269 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
270 |
+
'return_value' => 'yes',
|
271 |
+
'default' => 'yes',
|
272 |
+
'condition' => [
|
273 |
+
'display_thumbnail' => 'yes',
|
274 |
+
],
|
275 |
+
] );
|
276 |
+
$this->add_control( 'display_taxonomy_on_thumbnail', [
|
277 |
+
'label' => __( 'Display taxonomy info on post/project thumbnail?', 'livemesh-el-addons' ),
|
278 |
+
'type' => Controls_Manager::SWITCHER,
|
279 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
280 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
281 |
+
'return_value' => 'yes',
|
282 |
+
'default' => 'yes',
|
283 |
+
'condition' => [
|
284 |
+
'display_thumbnail' => 'yes',
|
285 |
+
],
|
286 |
+
] );
|
287 |
+
$this->add_control( 'display_title', [
|
288 |
+
'label' => __( 'Display posts title?', 'livemesh-el-addons' ),
|
289 |
+
'type' => Controls_Manager::SWITCHER,
|
290 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
291 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
292 |
+
'return_value' => 'yes',
|
293 |
+
'default' => 'yes',
|
294 |
+
] );
|
295 |
+
$this->add_control( 'display_summary', [
|
296 |
+
'label' => __( 'Display post excerpt/summary?', 'livemesh-el-addons' ),
|
297 |
+
'type' => Controls_Manager::SWITCHER,
|
298 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
299 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
300 |
+
'return_value' => 'yes',
|
301 |
+
'default' => 'yes',
|
302 |
+
] );
|
303 |
+
$this->add_control( 'display_author', [
|
304 |
+
'label' => __( 'Display post author info?', 'livemesh-el-addons' ),
|
305 |
+
'type' => Controls_Manager::SWITCHER,
|
306 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
307 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
308 |
+
'return_value' => 'yes',
|
309 |
+
'default' => 'no',
|
310 |
+
] );
|
311 |
+
$this->add_control( 'display_post_date', [
|
312 |
+
'label' => __( 'Display post date info?', 'livemesh-el-addons' ),
|
313 |
+
'type' => Controls_Manager::SWITCHER,
|
314 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
315 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
316 |
+
'return_value' => 'yes',
|
317 |
+
'default' => 'no',
|
318 |
+
] );
|
319 |
+
$this->add_control( 'display_taxonomy', [
|
320 |
+
'label' => __( 'Display taxonomy info?', 'livemesh-el-addons' ),
|
321 |
+
'type' => Controls_Manager::SWITCHER,
|
322 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
323 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
324 |
+
'return_value' => 'yes',
|
325 |
+
'default' => 'no',
|
326 |
+
] );
|
327 |
+
$this->add_control( 'display_read_more', [
|
328 |
+
'label' => __( 'Display read more link to the post/portfolio?', 'livemesh-el-addons' ),
|
329 |
+
'type' => Controls_Manager::SWITCHER,
|
330 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
331 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
332 |
+
'return_value' => 'yes',
|
333 |
+
'default' => 'no',
|
334 |
+
] );
|
335 |
+
$this->add_control( 'read_more_text', [
|
336 |
+
'label' => __( 'Read more text', 'livemesh-el-addons' ),
|
337 |
+
'type' => Controls_Manager::TEXT,
|
338 |
+
"description" => __( 'Specify the text for the read more link/button', 'livemesh-el-addons' ),
|
339 |
+
'default' => __( 'Read More', 'livemesh-el-addons' ),
|
340 |
+
'condition' => [
|
341 |
+
'display_read_more' => [ 'yes' ],
|
342 |
+
],
|
343 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
344 |
$this->end_controls_section();
|
345 |
+
$this->start_controls_section( 'section_carousel_settings', [
|
346 |
+
'label' => __( 'Carousel Settings', 'livemesh-el-addons' ),
|
347 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
348 |
+
] );
|
349 |
+
$this->add_control( 'arrows', [
|
350 |
+
'type' => Controls_Manager::SWITCHER,
|
351 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
352 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
353 |
+
'return_value' => 'yes',
|
354 |
+
'default' => 'yes',
|
355 |
+
'label' => __( 'Prev/Next Arrows?', 'livemesh-el-addons' ),
|
356 |
+
] );
|
357 |
+
$this->add_control( 'dots', [
|
358 |
+
'type' => Controls_Manager::SWITCHER,
|
359 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
360 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
361 |
+
'return_value' => 'yes',
|
362 |
+
'default' => 'no',
|
363 |
+
'label' => __( 'Show dot indicators for navigation?', 'livemesh-el-addons' ),
|
364 |
+
] );
|
365 |
+
$this->add_control( 'pause_on_hover', [
|
366 |
+
'type' => Controls_Manager::SWITCHER,
|
367 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
368 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
369 |
+
'return_value' => 'yes',
|
370 |
+
'default' => 'yes',
|
371 |
+
'label' => __( 'Pause on Hover?', 'livemesh-el-addons' ),
|
372 |
+
] );
|
373 |
+
$this->add_control( 'autoplay', [
|
374 |
+
'type' => Controls_Manager::SWITCHER,
|
375 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
376 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
377 |
+
'return_value' => 'yes',
|
378 |
+
'default' => 'no',
|
379 |
+
'label' => __( 'Autoplay?', 'livemesh-el-addons' ),
|
380 |
+
'description' => __( 'Should the carousel autoplay as in a slideshow.', 'livemesh-el-addons' ),
|
381 |
+
] );
|
382 |
+
$this->add_control( 'adaptive_height', [
|
383 |
+
'type' => Controls_Manager::SWITCHER,
|
384 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
385 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
386 |
+
'return_value' => 'yes',
|
387 |
+
'default' => 'no',
|
388 |
+
'label' => __( 'Adaptive Height?', 'livemesh-el-addons' ),
|
389 |
+
'description' => __( 'Enables adaptive height for single slide horizontal carousels.', 'livemesh-el-addons' ),
|
390 |
+
] );
|
391 |
+
$this->add_control( 'autoplay_speed', [
|
392 |
+
'label' => __( 'Autoplay speed in ms', 'livemesh-el-addons' ),
|
393 |
+
'type' => Controls_Manager::NUMBER,
|
394 |
+
'default' => 3000,
|
395 |
+
] );
|
396 |
+
$this->add_control( 'animation_speed', [
|
397 |
+
'label' => __( 'Autoplay animation speed in ms', 'livemesh-el-addons' ),
|
398 |
+
'type' => Controls_Manager::NUMBER,
|
399 |
+
'default' => 300,
|
400 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
401 |
$this->end_controls_section();
|
402 |
+
$this->start_controls_section( 'section_responsive', [
|
403 |
+
'label' => __( 'Responsive Options', 'livemesh-el-addons' ),
|
404 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
405 |
+
] );
|
406 |
+
$this->add_control( 'heading_desktop', [
|
407 |
+
'label' => __( 'Desktop', 'livemesh-el-addons' ),
|
408 |
+
'type' => Controls_Manager::HEADING,
|
409 |
+
'separator' => 'after',
|
410 |
+
] );
|
411 |
+
$this->add_control( 'gutter', [
|
412 |
+
'label' => __( 'Gutter', 'livemesh-el-addons' ),
|
413 |
+
'description' => __( 'Space between columns.', 'livemesh-el-addons' ),
|
414 |
+
'type' => Controls_Manager::NUMBER,
|
415 |
+
'default' => 10,
|
416 |
+
'selectors' => [
|
417 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item' => 'padding: {{VALUE}}px;',
|
418 |
+
],
|
419 |
+
] );
|
420 |
+
$this->add_control( 'display_columns', [
|
421 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
422 |
+
'type' => Controls_Manager::NUMBER,
|
423 |
+
'min' => 1,
|
424 |
+
'max' => 5,
|
425 |
+
'step' => 1,
|
426 |
+
'default' => 3,
|
427 |
+
] );
|
428 |
+
$this->add_control( 'scroll_columns', [
|
429 |
+
'label' => __( 'Columns to scroll', 'livemesh-el-addons' ),
|
430 |
+
'type' => Controls_Manager::NUMBER,
|
431 |
+
'min' => 1,
|
432 |
+
'max' => 5,
|
433 |
+
'step' => 1,
|
434 |
+
'default' => 3,
|
435 |
+
] );
|
436 |
+
$this->add_control( 'heading_tablet', [
|
437 |
+
'label' => __( 'Tablet', 'livemesh-el-addons' ),
|
438 |
+
'type' => Controls_Manager::HEADING,
|
439 |
+
'separator' => 'after',
|
440 |
+
] );
|
441 |
+
$this->add_control( 'tablet_gutter', [
|
442 |
+
'label' => __( 'Gutter', 'livemesh-el-addons' ),
|
443 |
+
'description' => __( 'Space between columns.', 'livemesh-el-addons' ),
|
444 |
+
'type' => Controls_Manager::NUMBER,
|
445 |
+
'default' => 10,
|
446 |
+
'selectors' => [
|
447 |
+
'(tablet-){{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item' => 'padding: {{VALUE}}px;',
|
448 |
+
],
|
449 |
+
] );
|
450 |
+
$this->add_control( 'tablet_display_columns', [
|
451 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
452 |
+
'type' => Controls_Manager::NUMBER,
|
453 |
+
'min' => 1,
|
454 |
+
'max' => 5,
|
455 |
+
'step' => 1,
|
456 |
+
'default' => 2,
|
457 |
+
] );
|
458 |
+
$this->add_control( 'tablet_scroll_columns', [
|
459 |
+
'label' => __( 'Columns to scroll', 'livemesh-el-addons' ),
|
460 |
+
'type' => Controls_Manager::NUMBER,
|
461 |
+
'min' => 1,
|
462 |
+
'max' => 5,
|
463 |
+
'step' => 1,
|
464 |
+
'default' => 2,
|
465 |
+
] );
|
466 |
+
$this->add_control( 'tablet_width', [
|
467 |
+
'label' => __( 'Tablet Resolution', 'livemesh-el-addons' ),
|
468 |
+
'description' => __( 'The resolution to treat as a tablet resolution.', 'livemesh-el-addons' ),
|
469 |
+
'type' => Controls_Manager::NUMBER,
|
470 |
+
'default' => 800,
|
471 |
+
] );
|
472 |
+
$this->add_control( 'heading_mobile', [
|
473 |
+
'label' => __( 'Mobile Phone', 'livemesh-el-addons' ),
|
474 |
+
'type' => Controls_Manager::HEADING,
|
475 |
+
'separator' => 'after',
|
476 |
+
] );
|
477 |
+
$this->add_control( 'mobile_gutter', [
|
478 |
+
'label' => __( 'Mobile Gutter', 'livemesh-el-addons' ),
|
479 |
+
'description' => __( 'Space between columns.', 'livemesh-el-addons' ),
|
480 |
+
'type' => Controls_Manager::NUMBER,
|
481 |
+
'default' => 10,
|
482 |
+
'selectors' => [
|
483 |
+
'(mobile-){{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item' => 'padding: {{VALUE}}px;',
|
484 |
+
],
|
485 |
+
] );
|
486 |
+
$this->add_control( 'mobile_display_columns', [
|
487 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
488 |
+
'type' => Controls_Manager::NUMBER,
|
489 |
+
'min' => 1,
|
490 |
+
'max' => 3,
|
491 |
+
'step' => 1,
|
492 |
+
'default' => 1,
|
493 |
+
] );
|
494 |
+
$this->add_control( 'mobile_scroll_columns', [
|
495 |
+
'label' => __( 'Columns to scroll', 'livemesh-el-addons' ),
|
496 |
+
'type' => Controls_Manager::NUMBER,
|
497 |
+
'min' => 1,
|
498 |
+
'max' => 3,
|
499 |
+
'step' => 1,
|
500 |
+
'default' => 1,
|
501 |
+
] );
|
502 |
+
$this->add_control( 'mobile_width', [
|
503 |
+
'label' => __( 'Mobile Resolution', 'livemesh-el-addons' ),
|
504 |
+
'description' => __( 'The resolution to treat as a mobile resolution.', 'livemesh-el-addons' ),
|
505 |
+
'type' => Controls_Manager::NUMBER,
|
506 |
+
'default' => 480,
|
507 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
508 |
$this->end_controls_section();
|
509 |
+
$this->start_controls_section( 'section_carousel_item_thumbnail_styling', [
|
510 |
+
'label' => __( 'Post Thumbnail', 'livemesh-el-addons' ),
|
511 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
512 |
+
'condition' => [
|
513 |
+
'carousel_skin' => 'classic_skin',
|
514 |
+
],
|
515 |
+
] );
|
516 |
+
$this->add_control( 'heading_thumbnail_info', [
|
517 |
+
'label' => __( 'Thumbnail Info Entry Title', 'livemesh-el-addons' ),
|
518 |
+
'type' => Controls_Manager::HEADING,
|
519 |
+
'separator' => 'after',
|
520 |
+
] );
|
521 |
+
$this->add_control( 'title_tag', [
|
522 |
+
'label' => __( 'Title HTML Tag', 'livemesh-el-addons' ),
|
523 |
+
'type' => Controls_Manager::SELECT,
|
524 |
+
'options' => [
|
525 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
526 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
527 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
528 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
529 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
530 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
531 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
532 |
+
],
|
533 |
+
'default' => 'h3',
|
534 |
+
] );
|
535 |
+
$this->add_control( 'title_color', [
|
536 |
+
'label' => __( 'Title Color', 'livemesh-el-addons' ),
|
537 |
+
'type' => Controls_Manager::COLOR,
|
538 |
+
'selectors' => [
|
539 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-post-title a' => 'color: {{VALUE}};',
|
540 |
+
],
|
541 |
+
] );
|
542 |
+
$this->add_control( 'title_hover_border_color', [
|
543 |
+
'label' => __( 'Title Hover Border Color', 'livemesh-el-addons' ),
|
544 |
+
'type' => Controls_Manager::COLOR,
|
545 |
+
'selectors' => [
|
546 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-post-title a:hover' => 'border-color: {{VALUE}};',
|
547 |
+
],
|
548 |
+
] );
|
549 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
550 |
+
'name' => 'title_typography',
|
551 |
+
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-post-title',
|
552 |
+
] );
|
553 |
+
$this->add_control( 'heading_thumbnail_info_taxonomy', [
|
554 |
+
'label' => __( 'Thumbnail Info Taxonomy Terms', 'livemesh-el-addons' ),
|
555 |
+
'type' => Controls_Manager::HEADING,
|
556 |
+
'separator' => 'after',
|
557 |
+
] );
|
558 |
+
$this->add_control( 'thumbnail_info_tags_color', [
|
559 |
+
'label' => __( 'Taxonomy Terms Color', 'livemesh-el-addons' ),
|
560 |
+
'type' => Controls_Manager::COLOR,
|
561 |
+
'selectors' => [
|
562 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-terms, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-terms a' => 'color: {{VALUE}};',
|
563 |
+
],
|
564 |
+
] );
|
565 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
566 |
+
'name' => 'tags_typography',
|
567 |
+
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-terms, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-project-image .lae-image-info .lae-terms a',
|
568 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
569 |
$this->end_controls_section();
|
570 |
+
$this->start_controls_section( 'section_entry_title_styling', [
|
571 |
+
'label' => __( 'Post Entry Title', 'livemesh-el-addons' ),
|
572 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
573 |
+
'condition' => [
|
574 |
+
'carousel_skin' => 'classic_skin',
|
575 |
+
],
|
576 |
+
] );
|
577 |
+
$this->add_control( 'entry_title_tag', [
|
578 |
+
'label' => __( 'Entry Title HTML Tag', 'livemesh-el-addons' ),
|
579 |
+
'type' => Controls_Manager::SELECT,
|
580 |
+
'options' => [
|
581 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
582 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
583 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
584 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
585 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
586 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
587 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
588 |
+
],
|
589 |
+
'default' => 'h3',
|
590 |
+
] );
|
591 |
+
$this->add_control( 'entry_title_color', [
|
592 |
+
'label' => __( 'Entry Title Color', 'livemesh-el-addons' ),
|
593 |
+
'type' => Controls_Manager::COLOR,
|
594 |
+
'selectors' => [
|
595 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .entry-title a' => 'color: {{VALUE}};',
|
596 |
+
],
|
597 |
+
] );
|
598 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
599 |
+
'name' => 'entry_title_typography',
|
600 |
+
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .entry-title',
|
601 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
602 |
$this->end_controls_section();
|
603 |
+
$this->start_controls_section( 'section_entry_summary_styling', [
|
604 |
+
'label' => __( 'Post Entry Summary', 'livemesh-el-addons' ),
|
605 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
606 |
+
'condition' => [
|
607 |
+
'carousel_skin' => 'classic_skin',
|
608 |
+
],
|
609 |
+
] );
|
610 |
+
$this->add_control( 'entry_summary_color', [
|
611 |
+
'label' => __( 'Entry Summary Color', 'livemesh-el-addons' ),
|
612 |
+
'type' => Controls_Manager::COLOR,
|
613 |
+
'selectors' => [
|
614 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .entry-summary' => 'color: {{VALUE}};',
|
615 |
+
],
|
616 |
+
] );
|
617 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
618 |
+
'name' => 'entry_summary_typography',
|
619 |
+
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .entry-summary',
|
620 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
621 |
$this->end_controls_section();
|
622 |
+
$this->start_controls_section( 'section_entry_meta_styling', [
|
623 |
+
'label' => __( 'Post Entry Meta', 'livemesh-el-addons' ),
|
624 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
625 |
+
'condition' => [
|
626 |
+
'carousel_skin' => 'classic_skin',
|
627 |
+
],
|
628 |
+
] );
|
629 |
+
$this->add_control( 'heading_entry_meta', [
|
630 |
+
'label' => __( 'Entry Meta', 'livemesh-el-addons' ),
|
631 |
+
'type' => Controls_Manager::HEADING,
|
632 |
+
'separator' => 'after',
|
633 |
+
] );
|
634 |
+
$this->add_control( 'entry_meta_color', [
|
635 |
+
'label' => __( 'Entry Meta Color', 'livemesh-el-addons' ),
|
636 |
+
'type' => Controls_Manager::COLOR,
|
637 |
+
'selectors' => [
|
638 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-entry-meta span' => 'color: {{VALUE}};',
|
639 |
+
],
|
640 |
+
] );
|
641 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
642 |
+
'name' => 'entry_meta_typography',
|
643 |
+
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-entry-meta span',
|
644 |
+
] );
|
645 |
+
$this->add_control( 'heading_entry_meta_link', [
|
646 |
+
'label' => __( 'Entry Meta Link', 'livemesh-el-addons' ),
|
647 |
+
'type' => Controls_Manager::HEADING,
|
648 |
+
'separator' => 'after',
|
649 |
+
] );
|
650 |
+
$this->add_control( 'entry_meta_link_color', [
|
651 |
+
'label' => __( 'Entry Meta Link Color', 'livemesh-el-addons' ),
|
652 |
+
'type' => Controls_Manager::COLOR,
|
653 |
+
'selectors' => [
|
654 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-entry-meta span a' => 'color: {{VALUE}};',
|
655 |
+
],
|
656 |
+
] );
|
657 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
658 |
+
'name' => 'entry_meta_link_typography',
|
659 |
+
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-entry-meta span a',
|
660 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
661 |
$this->end_controls_section();
|
662 |
+
$this->start_controls_section( 'section_read_more_styling', [
|
663 |
+
'label' => __( 'Read More', 'livemesh-el-addons' ),
|
664 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
665 |
+
'condition' => [
|
666 |
+
'carousel_skin' => 'classic_skin',
|
667 |
+
],
|
668 |
+
] );
|
669 |
+
$this->add_control( 'read_more_color', [
|
670 |
+
'label' => __( 'Read More Color', 'livemesh-el-addons' ),
|
671 |
+
'type' => Controls_Manager::COLOR,
|
672 |
+
'selectors' => [
|
673 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more a' => 'color: {{VALUE}};',
|
674 |
+
],
|
675 |
+
] );
|
676 |
+
$this->add_control( 'read_more_hover_color', [
|
677 |
+
'label' => __( 'Read More Hover Color', 'livemesh-el-addons' ),
|
678 |
+
'type' => Controls_Manager::COLOR,
|
679 |
+
'selectors' => [
|
680 |
+
'{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more:hover, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more a:hover' => 'color: {{VALUE}};',
|
681 |
+
],
|
682 |
+
] );
|
683 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
684 |
+
'name' => 'read_more_typography',
|
685 |
+
'selector' => '{{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more, {{WRAPPER}} .lae-posts-carousel .lae-posts-carousel-item .lae-read-more a',
|
686 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
687 |
$this->end_controls_section();
|
|
|
|
|
688 |
}
|
689 |
+
|
690 |
+
protected function get_item_template_options()
|
691 |
+
{
|
692 |
$template_options = array();
|
|
|
693 |
/* Initialize the theme builder templates - Requires elementor pro plugin */
|
694 |
+
|
695 |
+
if ( !is_plugin_active( 'elementor-pro/elementor-pro.php' ) ) {
|
696 |
+
$template_options = [
|
697 |
+
0 => __( 'No templates found. Elementor Pro is not installed/active', 'livemesh-el-addons' ),
|
698 |
+
];
|
699 |
+
} else {
|
700 |
$templates = lae_get_livemesh_item_templates();
|
|
|
701 |
//$template_options = [0 => __('Select a template', 'livemesh-el-addons')];
|
702 |
+
foreach ( $templates as $template ) {
|
|
|
703 |
$template_options[$template->ID] = $template->post_title;
|
704 |
}
|
705 |
}
|
706 |
+
|
707 |
return $template_options;
|
708 |
}
|
709 |
+
|
710 |
+
protected function render()
|
711 |
+
{
|
712 |
$settings = $this->get_settings_for_display();
|
713 |
+
$settings = apply_filters( 'lae_posts_carousel_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
714 |
$args['settings'] = $settings;
|
|
|
715 |
$args['widget_instance'] = $this;
|
716 |
+
lae_get_template_part( 'addons/posts-carousel/loop', $args );
|
|
|
|
|
717 |
}
|
718 |
+
|
719 |
+
protected function content_template()
|
720 |
+
{
|
721 |
}
|
722 |
|
723 |
}
|
includes/widgets/posts-gridbox-slider.php
CHANGED
@@ -177,6 +177,11 @@ class LAE_Posts_GridBox_Slider_Widget extends LAE_Widget_Base
|
|
177 |
'query_type' => 'custom_query',
|
178 |
],
|
179 |
] );
|
|
|
|
|
|
|
|
|
|
|
180 |
$this->end_controls_section();
|
181 |
$this->start_controls_section( 'section_post_content', [
|
182 |
'label' => __( 'Post Content', 'livemesh-el-addons' ),
|
177 |
'query_type' => 'custom_query',
|
178 |
],
|
179 |
] );
|
180 |
+
$this->add_control( 'upgrade_notice', [
|
181 |
+
'type' => Controls_Manager::RAW_HTML,
|
182 |
+
'separator' => 'before',
|
183 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
184 |
+
] );
|
185 |
$this->end_controls_section();
|
186 |
$this->start_controls_section( 'section_post_content', [
|
187 |
'label' => __( 'Post Content', 'livemesh-el-addons' ),
|
includes/widgets/posts-multislider.php
CHANGED
@@ -182,6 +182,11 @@ class LAE_Posts_Multislider_Widget extends LAE_Widget_Base
|
|
182 |
'query_type' => 'custom_query',
|
183 |
],
|
184 |
] );
|
|
|
|
|
|
|
|
|
|
|
185 |
$this->end_controls_section();
|
186 |
$this->start_controls_section( 'section_post_content', [
|
187 |
'label' => __( 'Post Content', 'livemesh-el-addons' ),
|
182 |
'query_type' => 'custom_query',
|
183 |
],
|
184 |
] );
|
185 |
+
$this->add_control( 'upgrade_notice', [
|
186 |
+
'type' => Controls_Manager::RAW_HTML,
|
187 |
+
'separator' => 'before',
|
188 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
189 |
+
] );
|
190 |
$this->end_controls_section();
|
191 |
$this->start_controls_section( 'section_post_content', [
|
192 |
'label' => __( 'Post Content', 'livemesh-el-addons' ),
|
includes/widgets/posts-slider.php
CHANGED
@@ -176,6 +176,11 @@ class LAE_Posts_Slider_Widget extends LAE_Widget_Base
|
|
176 |
'query_type' => 'custom_query',
|
177 |
],
|
178 |
] );
|
|
|
|
|
|
|
|
|
|
|
179 |
$this->end_controls_section();
|
180 |
$this->start_controls_section( 'section_post_content', [
|
181 |
'label' => __( 'Post Content', 'livemesh-el-addons' ),
|
176 |
'query_type' => 'custom_query',
|
177 |
],
|
178 |
] );
|
179 |
+
$this->add_control( 'upgrade_notice', [
|
180 |
+
'type' => Controls_Manager::RAW_HTML,
|
181 |
+
'separator' => 'before',
|
182 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
183 |
+
] );
|
184 |
$this->end_controls_section();
|
185 |
$this->start_controls_section( 'section_post_content', [
|
186 |
'label' => __( 'Post Content', 'livemesh-el-addons' ),
|
includes/widgets/pricing-table.php
CHANGED
@@ -6,637 +6,449 @@ Description: Display pricing plans in a multi-column grid.
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
use
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
add_shortcode('lae_pricing_item', array($this, 'pricing_item_shortcode'));
|
31 |
}
|
32 |
-
|
33 |
-
public function pricing_item_shortcode($atts, $content = null, $tag)
|
34 |
-
|
35 |
$title = $value = '';
|
36 |
-
|
37 |
-
$args = shortcode_atts(array(
|
38 |
'title' => '',
|
39 |
-
'value' => ''
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
$output = lae_get_template_part('addons/pricing-table/pricing-item', $args, true);
|
44 |
-
|
45 |
return $output;
|
46 |
}
|
47 |
-
|
48 |
-
public function get_name()
|
|
|
49 |
return 'lae-pricing-table';
|
50 |
}
|
51 |
-
|
52 |
-
public function get_title()
|
53 |
-
|
|
|
54 |
}
|
55 |
-
|
56 |
-
public function get_icon()
|
|
|
57 |
return 'lae-icon-pricing-table';
|
58 |
}
|
59 |
-
|
60 |
-
public function get_categories()
|
61 |
-
|
|
|
62 |
}
|
63 |
-
|
64 |
-
public function get_custom_help_url()
|
|
|
65 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/pricing-table/';
|
66 |
}
|
67 |
-
|
68 |
-
public function get_script_depends()
|
69 |
-
|
70 |
-
|
71 |
-
'lae-frontend-scripts'
|
72 |
-
];
|
73 |
}
|
74 |
-
|
75 |
-
public function get_style_depends()
|
76 |
-
|
77 |
-
|
78 |
-
'lae-frontend-styles',
|
79 |
-
'lae-pricing-plans-styles'
|
80 |
-
];
|
81 |
}
|
82 |
-
|
83 |
-
protected function _register_controls()
|
84 |
-
|
85 |
-
$this->start_controls_section(
|
86 |
-
'
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
$this->add_control(
|
93 |
-
'pricing_heading',
|
94 |
-
[
|
95 |
-
'label' => __('Pricing Plans', 'livemesh-el-addons'),
|
96 |
-
'type' => Controls_Manager::HEADING,
|
97 |
-
]
|
98 |
-
);
|
99 |
-
|
100 |
$repeater = new Repeater();
|
101 |
-
|
102 |
-
|
103 |
-
'
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
);
|
165 |
-
|
166 |
-
|
167 |
-
'
|
168 |
-
[
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
'
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
'default' => 'no',
|
192 |
-
]
|
193 |
-
);
|
194 |
-
|
195 |
-
$repeater->add_control(
|
196 |
-
'pricing_content',
|
197 |
-
[
|
198 |
-
'type' => Controls_Manager::TEXTAREA,
|
199 |
-
'label' => __('Pricing Plan Details', 'livemesh-el-addons'),
|
200 |
-
'description' => __('Enter the content for the pricing plan that include information about individual features of the pricing plan. For prebuilt styling, enter shortcodes content like - [lae_pricing_item title="Storage Space" value="50 GB"] [lae_pricing_item title="Video Uploads" value="50"][lae_pricing_item title="Portfolio Items" value="20"]', 'livemesh-el-addons'),
|
201 |
-
'show_label' => true,
|
202 |
-
'rows' => 10,
|
203 |
-
'dynamic' => [
|
204 |
-
'active' => true,
|
205 |
-
],
|
206 |
-
]
|
207 |
-
);
|
208 |
-
|
209 |
-
$repeater->add_control(
|
210 |
-
"widget_animation",
|
211 |
-
[
|
212 |
-
"type" => Controls_Manager::SELECT,
|
213 |
-
"label" => __("Animation Type", "livemesh-el-addons"),
|
214 |
-
'options' => lae_get_animation_options(),
|
215 |
-
'default' => 'none',
|
216 |
-
]
|
217 |
-
);
|
218 |
-
|
219 |
-
$this->add_control(
|
220 |
-
'pricing_plans',
|
221 |
-
[
|
222 |
-
'type' => Controls_Manager::REPEATER,
|
223 |
-
'fields' => $repeater->get_controls(),
|
224 |
-
'title_field' => '{{{ pricing_title }}}',
|
225 |
-
]
|
226 |
-
);
|
227 |
-
|
228 |
$this->end_controls_section();
|
229 |
-
|
230 |
-
|
231 |
-
'
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
'
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
'
|
278 |
-
[
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
$this->add_control(
|
300 |
-
'
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
],
|
317 |
-
]
|
318 |
-
);
|
319 |
-
|
320 |
-
$this->add_control(
|
321 |
-
'row_gap',
|
322 |
-
[
|
323 |
-
'label' => __('Row Gap', 'livemesh-el-addons'),
|
324 |
-
'type' => Controls_Manager::SLIDER,
|
325 |
-
'size_units' => ['px'],
|
326 |
-
'default' => [
|
327 |
-
'size' => 30,
|
328 |
-
],
|
329 |
-
'range' => [
|
330 |
-
'px' => [
|
331 |
-
'min' => 0,
|
332 |
-
'max' => 100,
|
333 |
-
],
|
334 |
-
],
|
335 |
-
'selectors' => [
|
336 |
-
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
337 |
-
],
|
338 |
-
]
|
339 |
-
);
|
340 |
-
|
341 |
$this->end_controls_section();
|
342 |
-
|
343 |
-
|
344 |
-
'
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
'
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
)
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
[
|
372 |
-
'label' => __('Color', 'livemesh-el-addons'),
|
373 |
-
'type' => Controls_Manager::COLOR,
|
374 |
-
'selectors' => [
|
375 |
-
'{{WRAPPER}} .lae-pricing-table .lae-top-header .lae-plan-name' => 'color: {{VALUE}};',
|
376 |
-
],
|
377 |
-
]
|
378 |
-
);
|
379 |
-
|
380 |
-
$this->add_group_control(
|
381 |
-
Group_Control_Typography::get_type(),
|
382 |
-
[
|
383 |
-
'name' => 'plan_name_typography',
|
384 |
-
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-top-header .lae-plan-name',
|
385 |
-
]
|
386 |
-
);
|
387 |
-
|
388 |
-
|
389 |
$this->end_controls_section();
|
390 |
-
|
391 |
-
|
392 |
-
'
|
393 |
-
|
394 |
-
|
395 |
-
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
'{{WRAPPER}} .lae-pricing-table .lae-top-header .lae-tagline' => 'color: {{VALUE}};',
|
406 |
-
],
|
407 |
-
]
|
408 |
-
);
|
409 |
-
|
410 |
-
$this->add_group_control(
|
411 |
-
Group_Control_Typography::get_type(),
|
412 |
-
[
|
413 |
-
'name' => 'plan_tagline_typography',
|
414 |
-
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-top-header .lae-tagline',
|
415 |
-
]
|
416 |
-
);
|
417 |
-
|
418 |
$this->end_controls_section();
|
419 |
-
|
420 |
-
|
421 |
-
'
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
'
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
$this->add_control(
|
449 |
-
'plan_price_color',
|
450 |
-
[
|
451 |
-
'label' => __('Color', 'livemesh-el-addons'),
|
452 |
-
'type' => Controls_Manager::COLOR,
|
453 |
-
'selectors' => [
|
454 |
-
'{{WRAPPER}} .lae-pricing-table .lae-pricing-plan .lae-plan-price span' => 'color: {{VALUE}};',
|
455 |
-
],
|
456 |
-
]
|
457 |
-
);
|
458 |
-
|
459 |
-
$this->add_group_control(
|
460 |
-
Group_Control_Typography::get_type(),
|
461 |
-
[
|
462 |
-
'name' => 'plan_price_typography',
|
463 |
-
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-pricing-plan .lae-plan-price span',
|
464 |
-
]
|
465 |
-
);
|
466 |
-
|
467 |
$this->end_controls_section();
|
468 |
-
|
469 |
-
|
470 |
-
'
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
-
|
483 |
-
'{{WRAPPER}} .lae-pricing-table .lae-plan-details .lae-pricing-item .lae-title' => 'color: {{VALUE}};',
|
484 |
-
],
|
485 |
-
]
|
486 |
-
);
|
487 |
-
|
488 |
-
$this->add_group_control(
|
489 |
-
Group_Control_Typography::get_type(),
|
490 |
-
[
|
491 |
-
'name' => 'item_title_typography',
|
492 |
-
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-plan-details .lae-pricing-item .lae-title',
|
493 |
-
]
|
494 |
-
);
|
495 |
-
|
496 |
$this->end_controls_section();
|
497 |
-
|
498 |
-
|
499 |
-
'
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
'{{WRAPPER}} .lae-pricing-table .lae-plan-details .lae-pricing-item .lae-value' => 'color: {{VALUE}};',
|
513 |
-
],
|
514 |
-
]
|
515 |
-
);
|
516 |
-
|
517 |
-
$this->add_group_control(
|
518 |
-
Group_Control_Typography::get_type(),
|
519 |
-
[
|
520 |
-
'name' => 'item_value_typography',
|
521 |
-
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-plan-details .lae-pricing-item .lae-value',
|
522 |
-
]
|
523 |
-
);
|
524 |
-
|
525 |
$this->end_controls_section();
|
526 |
-
|
527 |
-
|
528 |
-
'
|
529 |
-
|
530 |
-
|
531 |
-
|
532 |
-
|
533 |
-
|
534 |
-
|
535 |
-
|
536 |
-
|
537 |
-
'
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
-
|
548 |
-
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
'
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
|
583 |
-
|
584 |
-
|
585 |
-
|
586 |
-
|
587 |
-
|
588 |
-
'button_custom_hover_color',
|
589 |
-
[
|
590 |
-
'label' => __('Button Hover Color', 'livemesh-el-addons'),
|
591 |
-
'type' => Controls_Manager::COLOR,
|
592 |
-
'default' => '',
|
593 |
-
'selectors' => [
|
594 |
-
'{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button:hover' => 'background-color: {{VALUE}};',
|
595 |
-
],
|
596 |
-
]
|
597 |
-
);
|
598 |
-
|
599 |
-
$this->add_control(
|
600 |
-
'purchase_button_color',
|
601 |
-
[
|
602 |
-
'label' => __('Label Color', 'livemesh-el-addons'),
|
603 |
-
'type' => Controls_Manager::COLOR,
|
604 |
-
'selectors' => [
|
605 |
-
'{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button' => 'color: {{VALUE}};',
|
606 |
-
],
|
607 |
-
]
|
608 |
-
);
|
609 |
-
|
610 |
-
$this->add_group_control(
|
611 |
-
Group_Control_Typography::get_type(),
|
612 |
-
[
|
613 |
-
'name' => 'purchase_button_typography',
|
614 |
-
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button',
|
615 |
-
]
|
616 |
-
);
|
617 |
-
|
618 |
$this->end_controls_section();
|
619 |
-
|
620 |
}
|
621 |
-
|
622 |
-
protected function render()
|
623 |
-
|
624 |
$settings = $this->get_settings_for_display();
|
625 |
-
|
626 |
-
|
627 |
-
|
628 |
-
if (empty($settings['pricing_plans']))
|
629 |
return;
|
630 |
-
|
631 |
$args['settings'] = $settings;
|
632 |
-
|
633 |
$args['widget_instance'] = $this;
|
634 |
-
|
635 |
-
lae_get_template_part('addons/pricing-table/loop', $args);
|
636 |
-
|
637 |
}
|
638 |
-
|
639 |
-
protected function content_template()
|
|
|
640 |
}
|
641 |
|
642 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Utils ;
|
15 |
+
use Elementor\Scheme_Color ;
|
16 |
+
use Elementor\Group_Control_Typography ;
|
17 |
+
use Elementor\Scheme_Typography ;
|
18 |
+
if ( !defined( 'ABSPATH' ) ) {
|
19 |
+
exit;
|
20 |
+
}
|
21 |
+
// Exit if accessed directly
|
22 |
+
class LAE_Pricing_Table_Widget extends LAE_Widget_Base
|
23 |
+
{
|
24 |
+
public function __construct( $data = array(), $args = null )
|
25 |
+
{
|
26 |
+
parent::__construct( $data, $args );
|
27 |
+
add_shortcode( 'lae_pricing_item', array( $this, 'pricing_item_shortcode' ) );
|
|
|
|
|
28 |
}
|
29 |
+
|
30 |
+
public function pricing_item_shortcode( $atts, $content = null, $tag )
|
31 |
+
{
|
32 |
$title = $value = '';
|
33 |
+
$args = shortcode_atts( array(
|
|
|
34 |
'title' => '',
|
35 |
+
'value' => '',
|
36 |
+
), $atts );
|
37 |
+
$output = lae_get_template_part( 'addons/pricing-table/pricing-item', $args, true );
|
|
|
|
|
|
|
38 |
return $output;
|
39 |
}
|
40 |
+
|
41 |
+
public function get_name()
|
42 |
+
{
|
43 |
return 'lae-pricing-table';
|
44 |
}
|
45 |
+
|
46 |
+
public function get_title()
|
47 |
+
{
|
48 |
+
return __( 'Pricing Table', 'livemesh-el-addons' );
|
49 |
}
|
50 |
+
|
51 |
+
public function get_icon()
|
52 |
+
{
|
53 |
return 'lae-icon-pricing-table';
|
54 |
}
|
55 |
+
|
56 |
+
public function get_categories()
|
57 |
+
{
|
58 |
+
return array( 'livemesh-addons' );
|
59 |
}
|
60 |
+
|
61 |
+
public function get_custom_help_url()
|
62 |
+
{
|
63 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/pricing-table/';
|
64 |
}
|
65 |
+
|
66 |
+
public function get_script_depends()
|
67 |
+
{
|
68 |
+
return [ 'lae-waypoints', 'lae-frontend-scripts' ];
|
|
|
|
|
69 |
}
|
70 |
+
|
71 |
+
public function get_style_depends()
|
72 |
+
{
|
73 |
+
return [ 'lae-animate-styles', 'lae-frontend-styles', 'lae-pricing-plans-styles' ];
|
|
|
|
|
|
|
74 |
}
|
75 |
+
|
76 |
+
protected function _register_controls()
|
77 |
+
{
|
78 |
+
$this->start_controls_section( 'section_pricing_table', [
|
79 |
+
'label' => __( 'Pricing Table', 'livemesh-el-addons' ),
|
80 |
+
] );
|
81 |
+
$this->add_control( 'pricing_heading', [
|
82 |
+
'label' => __( 'Pricing Plans', 'livemesh-el-addons' ),
|
83 |
+
'type' => Controls_Manager::HEADING,
|
84 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
85 |
$repeater = new Repeater();
|
86 |
+
$repeater->add_control( 'pricing_title', [
|
87 |
+
'type' => Controls_Manager::TEXT,
|
88 |
+
'label' => __( 'Pricing Plan Title', 'livemesh-el-addons' ),
|
89 |
+
'default' => __( 'My pricing plan title', 'livemesh-el-addons' ),
|
90 |
+
'label_block' => true,
|
91 |
+
'dynamic' => [
|
92 |
+
'active' => true,
|
93 |
+
],
|
94 |
+
] );
|
95 |
+
$repeater->add_control( 'tagline', [
|
96 |
+
'type' => Controls_Manager::TEXT,
|
97 |
+
'label' => __( 'Tagline Text', 'livemesh-el-addons' ),
|
98 |
+
'description' => __( 'Provide any subtitle or taglines like "Most Popular", "Best Value", "Best Selling", "Most Flexible" etc. that you would like to use for this pricing plan.', 'livemesh-el-addons' ),
|
99 |
+
'dynamic' => [
|
100 |
+
'active' => true,
|
101 |
+
],
|
102 |
+
] );
|
103 |
+
$repeater->add_control( 'pricing_image', [
|
104 |
+
'label' => __( 'Pricing Image', 'livemesh-el-addons' ),
|
105 |
+
'type' => Controls_Manager::MEDIA,
|
106 |
+
'default' => [
|
107 |
+
'url' => Utils::get_placeholder_image_src(),
|
108 |
+
],
|
109 |
+
'label_block' => true,
|
110 |
+
'dynamic' => [
|
111 |
+
'active' => true,
|
112 |
+
],
|
113 |
+
] );
|
114 |
+
$repeater->add_control( 'price_tag', [
|
115 |
+
'type' => Controls_Manager::TEXT,
|
116 |
+
'label' => __( 'Price Tag', 'livemesh-el-addons' ),
|
117 |
+
'description' => __( 'Enter the price tag for the pricing plan. HTML is accepted.', 'livemesh-el-addons' ),
|
118 |
+
'dynamic' => [
|
119 |
+
'active' => true,
|
120 |
+
],
|
121 |
+
] );
|
122 |
+
$repeater->add_control( 'button_text', [
|
123 |
+
'type' => Controls_Manager::TEXT,
|
124 |
+
'label' => __( 'Text for Pricing Link/Button', 'livemesh-el-addons' ),
|
125 |
+
'dynamic' => [
|
126 |
+
'active' => true,
|
127 |
+
],
|
128 |
+
] );
|
129 |
+
$repeater->add_control( 'button_url', [
|
130 |
+
'label' => __( 'URL for the Pricing link/button', 'livemesh-el-addons' ),
|
131 |
+
'type' => Controls_Manager::URL,
|
132 |
+
'label_block' => true,
|
133 |
+
'default' => [
|
134 |
+
'url' => '',
|
135 |
+
'is_external' => 'true',
|
136 |
+
],
|
137 |
+
'placeholder' => __( 'http://your-link.com', 'livemesh-el-addons' ),
|
138 |
+
'dynamic' => [
|
139 |
+
'active' => true,
|
140 |
+
],
|
141 |
+
] );
|
142 |
+
$repeater->add_control( 'highlight', [
|
143 |
+
'label' => __( 'Highlight Pricing Plan', 'livemesh-el-addons' ),
|
144 |
+
'type' => Controls_Manager::SWITCHER,
|
145 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
146 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
147 |
+
'return_value' => 'yes',
|
148 |
+
'default' => 'no',
|
149 |
+
] );
|
150 |
+
$repeater->add_control( 'pricing_content', [
|
151 |
+
'type' => Controls_Manager::TEXTAREA,
|
152 |
+
'label' => __( 'Pricing Plan Details', 'livemesh-el-addons' ),
|
153 |
+
'description' => __( 'Enter the content for the pricing plan that include information about individual features of the pricing plan. For prebuilt styling, enter shortcodes content like - [lae_pricing_item title="Storage Space" value="50 GB"] [lae_pricing_item title="Video Uploads" value="50"][lae_pricing_item title="Portfolio Items" value="20"]', 'livemesh-el-addons' ),
|
154 |
+
'show_label' => true,
|
155 |
+
'rows' => 10,
|
156 |
+
'dynamic' => [
|
157 |
+
'active' => true,
|
158 |
+
],
|
159 |
+
] );
|
160 |
+
$repeater->add_control( "widget_animation", [
|
161 |
+
"type" => Controls_Manager::SELECT,
|
162 |
+
"label" => __( "Animation Type", "livemesh-el-addons" ),
|
163 |
+
'options' => lae_get_animation_options(),
|
164 |
+
'default' => 'none',
|
165 |
+
] );
|
166 |
+
$this->add_control( 'pricing_plans', [
|
167 |
+
'type' => Controls_Manager::REPEATER,
|
168 |
+
'fields' => $repeater->get_controls(),
|
169 |
+
'title_field' => '{{{ pricing_title }}}',
|
170 |
+
] );
|
171 |
+
$this->add_control( 'upgrade_notice', [
|
172 |
+
'type' => Controls_Manager::RAW_HTML,
|
173 |
+
'separator' => 'before',
|
174 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
175 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
176 |
$this->end_controls_section();
|
177 |
+
$this->start_controls_section( 'section_grid_settings', [
|
178 |
+
'label' => __( 'Grid Settings', 'livemesh-el-addons' ),
|
179 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
180 |
+
] );
|
181 |
+
$this->add_control( 'column_layout', [
|
182 |
+
'label' => __( 'Column Layout', 'livemesh-el-addons' ),
|
183 |
+
'type' => Controls_Manager::SELECT,
|
184 |
+
'options' => array(
|
185 |
+
'auto' => __( 'Auto', 'livemesh-el-addons' ),
|
186 |
+
'custom' => __( 'Custom', 'livemesh-el-addons' ),
|
187 |
+
),
|
188 |
+
'default' => 'auto',
|
189 |
+
'description' => __( 'Set column layout to be <strong>Auto</strong> to let the widget auto calculate number of columns based on minimum column size specified. The option <strong>Custom</strong> lets you explicitly control number of columns based on screen width.', 'livemesh-el-addons' ),
|
190 |
+
] );
|
191 |
+
$this->add_control( 'min_column_size', [
|
192 |
+
'label' => __( 'Minimum Column Size', 'livemesh-el-addons' ),
|
193 |
+
'type' => Controls_Manager::SLIDER,
|
194 |
+
'size_units' => [ 'px' ],
|
195 |
+
'default' => [
|
196 |
+
'size' => 300,
|
197 |
+
],
|
198 |
+
'range' => [
|
199 |
+
'px' => [
|
200 |
+
'min' => 50,
|
201 |
+
'max' => 500,
|
202 |
+
],
|
203 |
+
],
|
204 |
+
'selectors' => [
|
205 |
+
'{{WRAPPER}} .lae-uber-grid-container.lae-grid-auto-column-layout' => 'grid-template-columns: repeat(auto-fit, minmax({{SIZE}}{{UNIT}}, 1fr));',
|
206 |
+
],
|
207 |
+
'condition' => [
|
208 |
+
'column_layout' => 'auto',
|
209 |
+
],
|
210 |
+
] );
|
211 |
+
$this->add_responsive_control( 'per_line', [
|
212 |
+
'label' => __( 'Pricing plans in a row', 'livemesh-el-addons' ),
|
213 |
+
'type' => Controls_Manager::SELECT,
|
214 |
+
'default' => '3',
|
215 |
+
'tablet_default' => '2',
|
216 |
+
'mobile_default' => '1',
|
217 |
+
'options' => [
|
218 |
+
'1' => '1',
|
219 |
+
'2' => '2',
|
220 |
+
'3' => '3',
|
221 |
+
'4' => '4',
|
222 |
+
'5' => '5',
|
223 |
+
'6' => '6',
|
224 |
+
],
|
225 |
+
'frontend_available' => true,
|
226 |
+
'condition' => [
|
227 |
+
'column_layout' => 'custom',
|
228 |
+
],
|
229 |
+
] );
|
230 |
+
$this->add_control( 'column_gap', [
|
231 |
+
'label' => __( 'Column Gap', 'livemesh-el-addons' ),
|
232 |
+
'type' => Controls_Manager::SLIDER,
|
233 |
+
'size_units' => [ 'px' ],
|
234 |
+
'default' => [
|
235 |
+
'size' => 30,
|
236 |
+
],
|
237 |
+
'range' => [
|
238 |
+
'px' => [
|
239 |
+
'min' => 0,
|
240 |
+
'max' => 100,
|
241 |
+
],
|
242 |
+
],
|
243 |
+
'selectors' => [
|
244 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'column-gap: {{SIZE}}{{UNIT}};',
|
245 |
+
],
|
246 |
+
] );
|
247 |
+
$this->add_control( 'row_gap', [
|
248 |
+
'label' => __( 'Row Gap', 'livemesh-el-addons' ),
|
249 |
+
'type' => Controls_Manager::SLIDER,
|
250 |
+
'size_units' => [ 'px' ],
|
251 |
+
'default' => [
|
252 |
+
'size' => 30,
|
253 |
+
],
|
254 |
+
'range' => [
|
255 |
+
'px' => [
|
256 |
+
'min' => 0,
|
257 |
+
'max' => 100,
|
258 |
+
],
|
259 |
+
],
|
260 |
+
'selectors' => [
|
261 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
262 |
+
],
|
263 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
264 |
$this->end_controls_section();
|
265 |
+
$this->start_controls_section( 'section_pricing_style', [
|
266 |
+
'label' => __( 'Plan Name', 'livemesh-el-addons' ),
|
267 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
268 |
+
] );
|
269 |
+
$this->add_control( 'plan_name_tag', [
|
270 |
+
'label' => __( 'HTML Tag', 'livemesh-el-addons' ),
|
271 |
+
'type' => Controls_Manager::SELECT,
|
272 |
+
'options' => [
|
273 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
274 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
275 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
276 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
277 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
278 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
279 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
280 |
+
],
|
281 |
+
'default' => 'h3',
|
282 |
+
] );
|
283 |
+
$this->add_control( 'plan_name_color', [
|
284 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
285 |
+
'type' => Controls_Manager::COLOR,
|
286 |
+
'selectors' => [
|
287 |
+
'{{WRAPPER}} .lae-pricing-table .lae-top-header .lae-plan-name' => 'color: {{VALUE}};',
|
288 |
+
],
|
289 |
+
] );
|
290 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
291 |
+
'name' => 'plan_name_typography',
|
292 |
+
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-top-header .lae-plan-name',
|
293 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
294 |
$this->end_controls_section();
|
295 |
+
$this->start_controls_section( 'section_plan_tagline', [
|
296 |
+
'label' => __( 'Plan Tagline', 'livemesh-el-addons' ),
|
297 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
298 |
+
] );
|
299 |
+
$this->add_control( 'plan_tagline_color', [
|
300 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
301 |
+
'type' => Controls_Manager::COLOR,
|
302 |
+
'selectors' => [
|
303 |
+
'{{WRAPPER}} .lae-pricing-table .lae-top-header .lae-tagline' => 'color: {{VALUE}};',
|
304 |
+
],
|
305 |
+
] );
|
306 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
307 |
+
'name' => 'plan_tagline_typography',
|
308 |
+
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-top-header .lae-tagline',
|
309 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
310 |
$this->end_controls_section();
|
311 |
+
$this->start_controls_section( 'section_plan_price', [
|
312 |
+
'label' => __( 'Plan Price', 'livemesh-el-addons' ),
|
313 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
314 |
+
] );
|
315 |
+
$this->add_control( 'plan_price_tag', [
|
316 |
+
'label' => __( 'HTML Tag', 'livemesh-el-addons' ),
|
317 |
+
'type' => Controls_Manager::SELECT,
|
318 |
+
'options' => [
|
319 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
320 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
321 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
322 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
323 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
324 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
325 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
326 |
+
],
|
327 |
+
'default' => 'h4',
|
328 |
+
] );
|
329 |
+
$this->add_control( 'plan_price_color', [
|
330 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
331 |
+
'type' => Controls_Manager::COLOR,
|
332 |
+
'selectors' => [
|
333 |
+
'{{WRAPPER}} .lae-pricing-table .lae-pricing-plan .lae-plan-price span' => 'color: {{VALUE}};',
|
334 |
+
],
|
335 |
+
] );
|
336 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
337 |
+
'name' => 'plan_price_typography',
|
338 |
+
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-pricing-plan .lae-plan-price span',
|
339 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
340 |
$this->end_controls_section();
|
341 |
+
$this->start_controls_section( 'section_item_title', [
|
342 |
+
'label' => __( 'Pricing Item Title', 'livemesh-el-addons' ),
|
343 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
344 |
+
] );
|
345 |
+
$this->add_control( 'item_title_color', [
|
346 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
347 |
+
'type' => Controls_Manager::COLOR,
|
348 |
+
'selectors' => [
|
349 |
+
'{{WRAPPER}} .lae-pricing-table .lae-plan-details .lae-pricing-item .lae-title' => 'color: {{VALUE}};',
|
350 |
+
],
|
351 |
+
] );
|
352 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
353 |
+
'name' => 'item_title_typography',
|
354 |
+
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-plan-details .lae-pricing-item .lae-title',
|
355 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
356 |
$this->end_controls_section();
|
357 |
+
$this->start_controls_section( 'section_item_value', [
|
358 |
+
'label' => __( 'Pricing Item Value', 'livemesh-el-addons' ),
|
359 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
360 |
+
] );
|
361 |
+
$this->add_control( 'item_value_color', [
|
362 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
363 |
+
'type' => Controls_Manager::COLOR,
|
364 |
+
'selectors' => [
|
365 |
+
'{{WRAPPER}} .lae-pricing-table .lae-plan-details .lae-pricing-item .lae-value' => 'color: {{VALUE}};',
|
366 |
+
],
|
367 |
+
] );
|
368 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
369 |
+
'name' => 'item_value_typography',
|
370 |
+
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-plan-details .lae-pricing-item .lae-value',
|
371 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
372 |
$this->end_controls_section();
|
373 |
+
$this->start_controls_section( 'section_purchase_button', [
|
374 |
+
'label' => __( 'Purchase Button', 'livemesh-el-addons' ),
|
375 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
376 |
+
] );
|
377 |
+
$this->add_control( 'purchase_button_spacing', [
|
378 |
+
'label' => __( 'Button Spacing', 'livemesh-el-addons' ),
|
379 |
+
'type' => Controls_Manager::DIMENSIONS,
|
380 |
+
'size_units' => [ 'px', '%', 'em' ],
|
381 |
+
'default' => [
|
382 |
+
'top' => 15,
|
383 |
+
'right' => 15,
|
384 |
+
'bottom' => 15,
|
385 |
+
'left' => 15,
|
386 |
+
'unit' => 'px',
|
387 |
+
],
|
388 |
+
'selectors' => [
|
389 |
+
'{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
390 |
+
],
|
391 |
+
] );
|
392 |
+
$this->add_control( 'purchase_button_size', [
|
393 |
+
'label' => __( 'Button Size', 'livemesh-el-addons' ),
|
394 |
+
'type' => Controls_Manager::DIMENSIONS,
|
395 |
+
'size_units' => [ 'px', '%', 'em' ],
|
396 |
+
'default' => [
|
397 |
+
'top' => 12,
|
398 |
+
'right' => 25,
|
399 |
+
'bottom' => 12,
|
400 |
+
'left' => 25,
|
401 |
+
'unit' => 'px',
|
402 |
+
],
|
403 |
+
'selectors' => [
|
404 |
+
'{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
405 |
+
],
|
406 |
+
'isLinked' => false,
|
407 |
+
] );
|
408 |
+
$this->add_control( 'button_custom_color', [
|
409 |
+
'label' => __( 'Button Color', 'livemesh-el-addons' ),
|
410 |
+
'type' => Controls_Manager::COLOR,
|
411 |
+
'default' => '',
|
412 |
+
'selectors' => [
|
413 |
+
'{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button' => 'background-color: {{VALUE}};',
|
414 |
+
],
|
415 |
+
] );
|
416 |
+
$this->add_control( 'button_custom_hover_color', [
|
417 |
+
'label' => __( 'Button Hover Color', 'livemesh-el-addons' ),
|
418 |
+
'type' => Controls_Manager::COLOR,
|
419 |
+
'default' => '',
|
420 |
+
'selectors' => [
|
421 |
+
'{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button:hover' => 'background-color: {{VALUE}};',
|
422 |
+
],
|
423 |
+
] );
|
424 |
+
$this->add_control( 'purchase_button_color', [
|
425 |
+
'label' => __( 'Label Color', 'livemesh-el-addons' ),
|
426 |
+
'type' => Controls_Manager::COLOR,
|
427 |
+
'selectors' => [
|
428 |
+
'{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button' => 'color: {{VALUE}};',
|
429 |
+
],
|
430 |
+
] );
|
431 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
432 |
+
'name' => 'purchase_button_typography',
|
433 |
+
'selector' => '{{WRAPPER}} .lae-pricing-table .lae-purchase .lae-button',
|
434 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
435 |
$this->end_controls_section();
|
|
|
436 |
}
|
437 |
+
|
438 |
+
protected function render()
|
439 |
+
{
|
440 |
$settings = $this->get_settings_for_display();
|
441 |
+
$settings = apply_filters( 'lae_pricing_table_' . $this->get_id() . '_settings', $settings );
|
442 |
+
if ( empty($settings['pricing_plans']) ) {
|
|
|
|
|
443 |
return;
|
444 |
+
}
|
445 |
$args['settings'] = $settings;
|
|
|
446 |
$args['widget_instance'] = $this;
|
447 |
+
lae_get_template_part( 'addons/pricing-table/loop', $args );
|
|
|
|
|
448 |
}
|
449 |
+
|
450 |
+
protected function content_template()
|
451 |
+
{
|
452 |
}
|
453 |
|
454 |
}
|
includes/widgets/services.php
CHANGED
@@ -169,6 +169,11 @@ class LAE_Services_Widget extends LAE_Widget_Base
|
|
169 |
'fields' => $repeater->get_controls(),
|
170 |
'title_field' => '{{{ service_title }}}',
|
171 |
] );
|
|
|
|
|
|
|
|
|
|
|
172 |
$this->end_controls_section();
|
173 |
$this->start_controls_section( 'section_general_settings', [
|
174 |
'label' => __( 'General Settings', 'livemesh-el-addons' ),
|
169 |
'fields' => $repeater->get_controls(),
|
170 |
'title_field' => '{{{ service_title }}}',
|
171 |
] );
|
172 |
+
$this->add_control( 'upgrade_notice', [
|
173 |
+
'type' => Controls_Manager::RAW_HTML,
|
174 |
+
'separator' => 'before',
|
175 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
176 |
+
] );
|
177 |
$this->end_controls_section();
|
178 |
$this->start_controls_section( 'section_general_settings', [
|
179 |
'label' => __( 'General Settings', 'livemesh-el-addons' ),
|
includes/widgets/stats-bars.php
CHANGED
@@ -6,291 +6,205 @@ Description: Display multiple stats bars that talk about skills or other percent
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
-
|
11 |
namespace LivemeshAddons\Widgets;
|
12 |
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
use
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
return 'lae-stats-bars';
|
28 |
}
|
29 |
-
|
30 |
-
public function get_title()
|
31 |
-
|
|
|
32 |
}
|
33 |
-
|
34 |
-
public function get_icon()
|
|
|
35 |
return 'lae-icon-stats-bars';
|
36 |
}
|
37 |
-
|
38 |
-
public function get_categories()
|
39 |
-
|
|
|
40 |
}
|
41 |
-
|
42 |
-
public function get_custom_help_url()
|
|
|
43 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/statistics-addons/';
|
44 |
}
|
45 |
-
|
46 |
-
public function get_script_depends()
|
47 |
-
|
48 |
-
|
49 |
-
'lae-frontend-scripts',
|
50 |
-
'lae-stats-bars-scripts'
|
51 |
-
];
|
52 |
}
|
53 |
-
|
54 |
-
public function get_style_depends()
|
55 |
-
|
56 |
-
|
57 |
-
'lae-frontend-styles',
|
58 |
-
'lae-stats-bars-styles'
|
59 |
-
];
|
60 |
}
|
61 |
-
|
62 |
-
protected function _register_controls()
|
63 |
-
|
64 |
-
$this->start_controls_section(
|
65 |
-
'
|
66 |
-
|
67 |
-
'label' => __('Stats Bars', 'livemesh-el-addons'),
|
68 |
-
]
|
69 |
-
);
|
70 |
-
|
71 |
$repeater = new Repeater();
|
72 |
-
|
73 |
-
|
74 |
-
'
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
'
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
'
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
);
|
110 |
-
|
111 |
-
|
112 |
-
'
|
113 |
-
|
114 |
-
|
115 |
-
'default' => [
|
116 |
-
[
|
117 |
-
'stats_title' => __('Web Design', 'livemesh-el-addons'),
|
118 |
-
'percentage_value' => 87,
|
119 |
-
],
|
120 |
-
|
121 |
-
[
|
122 |
-
'stats_title' => __('SEO Services', 'livemesh-el-addons'),
|
123 |
-
'percentage_value' => 76,
|
124 |
-
],
|
125 |
-
|
126 |
-
[
|
127 |
-
'stats_title' => __('Brand Marketing', 'livemesh-el-addons'),
|
128 |
-
'percentage_value' => 40,
|
129 |
-
],
|
130 |
-
],
|
131 |
-
'fields' => $repeater->get_controls(),
|
132 |
-
'title_field' => '{{{ stats_title }}}',
|
133 |
-
]
|
134 |
-
);
|
135 |
-
|
136 |
$this->end_controls_section();
|
137 |
-
|
138 |
-
|
139 |
-
'
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
'min' => 1,
|
192 |
-
'max' => 96,
|
193 |
-
],
|
194 |
-
],
|
195 |
-
'selectors' => [
|
196 |
-
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-bg, {{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-content' => 'height: {{SIZE}}{{UNIT}};',
|
197 |
-
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-bg' => 'margin-top: -{{SIZE}}{{UNIT}};',
|
198 |
-
],
|
199 |
-
]
|
200 |
-
);
|
201 |
-
|
202 |
-
|
203 |
-
$this->add_control(
|
204 |
-
'stats_bar_border_radius',
|
205 |
-
[
|
206 |
-
'label' => __('Stats Bar Border Radius', 'livemesh-el-addons'),
|
207 |
-
'type' => Controls_Manager::DIMENSIONS,
|
208 |
-
'size_units' => ['px', '%'],
|
209 |
-
'selectors' => [
|
210 |
-
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-bg, {{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
211 |
-
],
|
212 |
-
]
|
213 |
-
);
|
214 |
-
|
215 |
-
|
216 |
$this->end_controls_section();
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
'selectors' => [
|
233 |
-
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-title' => 'color: {{VALUE}};',
|
234 |
-
],
|
235 |
-
]
|
236 |
-
);
|
237 |
-
|
238 |
-
$this->add_group_control(
|
239 |
-
Group_Control_Typography::get_type(),
|
240 |
-
[
|
241 |
-
'name' => 'stats_title_typography',
|
242 |
-
'selector' => '{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-title',
|
243 |
-
]
|
244 |
-
);
|
245 |
-
|
246 |
$this->end_controls_section();
|
247 |
-
|
248 |
-
|
249 |
-
'
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-title span' => 'color: {{VALUE}};',
|
263 |
-
],
|
264 |
-
]
|
265 |
-
);
|
266 |
-
|
267 |
-
$this->add_group_control(
|
268 |
-
Group_Control_Typography::get_type(),
|
269 |
-
[
|
270 |
-
'name' => 'stats_percentage_typography',
|
271 |
-
'selector' => '{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-title span',
|
272 |
-
]
|
273 |
-
);
|
274 |
-
|
275 |
$this->end_controls_section();
|
276 |
}
|
277 |
-
|
278 |
-
protected function render()
|
279 |
-
|
280 |
$settings = $this->get_settings_for_display();
|
281 |
-
|
282 |
-
$settings = apply_filters('lae_stats_bars_' . $this->get_id() . '_settings', $settings);
|
283 |
-
|
284 |
$args['settings'] = $settings;
|
285 |
-
|
286 |
$args['widget_instance'] = $this;
|
287 |
-
|
288 |
-
lae_get_template_part('addons/stats-bars/loop', $args);
|
289 |
-
|
290 |
}
|
291 |
-
|
292 |
-
protected function content_template()
|
293 |
-
|
294 |
}
|
295 |
|
296 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Scheme_Color ;
|
15 |
+
use Elementor\Group_Control_Typography ;
|
16 |
+
use Elementor\Scheme_Typography ;
|
17 |
+
if ( !defined( 'ABSPATH' ) ) {
|
18 |
+
exit;
|
19 |
+
}
|
20 |
+
// Exit if accessed directly
|
21 |
+
class LAE_Stats_Bars_Widget extends LAE_Widget_Base
|
22 |
+
{
|
23 |
+
public function get_name()
|
24 |
+
{
|
25 |
return 'lae-stats-bars';
|
26 |
}
|
27 |
+
|
28 |
+
public function get_title()
|
29 |
+
{
|
30 |
+
return __( 'Stats Bars', 'livemesh-el-addons' );
|
31 |
}
|
32 |
+
|
33 |
+
public function get_icon()
|
34 |
+
{
|
35 |
return 'lae-icon-stats-bars';
|
36 |
}
|
37 |
+
|
38 |
+
public function get_categories()
|
39 |
+
{
|
40 |
+
return array( 'livemesh-addons' );
|
41 |
}
|
42 |
+
|
43 |
+
public function get_custom_help_url()
|
44 |
+
{
|
45 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/statistics-addons/';
|
46 |
}
|
47 |
+
|
48 |
+
public function get_script_depends()
|
49 |
+
{
|
50 |
+
return [ 'lae-waypoints', 'lae-frontend-scripts', 'lae-stats-bars-scripts' ];
|
|
|
|
|
|
|
51 |
}
|
52 |
+
|
53 |
+
public function get_style_depends()
|
54 |
+
{
|
55 |
+
return [ 'lae-animate-styles', 'lae-frontend-styles', 'lae-stats-bars-styles' ];
|
|
|
|
|
|
|
56 |
}
|
57 |
+
|
58 |
+
protected function _register_controls()
|
59 |
+
{
|
60 |
+
$this->start_controls_section( 'section_stats_bars', [
|
61 |
+
'label' => __( 'Stats Bars', 'livemesh-el-addons' ),
|
62 |
+
] );
|
|
|
|
|
|
|
|
|
63 |
$repeater = new Repeater();
|
64 |
+
$repeater->add_control( 'stats_title', [
|
65 |
+
'label' => __( 'Stats Title', 'livemesh-el-addons' ),
|
66 |
+
'type' => Controls_Manager::TEXT,
|
67 |
+
'description' => __( 'The title for the stats bar', 'livemesh-el-addons' ),
|
68 |
+
'default' => __( 'My stats title', 'livemesh-el-addons' ),
|
69 |
+
'dynamic' => [
|
70 |
+
'active' => true,
|
71 |
+
],
|
72 |
+
] );
|
73 |
+
$repeater->add_control( 'percentage_value', [
|
74 |
+
'label' => __( 'Percentage Value', 'livemesh-el-addons' ),
|
75 |
+
'type' => Controls_Manager::NUMBER,
|
76 |
+
'min' => 1,
|
77 |
+
'max' => 100,
|
78 |
+
'step' => 1,
|
79 |
+
'default' => 30,
|
80 |
+
'description' => __( 'The percentage value for the stats.', 'livemesh-el-addons' ),
|
81 |
+
] );
|
82 |
+
$repeater->add_control( 'bar_color', [
|
83 |
+
'label' => __( 'Bar Color', 'livemesh-el-addons' ),
|
84 |
+
'type' => Controls_Manager::COLOR,
|
85 |
+
'default' => '#f94213',
|
86 |
+
] );
|
87 |
+
$this->add_control( 'stats_bars', [
|
88 |
+
'type' => Controls_Manager::REPEATER,
|
89 |
+
'default' => [ [
|
90 |
+
'stats_title' => __( 'Web Design', 'livemesh-el-addons' ),
|
91 |
+
'percentage_value' => 87,
|
92 |
+
], [
|
93 |
+
'stats_title' => __( 'SEO Services', 'livemesh-el-addons' ),
|
94 |
+
'percentage_value' => 76,
|
95 |
+
], [
|
96 |
+
'stats_title' => __( 'Brand Marketing', 'livemesh-el-addons' ),
|
97 |
+
'percentage_value' => 40,
|
98 |
+
] ],
|
99 |
+
'fields' => $repeater->get_controls(),
|
100 |
+
'title_field' => '{{{ stats_title }}}',
|
101 |
+
] );
|
102 |
+
$this->add_control( 'upgrade_notice', [
|
103 |
+
'type' => Controls_Manager::RAW_HTML,
|
104 |
+
'separator' => 'before',
|
105 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
106 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
107 |
$this->end_controls_section();
|
108 |
+
$this->start_controls_section( 'section_stats_bar_styling', [
|
109 |
+
'label' => __( 'Stats Bar', 'livemesh-el-addons' ),
|
110 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
111 |
+
] );
|
112 |
+
$this->add_control( 'stats_bar_bg_color', [
|
113 |
+
'label' => __( 'Stats Bar Background Color', 'livemesh-el-addons' ),
|
114 |
+
'type' => Controls_Manager::COLOR,
|
115 |
+
'selectors' => [
|
116 |
+
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-bg' => 'background-color: {{VALUE}};',
|
117 |
+
],
|
118 |
+
] );
|
119 |
+
$this->add_control( 'stats_bar_spacing', [
|
120 |
+
'label' => __( 'Stats Bar Spacing', 'livemesh-el-addons' ),
|
121 |
+
'type' => Controls_Manager::SLIDER,
|
122 |
+
'size_units' => [ 'px' ],
|
123 |
+
'default' => [
|
124 |
+
'size' => 18,
|
125 |
+
],
|
126 |
+
'range' => [
|
127 |
+
'px' => [
|
128 |
+
'min' => 5,
|
129 |
+
'max' => 128,
|
130 |
+
],
|
131 |
+
],
|
132 |
+
'selectors' => [
|
133 |
+
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar' => 'margin-bottom: {{SIZE}}{{UNIT}};',
|
134 |
+
],
|
135 |
+
] );
|
136 |
+
$this->add_control( 'stats_bar_height', [
|
137 |
+
'label' => __( 'Stats Bar Height', 'livemesh-el-addons' ),
|
138 |
+
'type' => Controls_Manager::SLIDER,
|
139 |
+
'size_units' => [ 'px' ],
|
140 |
+
'default' => [
|
141 |
+
'size' => 10,
|
142 |
+
],
|
143 |
+
'range' => [
|
144 |
+
'px' => [
|
145 |
+
'min' => 1,
|
146 |
+
'max' => 96,
|
147 |
+
],
|
148 |
+
],
|
149 |
+
'selectors' => [
|
150 |
+
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-bg, {{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-content' => 'height: {{SIZE}}{{UNIT}};',
|
151 |
+
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-bg' => 'margin-top: -{{SIZE}}{{UNIT}};',
|
152 |
+
],
|
153 |
+
] );
|
154 |
+
$this->add_control( 'stats_bar_border_radius', [
|
155 |
+
'label' => __( 'Stats Bar Border Radius', 'livemesh-el-addons' ),
|
156 |
+
'type' => Controls_Manager::DIMENSIONS,
|
157 |
+
'size_units' => [ 'px', '%' ],
|
158 |
+
'selectors' => [
|
159 |
+
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-bg, {{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-bar-content' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
160 |
+
],
|
161 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
162 |
$this->end_controls_section();
|
163 |
+
$this->start_controls_section( 'section_stats_title', [
|
164 |
+
'label' => __( 'Stats Title', 'livemesh-el-addons' ),
|
165 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
166 |
+
] );
|
167 |
+
$this->add_control( 'stats_title_color', [
|
168 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
169 |
+
'type' => Controls_Manager::COLOR,
|
170 |
+
'selectors' => [
|
171 |
+
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-title' => 'color: {{VALUE}};',
|
172 |
+
],
|
173 |
+
] );
|
174 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
175 |
+
'name' => 'stats_title_typography',
|
176 |
+
'selector' => '{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-title',
|
177 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
178 |
$this->end_controls_section();
|
179 |
+
$this->start_controls_section( 'section_stats_percentage', [
|
180 |
+
'label' => __( 'Stats Percentage', 'livemesh-el-addons' ),
|
181 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
182 |
+
] );
|
183 |
+
$this->add_control( 'stats_percentage_color', [
|
184 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
185 |
+
'type' => Controls_Manager::COLOR,
|
186 |
+
'selectors' => [
|
187 |
+
'{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-title span' => 'color: {{VALUE}};',
|
188 |
+
],
|
189 |
+
] );
|
190 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
191 |
+
'name' => 'stats_percentage_typography',
|
192 |
+
'selector' => '{{WRAPPER}} .lae-stats-bars .lae-stats-bar .lae-stats-title span',
|
193 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
194 |
$this->end_controls_section();
|
195 |
}
|
196 |
+
|
197 |
+
protected function render()
|
198 |
+
{
|
199 |
$settings = $this->get_settings_for_display();
|
200 |
+
$settings = apply_filters( 'lae_stats_bars_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
201 |
$args['settings'] = $settings;
|
|
|
202 |
$args['widget_instance'] = $this;
|
203 |
+
lae_get_template_part( 'addons/stats-bars/loop', $args );
|
|
|
|
|
204 |
}
|
205 |
+
|
206 |
+
protected function content_template()
|
207 |
+
{
|
208 |
}
|
209 |
|
210 |
}
|
includes/widgets/tab-slider.php
CHANGED
@@ -6,52 +6,53 @@ Description: Display tabbed content as a touch enabled responsive slider.
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
use
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
return 'lae-tab-slider';
|
28 |
}
|
29 |
-
|
30 |
-
public function get_title()
|
31 |
-
|
|
|
32 |
}
|
33 |
-
|
34 |
-
public function get_icon()
|
|
|
35 |
return 'lae-icon-tab-slider1';
|
36 |
}
|
37 |
-
|
38 |
-
public function get_categories()
|
39 |
-
|
|
|
40 |
}
|
41 |
-
|
42 |
-
public function get_custom_help_url()
|
|
|
43 |
return 'https://livemeshelementor.com/docs/livemesh-addons/';
|
44 |
}
|
45 |
-
|
46 |
-
public function get_script_depends()
|
47 |
-
|
48 |
-
|
49 |
-
'lae-frontend-scripts',
|
50 |
-
'lae-tab-slider-scripts'
|
51 |
-
];
|
52 |
}
|
53 |
-
|
54 |
-
public function get_style_depends()
|
|
|
55 |
return [
|
56 |
'lae-icomoon-styles',
|
57 |
'lae-slick-carousel-styles',
|
@@ -60,444 +61,300 @@ class LAE_Tab_Slider_Widget extends LAE_Widget_Base {
|
|
60 |
'lae-tabs-slider-styles'
|
61 |
];
|
62 |
}
|
63 |
-
|
64 |
-
protected function _register_controls()
|
65 |
-
|
66 |
-
$this->start_controls_section(
|
67 |
-
'
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
'
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
'default' => 'style1',
|
80 |
-
'options' => [
|
81 |
-
'style1' => __('Tab Style 1', 'livemesh-el-addons'),
|
82 |
-
'style2' => __('Tab Style 2', 'livemesh-el-addons'),
|
83 |
-
'style3' => __('Tab Style 3', 'livemesh-el-addons'),
|
84 |
-
],
|
85 |
-
]
|
86 |
-
);
|
87 |
-
|
88 |
$repeater = new Repeater();
|
89 |
-
|
90 |
-
|
91 |
-
'
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
'
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
],
|
164 |
-
]
|
165 |
-
);
|
166 |
-
|
167 |
-
$this->add_control(
|
168 |
-
'tabs',
|
169 |
-
[
|
170 |
-
'label' => __('Tab Panes', 'livemesh-el-addons'),
|
171 |
-
'type' => Controls_Manager::REPEATER,
|
172 |
-
'separator' => 'before',
|
173 |
-
'default' => [
|
174 |
-
[
|
175 |
-
'tab_title' => __('Tab #1', 'livemesh-el-addons'),
|
176 |
-
'tab_content' => __('I am tabbed content 1. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
177 |
-
],
|
178 |
-
[
|
179 |
-
'tab_title' => __('Tab #2', 'livemesh-el-addons'),
|
180 |
-
'tab_content' => __('I am tabbed content 2. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
181 |
-
],
|
182 |
-
[
|
183 |
-
'tab_title' => __('Tab #3', 'livemesh-el-addons'),
|
184 |
-
'tab_content' => __('I am tabbed content 3. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
185 |
-
],
|
186 |
-
],
|
187 |
-
'fields' => $repeater->get_controls(),
|
188 |
-
'title_field' => '{{{ tab_title }}}',
|
189 |
-
]
|
190 |
-
);
|
191 |
-
|
192 |
$this->end_controls_section();
|
193 |
-
|
194 |
-
|
195 |
-
'
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
'
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
'
|
232 |
-
[
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
'
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
)
|
256 |
-
|
257 |
-
|
258 |
-
'animation_speed',
|
259 |
-
[
|
260 |
-
'label' => __('Autoplay animation speed in ms', 'livemesh-el-addons'),
|
261 |
-
'type' => Controls_Manager::NUMBER,
|
262 |
-
'default' => 300,
|
263 |
-
]
|
264 |
-
);
|
265 |
-
|
266 |
-
$this->add_control(
|
267 |
-
'infinite_looping',
|
268 |
-
[
|
269 |
-
'type' => Controls_Manager::SWITCHER,
|
270 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
271 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
272 |
-
'return_value' => 'yes',
|
273 |
-
'default' => 'yes',
|
274 |
-
'label' => __('Infinite Looping?', 'livemesh-el-addons'),
|
275 |
-
]
|
276 |
-
);
|
277 |
-
|
278 |
-
$this->add_control(
|
279 |
-
'adaptive_height',
|
280 |
-
[
|
281 |
-
'type' => Controls_Manager::SWITCHER,
|
282 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
283 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
284 |
-
'return_value' => 'yes',
|
285 |
-
'default' => 'no',
|
286 |
-
'label' => __('Adaptive Height?', 'livemesh-el-addons'),
|
287 |
-
'description' => __('Enables adaptive height when tabs are of different heights.', 'livemesh-el-addons'),
|
288 |
-
]
|
289 |
-
);
|
290 |
-
|
291 |
$this->end_controls_section();
|
292 |
-
|
293 |
-
|
294 |
-
'
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
);
|
310 |
-
|
311 |
-
|
312 |
-
'
|
313 |
-
[
|
314 |
-
|
315 |
-
|
316 |
-
|
317 |
-
|
318 |
-
|
319 |
-
|
320 |
-
|
321 |
-
|
322 |
-
|
323 |
-
'
|
324 |
-
|
325 |
-
|
326 |
-
|
327 |
-
|
328 |
-
|
329 |
-
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
'
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
],
|
343 |
-
'condition' => [
|
344 |
-
'style' => ['style1', 'style3'],
|
345 |
-
],
|
346 |
-
]
|
347 |
-
);
|
348 |
-
|
349 |
-
$this->add_control(
|
350 |
-
'title_spacing',
|
351 |
-
[
|
352 |
-
'label' => __('Tab Title Padding', 'livemesh-el-addons'),
|
353 |
-
'type' => Controls_Manager::DIMENSIONS,
|
354 |
-
'size_units' => ['px', '%', 'em'],
|
355 |
-
'selectors' => [
|
356 |
-
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
357 |
-
],
|
358 |
-
'isLinked' => false
|
359 |
-
]
|
360 |
-
);
|
361 |
-
|
362 |
-
|
363 |
-
$this->add_group_control(
|
364 |
-
Group_Control_Typography::get_type(),
|
365 |
-
[
|
366 |
-
'name' => 'title_typography',
|
367 |
-
'selector' => '{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav .lae-tab-title',
|
368 |
-
]
|
369 |
-
);
|
370 |
-
|
371 |
$this->end_controls_section();
|
372 |
-
|
373 |
-
|
374 |
-
'
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
)
|
393 |
-
|
394 |
-
'
|
395 |
-
|
396 |
-
'label' => __('Color', 'livemesh-el-addons'),
|
397 |
-
'type' => Controls_Manager::COLOR,
|
398 |
-
'selectors' => [
|
399 |
-
'{{WRAPPER}} .lae-tab-slider .slick-list .lae-tab-slide .lae-tab-slide-content' => 'color: {{VALUE}};',
|
400 |
-
],
|
401 |
-
]
|
402 |
-
);
|
403 |
-
|
404 |
-
$this->add_group_control(
|
405 |
-
Group_Control_Typography::get_type(),
|
406 |
-
[
|
407 |
-
'name' => 'content_typography',
|
408 |
-
'selector' => '{{WRAPPER}} .lae-tab-slider .slick-list .lae-tab-slide .lae-tab-slide-content',
|
409 |
-
]
|
410 |
-
);
|
411 |
-
|
412 |
-
|
413 |
$this->end_controls_section();
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
'
|
418 |
-
[
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
]
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
'
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
'active_icon_color',
|
462 |
-
[
|
463 |
-
'label' => __('Active Tab Icon Color', 'livemesh-el-addons'),
|
464 |
-
'type' => Controls_Manager::COLOR,
|
465 |
-
'default' => '',
|
466 |
-
'selectors' => [
|
467 |
-
'{{WRAPPER}} .lae-tab-slider .slick-dots li.slick-active .lae-tab-slide-nav span.lae-icon-wrapper i' => 'color: {{VALUE}};',
|
468 |
-
],
|
469 |
-
]
|
470 |
-
);
|
471 |
-
|
472 |
-
$this->add_control(
|
473 |
-
'hover_icon_color',
|
474 |
-
[
|
475 |
-
'label' => __('Hover Tab Icon Color', 'livemesh-el-addons'),
|
476 |
-
'type' => Controls_Manager::COLOR,
|
477 |
-
'default' => '',
|
478 |
-
'selectors' => [
|
479 |
-
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav:hover span.lae-icon-wrapper i' => 'color: {{VALUE}};',
|
480 |
-
],
|
481 |
-
]
|
482 |
-
);
|
483 |
}
|
484 |
-
|
485 |
-
protected function render()
|
486 |
-
|
487 |
$settings = $this->get_settings_for_display();
|
488 |
-
|
489 |
-
$settings = apply_filters('lae_tab_slider_' . $this->get_id() . '_settings', $settings);
|
490 |
-
|
491 |
$args['settings'] = $settings;
|
492 |
-
|
493 |
$args['widget_instance'] = $this;
|
494 |
-
|
495 |
-
lae_get_template_part('addons/tab-slider/loop', $args);
|
496 |
-
|
497 |
}
|
498 |
-
|
499 |
-
protected function content_template()
|
500 |
-
|
501 |
}
|
502 |
|
503 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Scheme_Color ;
|
15 |
+
use Elementor\Group_Control_Typography ;
|
16 |
+
use Elementor\Scheme_Typography ;
|
17 |
+
use Elementor\Utils ;
|
18 |
+
if ( !defined( 'ABSPATH' ) ) {
|
19 |
+
exit;
|
20 |
+
}
|
21 |
+
// Exit if accessed directly
|
22 |
+
class LAE_Tab_Slider_Widget extends LAE_Widget_Base
|
23 |
+
{
|
24 |
+
public function get_name()
|
25 |
+
{
|
26 |
return 'lae-tab-slider';
|
27 |
}
|
28 |
+
|
29 |
+
public function get_title()
|
30 |
+
{
|
31 |
+
return __( 'Tab Slider', 'livemesh-el-addons' );
|
32 |
}
|
33 |
+
|
34 |
+
public function get_icon()
|
35 |
+
{
|
36 |
return 'lae-icon-tab-slider1';
|
37 |
}
|
38 |
+
|
39 |
+
public function get_categories()
|
40 |
+
{
|
41 |
+
return array( 'livemesh-addons' );
|
42 |
}
|
43 |
+
|
44 |
+
public function get_custom_help_url()
|
45 |
+
{
|
46 |
return 'https://livemeshelementor.com/docs/livemesh-addons/';
|
47 |
}
|
48 |
+
|
49 |
+
public function get_script_depends()
|
50 |
+
{
|
51 |
+
return [ 'lae-jquery-slick', 'lae-frontend-scripts', 'lae-tab-slider-scripts' ];
|
|
|
|
|
|
|
52 |
}
|
53 |
+
|
54 |
+
public function get_style_depends()
|
55 |
+
{
|
56 |
return [
|
57 |
'lae-icomoon-styles',
|
58 |
'lae-slick-carousel-styles',
|
61 |
'lae-tabs-slider-styles'
|
62 |
];
|
63 |
}
|
64 |
+
|
65 |
+
protected function _register_controls()
|
66 |
+
{
|
67 |
+
$this->start_controls_section( 'section_tabs', [
|
68 |
+
'label' => __( 'Tabs', 'livemesh-el-addons' ),
|
69 |
+
] );
|
70 |
+
$this->add_control( 'style', [
|
71 |
+
'type' => Controls_Manager::SELECT,
|
72 |
+
'label' => __( 'Choose Style', 'livemesh-el-addons' ),
|
73 |
+
'default' => 'style1',
|
74 |
+
'options' => [
|
75 |
+
'style1' => __( 'Tab Style 1', 'livemesh-el-addons' ),
|
76 |
+
'style2' => __( 'Tab Style 2', 'livemesh-el-addons' ),
|
77 |
+
'style3' => __( 'Tab Style 3', 'livemesh-el-addons' ),
|
78 |
+
],
|
79 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
80 |
$repeater = new Repeater();
|
81 |
+
$repeater->add_control( 'icon_type', [
|
82 |
+
'label' => __( 'Tab Icon Type', 'livemesh-el-addons' ),
|
83 |
+
'type' => Controls_Manager::SELECT,
|
84 |
+
'default' => 'none',
|
85 |
+
'options' => [
|
86 |
+
'none' => __( 'None', 'livemesh-el-addons' ),
|
87 |
+
'icon' => __( 'Icon', 'livemesh-el-addons' ),
|
88 |
+
'icon_image' => __( 'Icon Image', 'livemesh-el-addons' ),
|
89 |
+
],
|
90 |
+
] );
|
91 |
+
$repeater->add_control( 'icon_image', [
|
92 |
+
'label' => __( 'Tab Image', 'livemesh-el-addons' ),
|
93 |
+
'type' => Controls_Manager::MEDIA,
|
94 |
+
'default' => [
|
95 |
+
'url' => Utils::get_placeholder_image_src(),
|
96 |
+
],
|
97 |
+
'label_block' => true,
|
98 |
+
'condition' => [
|
99 |
+
'icon_type' => 'icon_image',
|
100 |
+
],
|
101 |
+
] );
|
102 |
+
$repeater->add_control( 'selected_icon', [
|
103 |
+
'label' => __( 'Tab Icon', 'livemesh-el-addons' ),
|
104 |
+
'type' => Controls_Manager::ICONS,
|
105 |
+
'label_block' => true,
|
106 |
+
'default' => [
|
107 |
+
'value' => 'fas fa-home',
|
108 |
+
'library' => 'fa-solid',
|
109 |
+
],
|
110 |
+
'condition' => [
|
111 |
+
'icon_type' => 'icon',
|
112 |
+
],
|
113 |
+
'fa4compatibility' => 'icon',
|
114 |
+
] );
|
115 |
+
$repeater->add_control( 'tab_title', [
|
116 |
+
'label' => __( 'Tab Title & Content', 'livemesh-el-addons' ),
|
117 |
+
'type' => Controls_Manager::TEXT,
|
118 |
+
'default' => __( 'Tab Title', 'livemesh-el-addons' ),
|
119 |
+
'label_block' => true,
|
120 |
+
'dynamic' => [
|
121 |
+
'active' => true,
|
122 |
+
],
|
123 |
+
] );
|
124 |
+
$repeater->add_control( 'tab_content', [
|
125 |
+
'label' => __( 'Tab Content', 'livemesh-el-addons' ),
|
126 |
+
'type' => Controls_Manager::WYSIWYG,
|
127 |
+
'default' => __( 'Tab Content', 'livemesh-el-addons' ),
|
128 |
+
'show_label' => false,
|
129 |
+
'dynamic' => [
|
130 |
+
'active' => true,
|
131 |
+
],
|
132 |
+
] );
|
133 |
+
$this->add_control( 'tabs', [
|
134 |
+
'label' => __( 'Tab Panes', 'livemesh-el-addons' ),
|
135 |
+
'type' => Controls_Manager::REPEATER,
|
136 |
+
'separator' => 'before',
|
137 |
+
'default' => [ [
|
138 |
+
'tab_title' => __( 'Tab #1', 'livemesh-el-addons' ),
|
139 |
+
'tab_content' => __( 'I am tabbed content 1. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
140 |
+
], [
|
141 |
+
'tab_title' => __( 'Tab #2', 'livemesh-el-addons' ),
|
142 |
+
'tab_content' => __( 'I am tabbed content 2. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
143 |
+
], [
|
144 |
+
'tab_title' => __( 'Tab #3', 'livemesh-el-addons' ),
|
145 |
+
'tab_content' => __( 'I am tabbed content 3. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
146 |
+
] ],
|
147 |
+
'fields' => $repeater->get_controls(),
|
148 |
+
'title_field' => '{{{ tab_title }}}',
|
149 |
+
] );
|
150 |
+
$this->add_control( 'upgrade_notice', [
|
151 |
+
'type' => Controls_Manager::RAW_HTML,
|
152 |
+
'separator' => 'before',
|
153 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
154 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
$this->end_controls_section();
|
156 |
+
$this->start_controls_section( 'section_slider_settings', [
|
157 |
+
'label' => __( 'Slider Settings', 'livemesh-el-addons' ),
|
158 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
159 |
+
] );
|
160 |
+
$this->add_control( 'autoplay', [
|
161 |
+
'type' => Controls_Manager::SWITCHER,
|
162 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
163 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
164 |
+
'return_value' => 'yes',
|
165 |
+
'default' => 'no',
|
166 |
+
'label' => __( 'Autoplay?', 'livemesh-el-addons' ),
|
167 |
+
'description' => __( 'Should the tabs autoplay as in a slideshow.', 'livemesh-el-addons' ),
|
168 |
+
] );
|
169 |
+
$this->add_control( 'pause_on_hover', [
|
170 |
+
'type' => Controls_Manager::SWITCHER,
|
171 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
172 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
173 |
+
'return_value' => 'yes',
|
174 |
+
'default' => 'yes',
|
175 |
+
'label' => __( 'Pause on Hover?', 'livemesh-el-addons' ),
|
176 |
+
'condition' => [
|
177 |
+
'autoplay' => 'yes',
|
178 |
+
],
|
179 |
+
] );
|
180 |
+
$this->add_control( 'pause_on_focus', [
|
181 |
+
'type' => Controls_Manager::SWITCHER,
|
182 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
183 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
184 |
+
'return_value' => 'yes',
|
185 |
+
'default' => 'yes',
|
186 |
+
'label' => __( 'Pause on Focus?', 'livemesh-el-addons' ),
|
187 |
+
'condition' => [
|
188 |
+
'autoplay' => 'yes',
|
189 |
+
],
|
190 |
+
] );
|
191 |
+
$this->add_control( 'autoplay_speed', [
|
192 |
+
'label' => __( 'Autoplay speed in ms', 'livemesh-el-addons' ),
|
193 |
+
'type' => Controls_Manager::NUMBER,
|
194 |
+
'default' => 3000,
|
195 |
+
'condition' => [
|
196 |
+
'autoplay' => 'yes',
|
197 |
+
],
|
198 |
+
] );
|
199 |
+
$this->add_control( 'animation_speed', [
|
200 |
+
'label' => __( 'Autoplay animation speed in ms', 'livemesh-el-addons' ),
|
201 |
+
'type' => Controls_Manager::NUMBER,
|
202 |
+
'default' => 300,
|
203 |
+
] );
|
204 |
+
$this->add_control( 'infinite_looping', [
|
205 |
+
'type' => Controls_Manager::SWITCHER,
|
206 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
207 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
208 |
+
'return_value' => 'yes',
|
209 |
+
'default' => 'yes',
|
210 |
+
'label' => __( 'Infinite Looping?', 'livemesh-el-addons' ),
|
211 |
+
] );
|
212 |
+
$this->add_control( 'adaptive_height', [
|
213 |
+
'type' => Controls_Manager::SWITCHER,
|
214 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
215 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
216 |
+
'return_value' => 'yes',
|
217 |
+
'default' => 'no',
|
218 |
+
'label' => __( 'Adaptive Height?', 'livemesh-el-addons' ),
|
219 |
+
'description' => __( 'Enables adaptive height when tabs are of different heights.', 'livemesh-el-addons' ),
|
220 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
221 |
$this->end_controls_section();
|
222 |
+
$this->start_controls_section( 'section_tab_title', [
|
223 |
+
'label' => __( 'Tab Title', 'livemesh-el-addons' ),
|
224 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
225 |
+
] );
|
226 |
+
$this->add_control( 'title_color', [
|
227 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
228 |
+
'type' => Controls_Manager::COLOR,
|
229 |
+
'selectors' => [
|
230 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav .lae-tab-title' => 'color: {{VALUE}};',
|
231 |
+
],
|
232 |
+
] );
|
233 |
+
$this->add_control( 'active_title_color', [
|
234 |
+
'label' => __( 'Active Tab Title Color', 'livemesh-el-addons' ),
|
235 |
+
'type' => Controls_Manager::COLOR,
|
236 |
+
'selectors' => [
|
237 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li.slick-active .lae-tab-slide-nav .lae-tab-title' => 'color: {{VALUE}};',
|
238 |
+
],
|
239 |
+
] );
|
240 |
+
$this->add_control( 'hover_title_color', [
|
241 |
+
'label' => __( 'Tab Title Hover Color', 'livemesh-el-addons' ),
|
242 |
+
'type' => Controls_Manager::COLOR,
|
243 |
+
'selectors' => [
|
244 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav:hover .lae-tab-title' => 'color: {{VALUE}};',
|
245 |
+
],
|
246 |
+
] );
|
247 |
+
$this->add_control( 'highlight_color', [
|
248 |
+
'label' => __( 'Tab highlight Border color', 'livemesh-el-addons' ),
|
249 |
+
'type' => Controls_Manager::COLOR,
|
250 |
+
'default' => '#f94213',
|
251 |
+
'selectors' => [
|
252 |
+
'{{WRAPPER}} .lae-tab-slider.lae-style1 .slick-dots li.slick-active .lae-tab-slide-nav:before' => 'background: {{VALUE}};',
|
253 |
+
'{{WRAPPER}} .lae-tab-slider.lae-style3 .slick-dots li.slick-active .lae-tab-slide-nav' => 'border-color: {{VALUE}};',
|
254 |
+
],
|
255 |
+
'condition' => [
|
256 |
+
'style' => [ 'style1', 'style3' ],
|
257 |
+
],
|
258 |
+
] );
|
259 |
+
$this->add_control( 'title_spacing', [
|
260 |
+
'label' => __( 'Tab Title Padding', 'livemesh-el-addons' ),
|
261 |
+
'type' => Controls_Manager::DIMENSIONS,
|
262 |
+
'size_units' => [ 'px', '%', 'em' ],
|
263 |
+
'selectors' => [
|
264 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
265 |
+
],
|
266 |
+
'isLinked' => false,
|
267 |
+
] );
|
268 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
269 |
+
'name' => 'title_typography',
|
270 |
+
'selector' => '{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav .lae-tab-title',
|
271 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
272 |
$this->end_controls_section();
|
273 |
+
$this->start_controls_section( 'section_tab_content', [
|
274 |
+
'label' => __( 'Tab Content', 'livemesh-el-addons' ),
|
275 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
276 |
+
] );
|
277 |
+
$this->add_control( 'content_spacing', [
|
278 |
+
'label' => __( 'Tab Content Padding', 'livemesh-el-addons' ),
|
279 |
+
'type' => Controls_Manager::DIMENSIONS,
|
280 |
+
'size_units' => [ 'px', '%', 'em' ],
|
281 |
+
'selectors' => [
|
282 |
+
'{{WRAPPER}} .lae-tab-slider .slick-list .lae-tab-slide .lae-tab-slide-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
283 |
+
],
|
284 |
+
'isLinked' => false,
|
285 |
+
] );
|
286 |
+
$this->add_control( 'content_color', [
|
287 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
288 |
+
'type' => Controls_Manager::COLOR,
|
289 |
+
'selectors' => [
|
290 |
+
'{{WRAPPER}} .lae-tab-slider .slick-list .lae-tab-slide .lae-tab-slide-content' => 'color: {{VALUE}};',
|
291 |
+
],
|
292 |
+
] );
|
293 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
294 |
+
'name' => 'content_typography',
|
295 |
+
'selector' => '{{WRAPPER}} .lae-tab-slider .slick-list .lae-tab-slide .lae-tab-slide-content',
|
296 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
297 |
$this->end_controls_section();
|
298 |
+
$this->start_controls_section( 'section_icon_styling', [
|
299 |
+
'label' => __( 'Icons', 'livemesh-el-addons' ),
|
300 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
301 |
+
'condition' => [
|
302 |
+
'style' => [ 'style2', 'style3' ],
|
303 |
+
],
|
304 |
+
] );
|
305 |
+
$this->add_control( 'icon_size', [
|
306 |
+
'label' => __( 'Icon or Icon Image size in pixels', 'livemesh-el-addons' ),
|
307 |
+
'type' => Controls_Manager::SLIDER,
|
308 |
+
'size_units' => [ 'px', '%', 'em' ],
|
309 |
+
'range' => [
|
310 |
+
'px' => [
|
311 |
+
'min' => 10,
|
312 |
+
'max' => 256,
|
313 |
+
],
|
314 |
+
],
|
315 |
+
'devices' => [ 'desktop', 'tablet', 'mobile' ],
|
316 |
+
'selectors' => [
|
317 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav span.lae-image-wrapper img' => 'width: {{SIZE}}{{UNIT}};',
|
318 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav span.lae-icon-wrapper i' => 'font-size: {{SIZE}}{{UNIT}};',
|
319 |
+
],
|
320 |
+
] );
|
321 |
+
$this->add_control( 'icon_color', [
|
322 |
+
'label' => __( 'Icon Color', 'livemesh-el-addons' ),
|
323 |
+
'type' => Controls_Manager::COLOR,
|
324 |
+
'default' => '',
|
325 |
+
'selectors' => [
|
326 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav span.lae-icon-wrapper i' => 'color: {{VALUE}};',
|
327 |
+
],
|
328 |
+
] );
|
329 |
+
$this->add_control( 'active_icon_color', [
|
330 |
+
'label' => __( 'Active Tab Icon Color', 'livemesh-el-addons' ),
|
331 |
+
'type' => Controls_Manager::COLOR,
|
332 |
+
'default' => '',
|
333 |
+
'selectors' => [
|
334 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li.slick-active .lae-tab-slide-nav span.lae-icon-wrapper i' => 'color: {{VALUE}};',
|
335 |
+
],
|
336 |
+
] );
|
337 |
+
$this->add_control( 'hover_icon_color', [
|
338 |
+
'label' => __( 'Hover Tab Icon Color', 'livemesh-el-addons' ),
|
339 |
+
'type' => Controls_Manager::COLOR,
|
340 |
+
'default' => '',
|
341 |
+
'selectors' => [
|
342 |
+
'{{WRAPPER}} .lae-tab-slider .slick-dots li .lae-tab-slide-nav:hover span.lae-icon-wrapper i' => 'color: {{VALUE}};',
|
343 |
+
],
|
344 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
345 |
}
|
346 |
+
|
347 |
+
protected function render()
|
348 |
+
{
|
349 |
$settings = $this->get_settings_for_display();
|
350 |
+
$settings = apply_filters( 'lae_tab_slider_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
351 |
$args['settings'] = $settings;
|
|
|
352 |
$args['widget_instance'] = $this;
|
353 |
+
lae_get_template_part( 'addons/tab-slider/loop', $args );
|
|
|
|
|
354 |
}
|
355 |
+
|
356 |
+
protected function content_template()
|
357 |
+
{
|
358 |
}
|
359 |
|
360 |
}
|
includes/widgets/team-members.php
CHANGED
@@ -6,54 +6,55 @@ Description: Display a list of your team members optionally in a multi-column gr
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
|
17 |
-
use
|
18 |
-
use
|
19 |
-
use
|
20 |
-
use
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
public function get_name() {
|
30 |
return 'lae-team-members';
|
31 |
}
|
32 |
-
|
33 |
-
public function get_title()
|
34 |
-
|
|
|
35 |
}
|
36 |
-
|
37 |
-
public function get_icon()
|
|
|
38 |
return 'lae-icon-team4';
|
39 |
}
|
40 |
-
|
41 |
-
public function get_categories()
|
42 |
-
|
|
|
43 |
}
|
44 |
-
|
45 |
-
public function get_custom_help_url()
|
|
|
46 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/team-members/';
|
47 |
}
|
48 |
-
|
49 |
-
public function get_script_depends()
|
50 |
-
|
51 |
-
|
52 |
-
'lae-frontend-scripts'
|
53 |
-
];
|
54 |
}
|
55 |
-
|
56 |
-
public function get_style_depends()
|
|
|
57 |
return [
|
58 |
'lae-icomoon-styles',
|
59 |
'lae-animate-styles',
|
@@ -61,696 +62,461 @@ class LAE_Team_Widget extends LAE_Widget_Base {
|
|
61 |
'lae-team-members-styles'
|
62 |
];
|
63 |
}
|
64 |
-
|
65 |
-
protected function _register_controls()
|
66 |
-
|
67 |
-
$this->start_controls_section(
|
68 |
-
'
|
69 |
-
|
70 |
-
'label' => __('Team', 'livemesh-el-addons'),
|
71 |
-
]
|
72 |
-
);
|
73 |
-
|
74 |
$repeater = new Repeater();
|
75 |
-
|
76 |
-
|
77 |
-
'
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
'
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
'
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
]
|
138 |
-
|
139 |
-
|
140 |
-
$repeater->add_control(
|
141 |
-
'
|
142 |
-
|
143 |
-
|
144 |
-
|
145 |
-
|
146 |
-
|
147 |
-
|
148 |
-
|
149 |
-
|
150 |
-
|
151 |
-
|
152 |
-
|
153 |
-
|
154 |
-
|
155 |
-
|
156 |
-
|
157 |
-
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
'
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
'
|
200 |
-
[
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
'
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
);
|
230 |
-
|
231 |
-
|
232 |
-
'
|
233 |
-
|
234 |
-
|
235 |
-
'type' => Controls_Manager::TEXT,
|
236 |
-
|
237 |
-
'label' => __('Pinterest Page URL', 'livemesh-el-addons'),
|
238 |
-
'description' => __('URL of the Pinterest page for the team member.', 'livemesh-el-addons'),
|
239 |
-
'dynamic' => [
|
240 |
-
'active' => true,
|
241 |
-
'categories' => [
|
242 |
-
TagsModule::POST_META_CATEGORY,
|
243 |
-
],
|
244 |
-
],
|
245 |
-
]
|
246 |
-
);
|
247 |
-
|
248 |
-
$repeater->add_control(
|
249 |
-
'dribbble_url',
|
250 |
-
[
|
251 |
-
'type' => Controls_Manager::TEXT,
|
252 |
-
|
253 |
-
'label' => __('Dribbble Profile URL', 'livemesh-el-addons'),
|
254 |
-
'description' => __('URL of the Dribbble profile of the team member.', 'livemesh-el-addons'),
|
255 |
-
'dynamic' => [
|
256 |
-
'active' => true,
|
257 |
-
'categories' => [
|
258 |
-
TagsModule::POST_META_CATEGORY,
|
259 |
-
],
|
260 |
-
],
|
261 |
-
]
|
262 |
-
);
|
263 |
-
|
264 |
-
$repeater->add_control(
|
265 |
-
'google_plus_url',
|
266 |
-
[
|
267 |
-
'type' => Controls_Manager::TEXT,
|
268 |
-
|
269 |
-
'label' => __('GooglePlus Page URL', 'livemesh-el-addons'),
|
270 |
-
'description' => __('URL of the Google Plus page of the team member.', 'livemesh-el-addons'),
|
271 |
-
'dynamic' => [
|
272 |
-
'active' => true,
|
273 |
-
'categories' => [
|
274 |
-
TagsModule::POST_META_CATEGORY,
|
275 |
-
],
|
276 |
-
],
|
277 |
-
]
|
278 |
-
);
|
279 |
-
|
280 |
-
$repeater->add_control(
|
281 |
-
'instagram_url',
|
282 |
-
[
|
283 |
-
'type' => Controls_Manager::TEXT,
|
284 |
-
|
285 |
-
'label' => __('Instagram Page URL', 'livemesh-el-addons'),
|
286 |
-
'description' => __('URL of the Instagram feed for the team member.', 'livemesh-el-addons'),
|
287 |
-
'dynamic' => [
|
288 |
-
'active' => true,
|
289 |
-
'categories' => [
|
290 |
-
TagsModule::POST_META_CATEGORY,
|
291 |
-
],
|
292 |
-
],
|
293 |
-
]
|
294 |
-
);
|
295 |
-
|
296 |
-
$repeater->add_control(
|
297 |
-
"widget_animation",
|
298 |
-
[
|
299 |
-
"type" => Controls_Manager::SELECT,
|
300 |
-
"label" => __("Animation Type", "livemesh-el-addons"),
|
301 |
-
'options' => lae_get_animation_options(),
|
302 |
-
'default' => 'none',
|
303 |
-
'separator' => 'before',
|
304 |
-
]
|
305 |
-
);
|
306 |
-
|
307 |
-
$this->add_control(
|
308 |
-
'team_members',
|
309 |
-
[
|
310 |
-
'label' => __('Team Members', 'livemesh-el-addons'),
|
311 |
-
'type' => Controls_Manager::REPEATER,
|
312 |
-
'separator' => 'before',
|
313 |
-
'default' => [
|
314 |
-
[
|
315 |
-
'member_name' => __('Team Member #1', 'livemesh-el-addons'),
|
316 |
-
'member_position' => __('CEO', 'livemesh-el-addons'),
|
317 |
-
'member_details' => __('I am member details. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
318 |
-
],
|
319 |
-
[
|
320 |
-
'member_name' => __('Team Member #2', 'livemesh-el-addons'),
|
321 |
-
'member_position' => __('Lead Developer', 'livemesh-el-addons'),
|
322 |
-
'member_details' => __('I am member details. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
323 |
-
],
|
324 |
-
[
|
325 |
-
'member_name' => __('Team Member #3', 'livemesh-el-addons'),
|
326 |
-
'member_position' => __('Finance Manager', 'livemesh-el-addons'),
|
327 |
-
'member_details' => __('I am member details. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
328 |
-
],
|
329 |
-
],
|
330 |
-
'fields' => $repeater->get_controls(),
|
331 |
-
'title_field' => '{{{ member_name }}}',
|
332 |
-
]
|
333 |
-
);
|
334 |
-
|
335 |
$this->end_controls_section();
|
336 |
-
|
337 |
-
|
338 |
-
'
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
],
|
355 |
-
]
|
356 |
-
);
|
357 |
-
|
358 |
-
$this->add_group_control(
|
359 |
-
Group_Control_Image_Size::get_type(),
|
360 |
-
[
|
361 |
-
'name' => 'thumbnail_size',
|
362 |
-
'label' => __('Team Member Image Size', 'livemesh-el-addons'),
|
363 |
-
'default' => 'full',
|
364 |
-
]
|
365 |
-
);
|
366 |
-
|
367 |
$this->end_controls_section();
|
368 |
-
|
369 |
-
|
370 |
-
'
|
371 |
-
[
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
|
386 |
-
|
387 |
-
|
388 |
-
|
389 |
-
|
390 |
-
|
391 |
-
|
392 |
-
|
393 |
-
|
394 |
-
|
395 |
-
'
|
396 |
-
|
397 |
-
|
398 |
-
|
399 |
-
|
400 |
-
|
401 |
-
|
402 |
-
|
403 |
-
|
404 |
-
|
405 |
-
|
406 |
-
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
'
|
420 |
-
[
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
$this->add_control(
|
442 |
-
'
|
443 |
-
|
444 |
-
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
],
|
459 |
-
]
|
460 |
-
);
|
461 |
-
|
462 |
-
$this->add_control(
|
463 |
-
'row_gap',
|
464 |
-
[
|
465 |
-
'label' => __('Row Gap', 'livemesh-el-addons'),
|
466 |
-
'type' => Controls_Manager::SLIDER,
|
467 |
-
'size_units' => ['px'],
|
468 |
-
'default' => [
|
469 |
-
'size' => 30,
|
470 |
-
],
|
471 |
-
'range' => [
|
472 |
-
'px' => [
|
473 |
-
'min' => 0,
|
474 |
-
'max' => 100,
|
475 |
-
],
|
476 |
-
],
|
477 |
-
'selectors' => [
|
478 |
-
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
479 |
-
],
|
480 |
-
]
|
481 |
-
);
|
482 |
-
|
483 |
$this->end_controls_section();
|
484 |
-
|
485 |
-
|
486 |
-
|
487 |
-
'
|
488 |
-
|
489 |
-
|
490 |
-
|
491 |
-
|
492 |
-
]
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
'
|
497 |
-
[
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
-
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
-
|
513 |
-
|
514 |
-
|
515 |
-
|
516 |
-
|
517 |
-
|
518 |
-
|
519 |
-
|
520 |
-
|
521 |
-
|
522 |
-
|
523 |
-
|
524 |
-
|
525 |
-
|
526 |
-
'selectors' => [
|
527 |
-
'{{WRAPPER}} .lae-team-members .lae-team-member:hover .lae-image-wrapper img' => '-webkit-filter: brightness({{SIZE}}%);-moz-filter: brightness({{SIZE}}%);-ms-filter: brightness({{SIZE}}%); filter: brightness({{SIZE}}%);',
|
528 |
-
],
|
529 |
-
]
|
530 |
-
);
|
531 |
-
|
532 |
-
|
533 |
-
$this->add_control(
|
534 |
-
'thumbnail_border_radius',
|
535 |
-
[
|
536 |
-
'label' => __('Thumbnail Border Radius', 'livemesh-el-addons'),
|
537 |
-
'type' => Controls_Manager::DIMENSIONS,
|
538 |
-
'size_units' => ['px', '%'],
|
539 |
-
'selectors' => [
|
540 |
-
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-image-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
541 |
-
],
|
542 |
-
]
|
543 |
-
);
|
544 |
-
|
545 |
$this->end_controls_section();
|
546 |
-
|
547 |
-
|
548 |
-
'
|
549 |
-
|
550 |
-
|
551 |
-
|
552 |
-
|
553 |
-
|
554 |
-
|
555 |
-
|
556 |
-
'
|
557 |
-
|
558 |
-
|
559 |
-
|
560 |
-
|
561 |
-
|
562 |
-
|
563 |
-
|
564 |
-
|
565 |
-
|
566 |
-
|
567 |
-
|
568 |
-
|
569 |
-
|
570 |
-
|
571 |
-
|
572 |
-
|
573 |
-
|
574 |
-
'
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
582 |
-
);
|
583 |
-
|
584 |
-
$this->add_control(
|
585 |
-
'title_hover_color',
|
586 |
-
[
|
587 |
-
'label' => __('Hover Color for Link', 'livemesh-el-addons'),
|
588 |
-
'type' => Controls_Manager::COLOR,
|
589 |
-
'selectors' => [
|
590 |
-
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-title-link:hover .lae-title' => 'color: {{VALUE}};',
|
591 |
-
],
|
592 |
-
]
|
593 |
-
);
|
594 |
-
|
595 |
-
$this->add_group_control(
|
596 |
-
Group_Control_Typography::get_type(),
|
597 |
-
[
|
598 |
-
'name' => 'title_typography',
|
599 |
-
'selector' => '{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-title',
|
600 |
-
]
|
601 |
-
);
|
602 |
-
|
603 |
$this->end_controls_section();
|
604 |
-
|
605 |
-
|
606 |
-
'
|
607 |
-
|
608 |
-
|
609 |
-
|
610 |
-
|
611 |
-
|
612 |
-
|
613 |
-
|
614 |
-
|
615 |
-
|
616 |
-
|
617 |
-
|
618 |
-
|
619 |
-
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-team-member-position' => 'color: {{VALUE}};',
|
620 |
-
],
|
621 |
-
]
|
622 |
-
);
|
623 |
-
|
624 |
-
$this->add_group_control(
|
625 |
-
Group_Control_Typography::get_type(),
|
626 |
-
[
|
627 |
-
'name' => 'position_typography',
|
628 |
-
'selector' => '{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-team-member-position',
|
629 |
-
]
|
630 |
-
);
|
631 |
-
|
632 |
$this->end_controls_section();
|
633 |
-
|
634 |
-
|
635 |
-
'
|
636 |
-
|
637 |
-
|
638 |
-
|
639 |
-
|
640 |
-
|
641 |
-
|
642 |
-
|
643 |
-
|
644 |
-
|
645 |
-
|
646 |
-
|
647 |
-
|
648 |
-
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-details' => 'color: {{VALUE}};',
|
649 |
-
],
|
650 |
-
]
|
651 |
-
);
|
652 |
-
|
653 |
-
$this->add_group_control(
|
654 |
-
Group_Control_Typography::get_type(),
|
655 |
-
[
|
656 |
-
'name' => 'text_typography',
|
657 |
-
'selector' => '{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-details',
|
658 |
-
]
|
659 |
-
);
|
660 |
-
|
661 |
$this->end_controls_section();
|
662 |
-
|
663 |
-
|
664 |
-
|
665 |
-
|
666 |
-
|
667 |
-
|
668 |
-
|
669 |
-
]
|
670 |
-
|
671 |
-
|
672 |
-
|
673 |
-
'
|
674 |
-
|
675 |
-
|
676 |
-
|
677 |
-
|
678 |
-
|
679 |
-
|
680 |
-
|
681 |
-
|
682 |
-
|
683 |
-
|
684 |
-
|
685 |
-
|
686 |
-
|
687 |
-
|
688 |
-
|
689 |
-
|
690 |
-
|
691 |
-
|
692 |
-
[
|
693 |
-
|
694 |
-
|
695 |
-
|
696 |
-
|
697 |
-
|
698 |
-
|
699 |
-
|
700 |
-
|
701 |
-
|
702 |
-
|
703 |
-
|
704 |
-
|
705 |
-
|
706 |
-
|
707 |
-
|
708 |
-
|
709 |
-
|
710 |
-
|
711 |
-
|
712 |
-
|
713 |
-
[
|
714 |
-
'label' => __('Icon Color', 'livemesh-el-addons'),
|
715 |
-
'type' => Controls_Manager::COLOR,
|
716 |
-
'default' => '',
|
717 |
-
'selectors' => [
|
718 |
-
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-social-list .lae-social-list-item i' => 'color: {{VALUE}};',
|
719 |
-
],
|
720 |
-
]
|
721 |
-
);
|
722 |
-
|
723 |
-
$this->add_control(
|
724 |
-
'social_icon_hover_color',
|
725 |
-
[
|
726 |
-
'label' => __('Icon Hover Color', 'livemesh-el-addons'),
|
727 |
-
'type' => Controls_Manager::COLOR,
|
728 |
-
'default' => '',
|
729 |
-
'selectors' => [
|
730 |
-
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-social-list .lae-social-list-item i:hover' => 'color: {{VALUE}};',
|
731 |
-
],
|
732 |
-
]
|
733 |
-
);
|
734 |
-
|
735 |
$this->end_controls_section();
|
736 |
-
|
737 |
}
|
738 |
-
|
739 |
-
protected function render()
|
740 |
-
|
741 |
$settings = $this->get_settings_for_display();
|
742 |
-
|
743 |
-
$settings = apply_filters('lae_team_members_' . $this->get_id() . '_settings', $settings);
|
744 |
-
|
745 |
$args['settings'] = $settings;
|
746 |
-
|
747 |
$args['widget_instance'] = $this;
|
748 |
-
|
749 |
-
lae_get_template_part('addons/team-members/loop', $args);
|
750 |
-
|
751 |
}
|
752 |
-
|
753 |
-
protected function content_template()
|
|
|
754 |
}
|
755 |
|
756 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Utils ;
|
15 |
+
use Elementor\Scheme_Color ;
|
16 |
+
use Elementor\Group_Control_Typography ;
|
17 |
+
use Elementor\Group_Control_Image_Size ;
|
18 |
+
use Elementor\Scheme_Typography ;
|
19 |
+
use Elementor\Modules\DynamicTags\Module as TagsModule ;
|
20 |
+
if ( !defined( 'ABSPATH' ) ) {
|
21 |
+
exit;
|
22 |
+
}
|
23 |
+
// Exit if accessed directly
|
24 |
+
class LAE_Team_Widget extends LAE_Widget_Base
|
25 |
+
{
|
26 |
+
public function get_name()
|
27 |
+
{
|
|
|
28 |
return 'lae-team-members';
|
29 |
}
|
30 |
+
|
31 |
+
public function get_title()
|
32 |
+
{
|
33 |
+
return __( 'Team Members', 'livemesh-el-addons' );
|
34 |
}
|
35 |
+
|
36 |
+
public function get_icon()
|
37 |
+
{
|
38 |
return 'lae-icon-team4';
|
39 |
}
|
40 |
+
|
41 |
+
public function get_categories()
|
42 |
+
{
|
43 |
+
return array( 'livemesh-addons' );
|
44 |
}
|
45 |
+
|
46 |
+
public function get_custom_help_url()
|
47 |
+
{
|
48 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/team-members/';
|
49 |
}
|
50 |
+
|
51 |
+
public function get_script_depends()
|
52 |
+
{
|
53 |
+
return [ 'lae-waypoints', 'lae-frontend-scripts' ];
|
|
|
|
|
54 |
}
|
55 |
+
|
56 |
+
public function get_style_depends()
|
57 |
+
{
|
58 |
return [
|
59 |
'lae-icomoon-styles',
|
60 |
'lae-animate-styles',
|
62 |
'lae-team-members-styles'
|
63 |
];
|
64 |
}
|
65 |
+
|
66 |
+
protected function _register_controls()
|
67 |
+
{
|
68 |
+
$this->start_controls_section( 'section_team', [
|
69 |
+
'label' => __( 'Team', 'livemesh-el-addons' ),
|
70 |
+
] );
|
|
|
|
|
|
|
|
|
71 |
$repeater = new Repeater();
|
72 |
+
$repeater->add_control( 'member_name', [
|
73 |
+
'label' => __( 'Member Name', 'livemesh-el-addons' ),
|
74 |
+
'type' => Controls_Manager::TEXT,
|
75 |
+
'default' => __( 'My team member name', 'livemesh-el-addons' ),
|
76 |
+
'dynamic' => [
|
77 |
+
'active' => true,
|
78 |
+
],
|
79 |
+
] );
|
80 |
+
$repeater->add_control( 'member_position', [
|
81 |
+
'label' => __( 'Position', 'livemesh-el-addons' ),
|
82 |
+
'type' => Controls_Manager::TEXT,
|
83 |
+
'dynamic' => [
|
84 |
+
'active' => true,
|
85 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
86 |
+
],
|
87 |
+
] );
|
88 |
+
$repeater->add_control( 'member_image', [
|
89 |
+
'label' => __( 'Team Member Image', 'livemesh-el-addons' ),
|
90 |
+
'type' => Controls_Manager::MEDIA,
|
91 |
+
'default' => [
|
92 |
+
'url' => Utils::get_placeholder_image_src(),
|
93 |
+
],
|
94 |
+
'label_block' => true,
|
95 |
+
'dynamic' => [
|
96 |
+
'active' => true,
|
97 |
+
],
|
98 |
+
] );
|
99 |
+
$repeater->add_control( 'member_link', [
|
100 |
+
'label' => __( 'Team Member URL', 'livemesh-el-addons' ),
|
101 |
+
'description' => __( 'The link for the page describing the team member.', 'livemesh-el-addons' ),
|
102 |
+
'type' => Controls_Manager::URL,
|
103 |
+
'label_block' => true,
|
104 |
+
'default' => [
|
105 |
+
'url' => '',
|
106 |
+
'is_external' => 'true',
|
107 |
+
],
|
108 |
+
'placeholder' => __( 'http://member-link.com', 'livemesh-el-addons' ),
|
109 |
+
'dynamic' => [
|
110 |
+
'active' => true,
|
111 |
+
],
|
112 |
+
] );
|
113 |
+
$repeater->add_control( 'member_details', [
|
114 |
+
'label' => __( 'Team Member details', 'livemesh-el-addons' ),
|
115 |
+
'type' => Controls_Manager::TEXTAREA,
|
116 |
+
'default' => __( 'Details about team member', 'livemesh-el-addons' ),
|
117 |
+
'description' => __( 'Provide a short writeup for the team member', 'livemesh-el-addons' ),
|
118 |
+
'label_block' => true,
|
119 |
+
'dynamic' => [
|
120 |
+
'active' => true,
|
121 |
+
],
|
122 |
+
] );
|
123 |
+
$repeater->add_control( 'social_profile', [
|
124 |
+
'label' => __( 'Social Profile', 'livemesh-el-addons' ),
|
125 |
+
'type' => Controls_Manager::HEADING,
|
126 |
+
'separator' => 'before',
|
127 |
+
] );
|
128 |
+
$repeater->add_control( 'member_email', [
|
129 |
+
'type' => Controls_Manager::TEXT,
|
130 |
+
'label' => __( 'Email Address', 'livemesh-el-addons' ),
|
131 |
+
'description' => __( 'Enter the email address of the team member.', 'livemesh-el-addons' ),
|
132 |
+
'dynamic' => [
|
133 |
+
'active' => true,
|
134 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
135 |
+
],
|
136 |
+
] );
|
137 |
+
$repeater->add_control( 'facebook_url', [
|
138 |
+
'type' => Controls_Manager::TEXT,
|
139 |
+
'label' => __( 'Facebook Page URL', 'livemesh-el-addons' ),
|
140 |
+
'description' => __( 'URL of the Facebook page of the team member.', 'livemesh-el-addons' ),
|
141 |
+
'dynamic' => [
|
142 |
+
'active' => true,
|
143 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
144 |
+
],
|
145 |
+
] );
|
146 |
+
$repeater->add_control( 'twitter_url', [
|
147 |
+
'type' => Controls_Manager::TEXT,
|
148 |
+
'label' => __( 'Twitter Profile URL', 'livemesh-el-addons' ),
|
149 |
+
'description' => __( 'URL of the Twitter page of the team member.', 'livemesh-el-addons' ),
|
150 |
+
'dynamic' => [
|
151 |
+
'active' => true,
|
152 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
153 |
+
],
|
154 |
+
] );
|
155 |
+
$repeater->add_control( 'linkedin_url', [
|
156 |
+
'type' => Controls_Manager::TEXT,
|
157 |
+
'label' => __( 'LinkedIn Page URL', 'livemesh-el-addons' ),
|
158 |
+
'description' => __( 'URL of the LinkedIn profile of the team member.', 'livemesh-el-addons' ),
|
159 |
+
'dynamic' => [
|
160 |
+
'active' => true,
|
161 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
162 |
+
],
|
163 |
+
] );
|
164 |
+
$repeater->add_control( 'pinterest_url', [
|
165 |
+
'type' => Controls_Manager::TEXT,
|
166 |
+
'label' => __( 'Pinterest Page URL', 'livemesh-el-addons' ),
|
167 |
+
'description' => __( 'URL of the Pinterest page for the team member.', 'livemesh-el-addons' ),
|
168 |
+
'dynamic' => [
|
169 |
+
'active' => true,
|
170 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
171 |
+
],
|
172 |
+
] );
|
173 |
+
$repeater->add_control( 'dribbble_url', [
|
174 |
+
'type' => Controls_Manager::TEXT,
|
175 |
+
'label' => __( 'Dribbble Profile URL', 'livemesh-el-addons' ),
|
176 |
+
'description' => __( 'URL of the Dribbble profile of the team member.', 'livemesh-el-addons' ),
|
177 |
+
'dynamic' => [
|
178 |
+
'active' => true,
|
179 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
180 |
+
],
|
181 |
+
] );
|
182 |
+
$repeater->add_control( 'google_plus_url', [
|
183 |
+
'type' => Controls_Manager::TEXT,
|
184 |
+
'label' => __( 'GooglePlus Page URL', 'livemesh-el-addons' ),
|
185 |
+
'description' => __( 'URL of the Google Plus page of the team member.', 'livemesh-el-addons' ),
|
186 |
+
'dynamic' => [
|
187 |
+
'active' => true,
|
188 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
189 |
+
],
|
190 |
+
] );
|
191 |
+
$repeater->add_control( 'instagram_url', [
|
192 |
+
'type' => Controls_Manager::TEXT,
|
193 |
+
'label' => __( 'Instagram Page URL', 'livemesh-el-addons' ),
|
194 |
+
'description' => __( 'URL of the Instagram feed for the team member.', 'livemesh-el-addons' ),
|
195 |
+
'dynamic' => [
|
196 |
+
'active' => true,
|
197 |
+
'categories' => [ TagsModule::POST_META_CATEGORY ],
|
198 |
+
],
|
199 |
+
] );
|
200 |
+
$repeater->add_control( "widget_animation", [
|
201 |
+
"type" => Controls_Manager::SELECT,
|
202 |
+
"label" => __( "Animation Type", "livemesh-el-addons" ),
|
203 |
+
'options' => lae_get_animation_options(),
|
204 |
+
'default' => 'none',
|
205 |
+
'separator' => 'before',
|
206 |
+
] );
|
207 |
+
$this->add_control( 'team_members', [
|
208 |
+
'label' => __( 'Team Members', 'livemesh-el-addons' ),
|
209 |
+
'type' => Controls_Manager::REPEATER,
|
210 |
+
'separator' => 'before',
|
211 |
+
'default' => [ [
|
212 |
+
'member_name' => __( 'Team Member #1', 'livemesh-el-addons' ),
|
213 |
+
'member_position' => __( 'CEO', 'livemesh-el-addons' ),
|
214 |
+
'member_details' => __( 'I am member details. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
215 |
+
], [
|
216 |
+
'member_name' => __( 'Team Member #2', 'livemesh-el-addons' ),
|
217 |
+
'member_position' => __( 'Lead Developer', 'livemesh-el-addons' ),
|
218 |
+
'member_details' => __( 'I am member details. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
219 |
+
], [
|
220 |
+
'member_name' => __( 'Team Member #3', 'livemesh-el-addons' ),
|
221 |
+
'member_position' => __( 'Finance Manager', 'livemesh-el-addons' ),
|
222 |
+
'member_details' => __( 'I am member details. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
223 |
+
] ],
|
224 |
+
'fields' => $repeater->get_controls(),
|
225 |
+
'title_field' => '{{{ member_name }}}',
|
226 |
+
] );
|
227 |
+
$this->add_control( 'upgrade_notice', [
|
228 |
+
'type' => Controls_Manager::RAW_HTML,
|
229 |
+
'separator' => 'before',
|
230 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
231 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
232 |
$this->end_controls_section();
|
233 |
+
$this->start_controls_section( 'section_general_settings', [
|
234 |
+
'label' => __( 'General Settings', 'livemesh-el-addons' ),
|
235 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
236 |
+
] );
|
237 |
+
$this->add_control( 'style', [
|
238 |
+
'type' => Controls_Manager::SELECT,
|
239 |
+
'label' => __( 'Choose Team Style', 'livemesh-el-addons' ),
|
240 |
+
'default' => 'style1',
|
241 |
+
'options' => [
|
242 |
+
'style1' => __( 'Style 1', 'livemesh-el-addons' ),
|
243 |
+
'style2' => __( 'Style 2', 'livemesh-el-addons' ),
|
244 |
+
],
|
245 |
+
] );
|
246 |
+
$this->add_group_control( Group_Control_Image_Size::get_type(), [
|
247 |
+
'name' => 'thumbnail_size',
|
248 |
+
'label' => __( 'Team Member Image Size', 'livemesh-el-addons' ),
|
249 |
+
'default' => 'full',
|
250 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
251 |
$this->end_controls_section();
|
252 |
+
$this->start_controls_section( 'section_grid_settings', [
|
253 |
+
'label' => __( 'Grid Settings', 'livemesh-el-addons' ),
|
254 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
255 |
+
'condition' => [
|
256 |
+
'style' => 'style1',
|
257 |
+
],
|
258 |
+
] );
|
259 |
+
$this->add_control( 'column_layout', [
|
260 |
+
'label' => __( 'Column Layout', 'livemesh-el-addons' ),
|
261 |
+
'type' => Controls_Manager::SELECT,
|
262 |
+
'options' => array(
|
263 |
+
'auto' => __( 'Auto', 'livemesh-el-addons' ),
|
264 |
+
'custom' => __( 'Custom', 'livemesh-el-addons' ),
|
265 |
+
),
|
266 |
+
'default' => 'auto',
|
267 |
+
'description' => __( 'Set column layout to be <strong>Auto</strong> to let the widget auto calculate number of columns based on minimum column size specified. The option <strong>Custom</strong> lets you explicitly control number of columns based on screen width.', 'livemesh-el-addons' ),
|
268 |
+
] );
|
269 |
+
$this->add_control( 'min_column_size', [
|
270 |
+
'label' => __( 'Minimum Column Size', 'livemesh-el-addons' ),
|
271 |
+
'type' => Controls_Manager::SLIDER,
|
272 |
+
'size_units' => [ 'px' ],
|
273 |
+
'default' => [
|
274 |
+
'size' => 300,
|
275 |
+
],
|
276 |
+
'range' => [
|
277 |
+
'px' => [
|
278 |
+
'min' => 50,
|
279 |
+
'max' => 500,
|
280 |
+
],
|
281 |
+
],
|
282 |
+
'selectors' => [
|
283 |
+
'{{WRAPPER}} .lae-uber-grid-container.lae-grid-auto-column-layout' => 'grid-template-columns: repeat(auto-fit, minmax({{SIZE}}{{UNIT}}, 1fr));',
|
284 |
+
],
|
285 |
+
'condition' => [
|
286 |
+
'column_layout' => 'auto',
|
287 |
+
],
|
288 |
+
] );
|
289 |
+
$this->add_responsive_control( 'per_line', [
|
290 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
291 |
+
'type' => Controls_Manager::SELECT,
|
292 |
+
'default' => '3',
|
293 |
+
'tablet_default' => '2',
|
294 |
+
'mobile_default' => '1',
|
295 |
+
'options' => [
|
296 |
+
'1' => '1',
|
297 |
+
'2' => '2',
|
298 |
+
'3' => '3',
|
299 |
+
'4' => '4',
|
300 |
+
'5' => '5',
|
301 |
+
'6' => '6',
|
302 |
+
],
|
303 |
+
'frontend_available' => true,
|
304 |
+
'condition' => [
|
305 |
+
'column_layout' => 'custom',
|
306 |
+
],
|
307 |
+
] );
|
308 |
+
$this->add_control( 'column_gap', [
|
309 |
+
'label' => __( 'Column Gap', 'livemesh-el-addons' ),
|
310 |
+
'type' => Controls_Manager::SLIDER,
|
311 |
+
'size_units' => [ 'px' ],
|
312 |
+
'default' => [
|
313 |
+
'size' => 30,
|
314 |
+
],
|
315 |
+
'range' => [
|
316 |
+
'px' => [
|
317 |
+
'min' => 0,
|
318 |
+
'max' => 100,
|
319 |
+
],
|
320 |
+
],
|
321 |
+
'selectors' => [
|
322 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'column-gap: {{SIZE}}{{UNIT}};',
|
323 |
+
],
|
324 |
+
] );
|
325 |
+
$this->add_control( 'row_gap', [
|
326 |
+
'label' => __( 'Row Gap', 'livemesh-el-addons' ),
|
327 |
+
'type' => Controls_Manager::SLIDER,
|
328 |
+
'size_units' => [ 'px' ],
|
329 |
+
'default' => [
|
330 |
+
'size' => 30,
|
331 |
+
],
|
332 |
+
'range' => [
|
333 |
+
'px' => [
|
334 |
+
'min' => 0,
|
335 |
+
'max' => 100,
|
336 |
+
],
|
337 |
+
],
|
338 |
+
'selectors' => [
|
339 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
340 |
+
],
|
341 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
342 |
$this->end_controls_section();
|
343 |
+
$this->start_controls_section( 'section_team_profiles_style', [
|
344 |
+
'label' => __( 'General', 'livemesh-el-addons' ),
|
345 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
346 |
+
'show_label' => false,
|
347 |
+
] );
|
348 |
+
$this->add_responsive_control( 'team_member_spacing', [
|
349 |
+
'label' => __( 'Team Member Spacing', 'livemesh-el-addons' ),
|
350 |
+
'type' => Controls_Manager::DIMENSIONS,
|
351 |
+
'size_units' => [ 'px', 'em' ],
|
352 |
+
'selectors' => [
|
353 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member-wrapper' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
354 |
+
],
|
355 |
+
'isLinked' => false,
|
356 |
+
'condition' => [
|
357 |
+
'style' => [ 'style2' ],
|
358 |
+
],
|
359 |
+
] );
|
360 |
+
$this->add_responsive_control( 'thumbnail_hover_brightness', [
|
361 |
+
'label' => __( 'Thumbnail Hover Brightness (%)', 'livemesh-el-addons' ),
|
362 |
+
'type' => Controls_Manager::SLIDER,
|
363 |
+
'default' => [
|
364 |
+
'size' => 50,
|
365 |
+
],
|
366 |
+
'range' => [
|
367 |
+
'px' => [
|
368 |
+
'max' => 100,
|
369 |
+
'min' => 1,
|
370 |
+
'step' => 1,
|
371 |
+
],
|
372 |
+
],
|
373 |
+
'selectors' => [
|
374 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member:hover .lae-image-wrapper img' => '-webkit-filter: brightness({{SIZE}}%);-moz-filter: brightness({{SIZE}}%);-ms-filter: brightness({{SIZE}}%); filter: brightness({{SIZE}}%);',
|
375 |
+
],
|
376 |
+
] );
|
377 |
+
$this->add_control( 'thumbnail_border_radius', [
|
378 |
+
'label' => __( 'Thumbnail Border Radius', 'livemesh-el-addons' ),
|
379 |
+
'type' => Controls_Manager::DIMENSIONS,
|
380 |
+
'size_units' => [ 'px', '%' ],
|
381 |
+
'selectors' => [
|
382 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-image-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
383 |
+
],
|
384 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
385 |
$this->end_controls_section();
|
386 |
+
$this->start_controls_section( 'section_team_member_title', [
|
387 |
+
'label' => __( 'Member Title', 'livemesh-el-addons' ),
|
388 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
389 |
+
] );
|
390 |
+
$this->add_control( 'title_tag', [
|
391 |
+
'label' => __( 'Title HTML Tag', 'livemesh-el-addons' ),
|
392 |
+
'type' => Controls_Manager::SELECT,
|
393 |
+
'options' => [
|
394 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
395 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
396 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
397 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
398 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
399 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
400 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
401 |
+
],
|
402 |
+
'default' => 'h3',
|
403 |
+
] );
|
404 |
+
$this->add_control( 'title_color', [
|
405 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
406 |
+
'type' => Controls_Manager::COLOR,
|
407 |
+
'selectors' => [
|
408 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-title' => 'color: {{VALUE}};',
|
409 |
+
],
|
410 |
+
] );
|
411 |
+
$this->add_control( 'title_hover_color', [
|
412 |
+
'label' => __( 'Hover Color for Link', 'livemesh-el-addons' ),
|
413 |
+
'type' => Controls_Manager::COLOR,
|
414 |
+
'selectors' => [
|
415 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-title-link:hover .lae-title' => 'color: {{VALUE}};',
|
416 |
+
],
|
417 |
+
] );
|
418 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
419 |
+
'name' => 'title_typography',
|
420 |
+
'selector' => '{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-title',
|
421 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
422 |
$this->end_controls_section();
|
423 |
+
$this->start_controls_section( 'section_team_member_position', [
|
424 |
+
'label' => __( 'Member Position', 'livemesh-el-addons' ),
|
425 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
426 |
+
] );
|
427 |
+
$this->add_control( 'position_color', [
|
428 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
429 |
+
'type' => Controls_Manager::COLOR,
|
430 |
+
'selectors' => [
|
431 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-team-member-position' => 'color: {{VALUE}};',
|
432 |
+
],
|
433 |
+
] );
|
434 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
435 |
+
'name' => 'position_typography',
|
436 |
+
'selector' => '{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-text .lae-team-member-position',
|
437 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
438 |
$this->end_controls_section();
|
439 |
+
$this->start_controls_section( 'section_team_member_details', [
|
440 |
+
'label' => __( 'Member Details', 'livemesh-el-addons' ),
|
441 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
442 |
+
] );
|
443 |
+
$this->add_control( 'text_color', [
|
444 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
445 |
+
'type' => Controls_Manager::COLOR,
|
446 |
+
'selectors' => [
|
447 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-details' => 'color: {{VALUE}};',
|
448 |
+
],
|
449 |
+
] );
|
450 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
451 |
+
'name' => 'text_typography',
|
452 |
+
'selector' => '{{WRAPPER}} .lae-team-members .lae-team-member .lae-team-member-details',
|
453 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
454 |
$this->end_controls_section();
|
455 |
+
$this->start_controls_section( 'section_social_icon_styling', [
|
456 |
+
'label' => __( 'Social Icons', 'livemesh-el-addons' ),
|
457 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
458 |
+
] );
|
459 |
+
$this->add_control( 'social_icon_size', [
|
460 |
+
'label' => __( 'Icon size in pixels', 'livemesh-el-addons' ),
|
461 |
+
'type' => Controls_Manager::SLIDER,
|
462 |
+
'size_units' => [ 'px', '%', 'em' ],
|
463 |
+
'range' => [
|
464 |
+
'px' => [
|
465 |
+
'min' => 10,
|
466 |
+
'max' => 128,
|
467 |
+
],
|
468 |
+
],
|
469 |
+
'selectors' => [
|
470 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-image-wrapper .lae-social-list i' => 'font-size: {{SIZE}}{{UNIT}};',
|
471 |
+
],
|
472 |
+
] );
|
473 |
+
$this->add_control( 'social_icon_spacing', [
|
474 |
+
'label' => __( 'Spacing', 'livemesh-el-addons' ),
|
475 |
+
'description' => __( 'Space between icons.', 'livemesh-el-addons' ),
|
476 |
+
'type' => Controls_Manager::DIMENSIONS,
|
477 |
+
'size_units' => [ 'px', '%', 'em' ],
|
478 |
+
'default' => [
|
479 |
+
'top' => 0,
|
480 |
+
'right' => 15,
|
481 |
+
'bottom' => 0,
|
482 |
+
'left' => 0,
|
483 |
+
'unit' => 'px',
|
484 |
+
],
|
485 |
+
'selectors' => [
|
486 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-social-list .lae-social-list-item' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
487 |
+
],
|
488 |
+
'isLinked' => false,
|
489 |
+
] );
|
490 |
+
$this->add_control( 'social_icon_color', [
|
491 |
+
'label' => __( 'Icon Color', 'livemesh-el-addons' ),
|
492 |
+
'type' => Controls_Manager::COLOR,
|
493 |
+
'default' => '',
|
494 |
+
'selectors' => [
|
495 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-social-list .lae-social-list-item i' => 'color: {{VALUE}};',
|
496 |
+
],
|
497 |
+
] );
|
498 |
+
$this->add_control( 'social_icon_hover_color', [
|
499 |
+
'label' => __( 'Icon Hover Color', 'livemesh-el-addons' ),
|
500 |
+
'type' => Controls_Manager::COLOR,
|
501 |
+
'default' => '',
|
502 |
+
'selectors' => [
|
503 |
+
'{{WRAPPER}} .lae-team-members .lae-team-member .lae-social-list .lae-social-list-item i:hover' => 'color: {{VALUE}};',
|
504 |
+
],
|
505 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
506 |
$this->end_controls_section();
|
|
|
507 |
}
|
508 |
+
|
509 |
+
protected function render()
|
510 |
+
{
|
511 |
$settings = $this->get_settings_for_display();
|
512 |
+
$settings = apply_filters( 'lae_team_members_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
513 |
$args['settings'] = $settings;
|
|
|
514 |
$args['widget_instance'] = $this;
|
515 |
+
lae_get_template_part( 'addons/team-members/loop', $args );
|
|
|
|
|
516 |
}
|
517 |
+
|
518 |
+
protected function content_template()
|
519 |
+
{
|
520 |
}
|
521 |
|
522 |
}
|
includes/widgets/testimonials-slider.php
CHANGED
@@ -6,51 +6,52 @@ Description: Display responsive touch friendly slider of testimonials from clien
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
return 'lae-testimonials-slider';
|
27 |
}
|
28 |
-
|
29 |
-
public function get_title()
|
30 |
-
|
|
|
31 |
}
|
32 |
-
|
33 |
-
public function get_icon()
|
|
|
34 |
return 'lae-icon-testimonials1';
|
35 |
}
|
36 |
-
|
37 |
-
public function get_categories()
|
38 |
-
|
|
|
39 |
}
|
40 |
-
|
41 |
-
public function get_custom_help_url()
|
|
|
42 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/testimonials-addons/';
|
43 |
}
|
44 |
-
|
45 |
-
public function get_script_depends()
|
46 |
-
|
47 |
-
|
48 |
-
'lae-frontend-scripts',
|
49 |
-
'lae-testimonials-slider-scripts'
|
50 |
-
];
|
51 |
}
|
52 |
-
|
53 |
-
public function get_style_depends()
|
|
|
54 |
return [
|
55 |
'lae-icomoon-styles',
|
56 |
'lae-flexslider-styles',
|
@@ -59,439 +60,290 @@ class LAE_Testimonials_Slider_Widget extends LAE_Widget_Base {
|
|
59 |
'lae-testimonials-slider-styles'
|
60 |
];
|
61 |
}
|
62 |
-
|
63 |
-
protected function _register_controls()
|
64 |
-
|
65 |
-
$this->start_controls_section(
|
66 |
-
'
|
67 |
-
|
68 |
-
'label' => __('Testimonials Slider', 'livemesh-el-addons'),
|
69 |
-
]
|
70 |
-
);
|
71 |
-
|
72 |
$repeater = new Repeater();
|
73 |
-
|
74 |
-
|
75 |
-
'
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
$repeater->add_control(
|
102 |
-
'
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
'
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
'
|
133 |
-
|
134 |
-
'label' => __('Testimonials', 'livemesh-el-addons'),
|
135 |
-
'type' => Controls_Manager::REPEATER,
|
136 |
-
'default' => [
|
137 |
-
[
|
138 |
-
'client_name' => __('Customer #1', 'livemesh-el-addons'),
|
139 |
-
'credentials' => __('CEO, Invision Inc.', 'livemesh-el-addons'),
|
140 |
-
'testimonial_text' => __('I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
141 |
-
],
|
142 |
-
[
|
143 |
-
'client_name' => __('Customer #2', 'livemesh-el-addons'),
|
144 |
-
'credentials' => __('Lead Developer, Automattic Inc', 'livemesh-el-addons'),
|
145 |
-
'testimonial_text' => __('I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
146 |
-
],
|
147 |
-
[
|
148 |
-
'client_name' => __('Customer #3', 'livemesh-el-addons'),
|
149 |
-
'credentials' => __('Store Manager, Walmart Inc', 'livemesh-el-addons'),
|
150 |
-
'testimonial_text' => __('I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
151 |
-
],
|
152 |
-
],
|
153 |
-
'fields' => $repeater->get_controls(),
|
154 |
-
'title_field' => '{{{ client_name }}}',
|
155 |
-
]
|
156 |
-
);
|
157 |
-
|
158 |
$this->end_controls_section();
|
159 |
-
|
160 |
-
|
161 |
-
'
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
169 |
-
'
|
170 |
-
|
171 |
-
|
172 |
-
|
173 |
-
|
174 |
-
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
$this->add_control(
|
182 |
-
'
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
'
|
196 |
-
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
'
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
'
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
);
|
239 |
-
|
240 |
-
$this->add_control(
|
241 |
-
'smooth_height',
|
242 |
-
[
|
243 |
-
'type' => Controls_Manager::SWITCHER,
|
244 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
245 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
246 |
-
'return_value' => 'yes',
|
247 |
-
'default' => 'no',
|
248 |
-
'label' => __('Smooth Height?', 'livemesh-el-addons'),
|
249 |
-
'description' => __('Animate the height of the slider smoothly for slides of varying height.', 'livemesh-el-addons'),
|
250 |
-
]
|
251 |
-
);
|
252 |
-
|
253 |
-
$this->add_control(
|
254 |
-
'direction_nav',
|
255 |
-
[
|
256 |
-
'type' => Controls_Manager::SWITCHER,
|
257 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
258 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
259 |
-
'return_value' => 'yes',
|
260 |
-
'separator' => 'before',
|
261 |
-
'default' => 'yes',
|
262 |
-
'label' => __('Direction Navigation?', 'livemesh-el-addons'),
|
263 |
-
'description' => __('Should the slider have direction navigation?', 'livemesh-el-addons'),
|
264 |
-
]
|
265 |
-
);
|
266 |
-
|
267 |
-
|
268 |
-
$this->add_control(
|
269 |
-
'control_nav',
|
270 |
-
[
|
271 |
-
'type' => Controls_Manager::SWITCHER,
|
272 |
-
'label_off' => __('No', 'livemesh-el-addons'),
|
273 |
-
'label_on' => __('Yes', 'livemesh-el-addons'),
|
274 |
-
'return_value' => 'yes',
|
275 |
-
'default' => 'no',
|
276 |
-
'label' => __('Navigation Controls?', 'livemesh-el-addons'),
|
277 |
-
'description' => __('Should the slider have navigation controls?', 'livemesh-el-addons'),
|
278 |
-
]
|
279 |
-
);
|
280 |
-
|
281 |
$this->end_controls_section();
|
282 |
-
|
283 |
-
|
284 |
-
'
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
'
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
'max' => 100,
|
314 |
-
],
|
315 |
-
'px' => [
|
316 |
-
'min' => 50,
|
317 |
-
'max' => 300,
|
318 |
-
],
|
319 |
-
],
|
320 |
-
'selectors' => [
|
321 |
-
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-image-wrapper img' => 'max-width: {{SIZE}}{{UNIT}};',
|
322 |
-
],
|
323 |
-
]
|
324 |
-
);
|
325 |
-
|
326 |
$this->end_controls_section();
|
327 |
-
|
328 |
-
|
329 |
-
'
|
330 |
-
|
331 |
-
|
332 |
-
|
333 |
-
|
334 |
-
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-text' => 'color: {{VALUE}};',
|
343 |
-
],
|
344 |
-
]
|
345 |
-
);
|
346 |
-
|
347 |
-
$this->add_group_control(
|
348 |
-
Group_Control_Typography::get_type(),
|
349 |
-
[
|
350 |
-
'name' => 'text_typography',
|
351 |
-
'selector' => '{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-text',
|
352 |
-
]
|
353 |
-
);
|
354 |
-
|
355 |
$this->end_controls_section();
|
356 |
-
|
357 |
-
|
358 |
-
'
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
'
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
|
385 |
-
'title_color',
|
386 |
-
[
|
387 |
-
'label' => __('Color', 'livemesh-el-addons'),
|
388 |
-
'type' => Controls_Manager::COLOR,
|
389 |
-
'selectors' => [
|
390 |
-
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-text .lae-author-name' => 'color: {{VALUE}};',
|
391 |
-
],
|
392 |
-
]
|
393 |
-
);
|
394 |
-
|
395 |
-
$this->add_group_control(
|
396 |
-
Group_Control_Typography::get_type(),
|
397 |
-
[
|
398 |
-
'name' => 'title_typography',
|
399 |
-
'selector' => '{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-text .lae-author-name',
|
400 |
-
]
|
401 |
-
);
|
402 |
-
|
403 |
$this->end_controls_section();
|
404 |
-
|
405 |
-
|
406 |
-
'
|
407 |
-
|
408 |
-
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
|
417 |
-
|
418 |
-
|
419 |
-
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-text' => 'color: {{VALUE}};',
|
420 |
-
],
|
421 |
-
]
|
422 |
-
);
|
423 |
-
|
424 |
-
$this->add_group_control(
|
425 |
-
Group_Control_Typography::get_type(),
|
426 |
-
[
|
427 |
-
'name' => 'credential_typography',
|
428 |
-
'selector' => '{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-text',
|
429 |
-
]
|
430 |
-
);
|
431 |
-
|
432 |
-
|
433 |
$this->end_controls_section();
|
434 |
-
|
435 |
-
|
436 |
-
'
|
437 |
-
|
438 |
-
|
439 |
-
|
440 |
-
|
441 |
-
|
442 |
-
|
443 |
-
|
444 |
-
'
|
445 |
-
|
446 |
-
|
447 |
-
|
448 |
-
|
449 |
-
|
450 |
-
|
451 |
-
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
);
|
460 |
-
|
461 |
-
$this->add_control(
|
462 |
-
'quote_icon_color',
|
463 |
-
[
|
464 |
-
'label' => __('Icon Color', 'livemesh-el-addons'),
|
465 |
-
'type' => Controls_Manager::COLOR,
|
466 |
-
'default' => '',
|
467 |
-
'selectors' => [
|
468 |
-
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-text i' => 'color: {{VALUE}};',
|
469 |
-
],
|
470 |
-
]
|
471 |
-
);
|
472 |
-
|
473 |
$this->end_controls_section();
|
474 |
-
|
475 |
-
|
476 |
}
|
477 |
-
|
478 |
-
protected function render()
|
479 |
-
|
480 |
$settings = $this->get_settings_for_display();
|
481 |
-
|
482 |
$settings['slider_id'] = $this->get_id();
|
483 |
-
|
484 |
-
$settings = apply_filters('lae_testimonials_slider_' . $this->get_id() . '_settings', $settings);
|
485 |
-
|
486 |
$args['settings'] = $settings;
|
487 |
-
|
488 |
$args['widget_instance'] = $this;
|
489 |
-
|
490 |
-
lae_get_template_part('addons/testimonials-slider/loop', $args);
|
491 |
-
|
492 |
}
|
493 |
-
|
494 |
-
protected function content_template()
|
|
|
495 |
}
|
496 |
|
497 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Controls_Manager ;
|
13 |
+
use Elementor\Utils ;
|
14 |
+
use Elementor\Scheme_Color ;
|
15 |
+
use Elementor\Group_Control_Typography ;
|
16 |
+
use Elementor\Scheme_Typography ;
|
17 |
+
if ( !defined( 'ABSPATH' ) ) {
|
18 |
+
exit;
|
19 |
+
}
|
20 |
+
// Exit if accessed directly
|
21 |
+
class LAE_Testimonials_Slider_Widget extends LAE_Widget_Base
|
22 |
+
{
|
23 |
+
public function get_name()
|
24 |
+
{
|
25 |
return 'lae-testimonials-slider';
|
26 |
}
|
27 |
+
|
28 |
+
public function get_title()
|
29 |
+
{
|
30 |
+
return __( 'Testimonials Slider', 'livemesh-el-addons' );
|
31 |
}
|
32 |
+
|
33 |
+
public function get_icon()
|
34 |
+
{
|
35 |
return 'lae-icon-testimonials1';
|
36 |
}
|
37 |
+
|
38 |
+
public function get_categories()
|
39 |
+
{
|
40 |
+
return array( 'livemesh-addons' );
|
41 |
}
|
42 |
+
|
43 |
+
public function get_custom_help_url()
|
44 |
+
{
|
45 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/testimonials-addons/';
|
46 |
}
|
47 |
+
|
48 |
+
public function get_script_depends()
|
49 |
+
{
|
50 |
+
return [ 'jquery-flexslider', 'lae-frontend-scripts', 'lae-testimonials-slider-scripts' ];
|
|
|
|
|
|
|
51 |
}
|
52 |
+
|
53 |
+
public function get_style_depends()
|
54 |
+
{
|
55 |
return [
|
56 |
'lae-icomoon-styles',
|
57 |
'lae-flexslider-styles',
|
60 |
'lae-testimonials-slider-styles'
|
61 |
];
|
62 |
}
|
63 |
+
|
64 |
+
protected function _register_controls()
|
65 |
+
{
|
66 |
+
$this->start_controls_section( 'section_testimonials_slider', [
|
67 |
+
'label' => __( 'Testimonials Slider', 'livemesh-el-addons' ),
|
68 |
+
] );
|
|
|
|
|
|
|
|
|
69 |
$repeater = new Repeater();
|
70 |
+
$repeater->add_control( 'client_name', [
|
71 |
+
'label' => __( 'Name', 'livemesh-el-addons' ),
|
72 |
+
'type' => Controls_Manager::TEXT,
|
73 |
+
'default' => __( 'My client name', 'livemesh-el-addons' ),
|
74 |
+
'description' => __( 'The client or customer name for the testimonial', 'livemesh-el-addons' ),
|
75 |
+
'dynamic' => [
|
76 |
+
'active' => true,
|
77 |
+
],
|
78 |
+
] );
|
79 |
+
$repeater->add_control( 'credentials', [
|
80 |
+
'label' => __( 'Client Details', 'livemesh-el-addons' ),
|
81 |
+
'type' => Controls_Manager::TEXT,
|
82 |
+
'description' => __( 'The details of the client/customer like company name, position held, company URL etc. HTML accepted.', 'livemesh-el-addons' ),
|
83 |
+
'dynamic' => [
|
84 |
+
'active' => true,
|
85 |
+
],
|
86 |
+
] );
|
87 |
+
$repeater->add_control( 'client_image', [
|
88 |
+
'label' => __( 'Customer/Client Image', 'livemesh-el-addons' ),
|
89 |
+
'type' => Controls_Manager::MEDIA,
|
90 |
+
'default' => [
|
91 |
+
'url' => Utils::get_placeholder_image_src(),
|
92 |
+
],
|
93 |
+
'label_block' => true,
|
94 |
+
'dynamic' => [
|
95 |
+
'active' => true,
|
96 |
+
],
|
97 |
+
] );
|
98 |
+
$repeater->add_control( 'testimonial_text', [
|
99 |
+
'label' => __( 'Testimonials Text', 'livemesh-el-addons' ),
|
100 |
+
'type' => Controls_Manager::WYSIWYG,
|
101 |
+
'description' => __( 'What your customer/client had to say', 'livemesh-el-addons' ),
|
102 |
+
'show_label' => false,
|
103 |
+
'dynamic' => [
|
104 |
+
'active' => true,
|
105 |
+
],
|
106 |
+
] );
|
107 |
+
$this->add_control( 'testimonials', [
|
108 |
+
'label' => __( 'Testimonials', 'livemesh-el-addons' ),
|
109 |
+
'type' => Controls_Manager::REPEATER,
|
110 |
+
'default' => [ [
|
111 |
+
'client_name' => __( 'Customer #1', 'livemesh-el-addons' ),
|
112 |
+
'credentials' => __( 'CEO, Invision Inc.', 'livemesh-el-addons' ),
|
113 |
+
'testimonial_text' => __( 'I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
114 |
+
], [
|
115 |
+
'client_name' => __( 'Customer #2', 'livemesh-el-addons' ),
|
116 |
+
'credentials' => __( 'Lead Developer, Automattic Inc', 'livemesh-el-addons' ),
|
117 |
+
'testimonial_text' => __( 'I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
118 |
+
], [
|
119 |
+
'client_name' => __( 'Customer #3', 'livemesh-el-addons' ),
|
120 |
+
'credentials' => __( 'Store Manager, Walmart Inc', 'livemesh-el-addons' ),
|
121 |
+
'testimonial_text' => __( 'I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
122 |
+
] ],
|
123 |
+
'fields' => $repeater->get_controls(),
|
124 |
+
'title_field' => '{{{ client_name }}}',
|
125 |
+
] );
|
126 |
+
$this->add_control( 'upgrade_notice', [
|
127 |
+
'type' => Controls_Manager::RAW_HTML,
|
128 |
+
'separator' => 'before',
|
129 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
130 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
131 |
$this->end_controls_section();
|
132 |
+
$this->start_controls_section( 'section_settings', [
|
133 |
+
'label' => __( 'Slider Settings', 'livemesh-el-addons' ),
|
134 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
135 |
+
] );
|
136 |
+
$this->add_control( 'slide_animation', [
|
137 |
+
'label' => __( 'Animation', 'livemesh-el-addons' ),
|
138 |
+
'type' => Controls_Manager::SELECT,
|
139 |
+
'default' => 'slide',
|
140 |
+
'options' => [
|
141 |
+
'slide' => __( 'Slide', 'livemesh-el-addons' ),
|
142 |
+
'fade' => __( 'Fade', 'livemesh-el-addons' ),
|
143 |
+
],
|
144 |
+
] );
|
145 |
+
$this->add_control( 'direction', [
|
146 |
+
'label' => __( 'Direction', 'livemesh-el-addons' ),
|
147 |
+
'type' => Controls_Manager::SELECT,
|
148 |
+
'default' => 'horizontal',
|
149 |
+
'options' => [
|
150 |
+
'horizontal' => __( 'Horizontal', 'livemesh-el-addons' ),
|
151 |
+
'vertical' => __( 'Vertical', 'livemesh-el-addons' ),
|
152 |
+
],
|
153 |
+
] );
|
154 |
+
$this->add_control( 'slideshow_speed', [
|
155 |
+
'label' => __( 'Slideshow Speed', 'livemesh-el-addons' ),
|
156 |
+
'type' => Controls_Manager::NUMBER,
|
157 |
+
'default' => 5000,
|
158 |
+
] );
|
159 |
+
$this->add_control( 'animation_speed', [
|
160 |
+
'label' => __( 'Animation Speed', 'livemesh-el-addons' ),
|
161 |
+
'type' => Controls_Manager::NUMBER,
|
162 |
+
'default' => 600,
|
163 |
+
] );
|
164 |
+
$this->add_control( 'pause_on_hover', [
|
165 |
+
'type' => Controls_Manager::SWITCHER,
|
166 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
167 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
168 |
+
'return_value' => 'yes',
|
169 |
+
'separator' => 'before',
|
170 |
+
'default' => 'yes',
|
171 |
+
'label' => __( 'Pause on Hover?', 'livemesh-el-addons' ),
|
172 |
+
'description' => __( 'Should the slider pause on mouse hover over the slider.', 'livemesh-el-addons' ),
|
173 |
+
] );
|
174 |
+
$this->add_control( 'pause_on_action', [
|
175 |
+
'type' => Controls_Manager::SWITCHER,
|
176 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
177 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
178 |
+
'return_value' => 'yes',
|
179 |
+
'default' => 'no',
|
180 |
+
'label' => __( 'Pause slider on action?', 'livemesh-el-addons' ),
|
181 |
+
'description' => __( 'Should the slideshow pause once user initiates an action using navigation/direction controls.', 'livemesh-el-addons' ),
|
182 |
+
] );
|
183 |
+
$this->add_control( 'smooth_height', [
|
184 |
+
'type' => Controls_Manager::SWITCHER,
|
185 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
186 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
187 |
+
'return_value' => 'yes',
|
188 |
+
'default' => 'no',
|
189 |
+
'label' => __( 'Smooth Height?', 'livemesh-el-addons' ),
|
190 |
+
'description' => __( 'Animate the height of the slider smoothly for slides of varying height.', 'livemesh-el-addons' ),
|
191 |
+
] );
|
192 |
+
$this->add_control( 'direction_nav', [
|
193 |
+
'type' => Controls_Manager::SWITCHER,
|
194 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
195 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
196 |
+
'return_value' => 'yes',
|
197 |
+
'separator' => 'before',
|
198 |
+
'default' => 'yes',
|
199 |
+
'label' => __( 'Direction Navigation?', 'livemesh-el-addons' ),
|
200 |
+
'description' => __( 'Should the slider have direction navigation?', 'livemesh-el-addons' ),
|
201 |
+
] );
|
202 |
+
$this->add_control( 'control_nav', [
|
203 |
+
'type' => Controls_Manager::SWITCHER,
|
204 |
+
'label_off' => __( 'No', 'livemesh-el-addons' ),
|
205 |
+
'label_on' => __( 'Yes', 'livemesh-el-addons' ),
|
206 |
+
'return_value' => 'yes',
|
207 |
+
'default' => 'no',
|
208 |
+
'label' => __( 'Navigation Controls?', 'livemesh-el-addons' ),
|
209 |
+
'description' => __( 'Should the slider have navigation controls?', 'livemesh-el-addons' ),
|
210 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
211 |
$this->end_controls_section();
|
212 |
+
$this->start_controls_section( 'section_testimonials_thumbnail', [
|
213 |
+
'label' => __( 'Author Thumbnail', 'livemesh-el-addons' ),
|
214 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
215 |
+
'show_label' => false,
|
216 |
+
] );
|
217 |
+
$this->add_control( 'thumbnail_border_radius', [
|
218 |
+
'label' => __( 'Author Thumbnail Border Radius', 'livemesh-el-addons' ),
|
219 |
+
'type' => Controls_Manager::DIMENSIONS,
|
220 |
+
'size_units' => [ 'px', '%' ],
|
221 |
+
'selectors' => [
|
222 |
+
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-image-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
223 |
+
],
|
224 |
+
] );
|
225 |
+
$this->add_control( 'thumbnail_size', [
|
226 |
+
'label' => __( 'Author Thumbnail Size', 'livemesh-el-addons' ),
|
227 |
+
'type' => Controls_Manager::SLIDER,
|
228 |
+
'size_units' => [ '%', 'px' ],
|
229 |
+
'range' => [
|
230 |
+
'%' => [
|
231 |
+
'min' => 10,
|
232 |
+
'max' => 100,
|
233 |
+
],
|
234 |
+
'px' => [
|
235 |
+
'min' => 50,
|
236 |
+
'max' => 300,
|
237 |
+
],
|
238 |
+
],
|
239 |
+
'selectors' => [
|
240 |
+
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-image-wrapper img' => 'max-width: {{SIZE}}{{UNIT}};',
|
241 |
+
],
|
242 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
243 |
$this->end_controls_section();
|
244 |
+
$this->start_controls_section( 'section_testimonials_text', [
|
245 |
+
'label' => __( 'Author Testimonial', 'livemesh-el-addons' ),
|
246 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
247 |
+
] );
|
248 |
+
$this->add_control( 'text_color', [
|
249 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
250 |
+
'type' => Controls_Manager::COLOR,
|
251 |
+
'selectors' => [
|
252 |
+
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-text' => 'color: {{VALUE}};',
|
253 |
+
],
|
254 |
+
] );
|
255 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
256 |
+
'name' => 'text_typography',
|
257 |
+
'selector' => '{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-text',
|
258 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
259 |
$this->end_controls_section();
|
260 |
+
$this->start_controls_section( 'section_testimonials_author_name', [
|
261 |
+
'label' => __( 'Author Name', 'livemesh-el-addons' ),
|
262 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
263 |
+
] );
|
264 |
+
$this->add_control( 'title_tag', [
|
265 |
+
'label' => __( 'Title HTML Tag', 'livemesh-el-addons' ),
|
266 |
+
'type' => Controls_Manager::SELECT,
|
267 |
+
'options' => [
|
268 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
269 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
270 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
271 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
272 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
273 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
274 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
275 |
+
],
|
276 |
+
'default' => 'h4',
|
277 |
+
] );
|
278 |
+
$this->add_control( 'title_color', [
|
279 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
280 |
+
'type' => Controls_Manager::COLOR,
|
281 |
+
'selectors' => [
|
282 |
+
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-text .lae-author-name' => 'color: {{VALUE}};',
|
283 |
+
],
|
284 |
+
] );
|
285 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
286 |
+
'name' => 'title_typography',
|
287 |
+
'selector' => '{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-text .lae-author-name',
|
288 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
$this->end_controls_section();
|
290 |
+
$this->start_controls_section( 'section_testimonials_author_credentials', [
|
291 |
+
'label' => __( 'Author Credentials', 'livemesh-el-addons' ),
|
292 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
293 |
+
] );
|
294 |
+
$this->add_control( 'credential_color', [
|
295 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
296 |
+
'type' => Controls_Manager::COLOR,
|
297 |
+
'selectors' => [
|
298 |
+
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-text' => 'color: {{VALUE}};',
|
299 |
+
],
|
300 |
+
] );
|
301 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
302 |
+
'name' => 'credential_typography',
|
303 |
+
'selector' => '{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-user .lae-text',
|
304 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
$this->end_controls_section();
|
306 |
+
$this->start_controls_section( 'section_quote_icon_styling', [
|
307 |
+
'label' => __( 'Quote Icon', 'livemesh-el-addons' ),
|
308 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
309 |
+
] );
|
310 |
+
$this->add_control( 'quote_icon_size', [
|
311 |
+
'label' => __( 'Icon size in pixels', 'livemesh-el-addons' ),
|
312 |
+
'type' => Controls_Manager::SLIDER,
|
313 |
+
'size_units' => [ 'px', '%', 'em' ],
|
314 |
+
'range' => [
|
315 |
+
'px' => [
|
316 |
+
'min' => 10,
|
317 |
+
'max' => 128,
|
318 |
+
],
|
319 |
+
],
|
320 |
+
'selectors' => [
|
321 |
+
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-text i' => 'font-size: {{SIZE}}{{UNIT}};',
|
322 |
+
],
|
323 |
+
] );
|
324 |
+
$this->add_control( 'quote_icon_color', [
|
325 |
+
'label' => __( 'Icon Color', 'livemesh-el-addons' ),
|
326 |
+
'type' => Controls_Manager::COLOR,
|
327 |
+
'default' => '',
|
328 |
+
'selectors' => [
|
329 |
+
'{{WRAPPER}} .lae-testimonials-slider .lae-testimonial-text i' => 'color: {{VALUE}};',
|
330 |
+
],
|
331 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
332 |
$this->end_controls_section();
|
|
|
|
|
333 |
}
|
334 |
+
|
335 |
+
protected function render()
|
336 |
+
{
|
337 |
$settings = $this->get_settings_for_display();
|
|
|
338 |
$settings['slider_id'] = $this->get_id();
|
339 |
+
$settings = apply_filters( 'lae_testimonials_slider_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
340 |
$args['settings'] = $settings;
|
|
|
341 |
$args['widget_instance'] = $this;
|
342 |
+
lae_get_template_part( 'addons/testimonials-slider/loop', $args );
|
|
|
|
|
343 |
}
|
344 |
+
|
345 |
+
protected function content_template()
|
346 |
+
{
|
347 |
}
|
348 |
|
349 |
}
|
includes/widgets/testimonials.php
CHANGED
@@ -6,498 +6,358 @@ Description: Display testimonials from your clients/customers in a multi-column
|
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
9 |
-
|
10 |
namespace LivemeshAddons\Widgets;
|
11 |
|
12 |
-
use
|
13 |
-
use
|
14 |
-
use
|
15 |
-
use
|
16 |
-
use
|
17 |
-
use
|
18 |
-
use
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
return 'lae-testimonials';
|
28 |
}
|
29 |
-
|
30 |
-
public function get_title()
|
31 |
-
|
|
|
32 |
}
|
33 |
-
|
34 |
-
public function get_icon()
|
|
|
35 |
return 'lae-icon-testimonials3';
|
36 |
}
|
37 |
-
|
38 |
-
public function get_categories()
|
39 |
-
|
|
|
40 |
}
|
41 |
-
|
42 |
-
public function get_custom_help_url()
|
|
|
43 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/testimonials-addons/';
|
44 |
}
|
45 |
-
|
46 |
-
public function get_script_depends()
|
47 |
-
|
48 |
-
|
49 |
-
'lae-frontend-scripts'
|
50 |
-
];
|
51 |
}
|
52 |
-
|
53 |
-
public function get_style_depends()
|
54 |
-
|
55 |
-
|
56 |
-
'lae-frontend-styles',
|
57 |
-
'lae-testimonials-styles'
|
58 |
-
];
|
59 |
}
|
60 |
-
|
61 |
-
protected function _register_controls()
|
62 |
-
|
63 |
-
$this->start_controls_section(
|
64 |
-
'
|
65 |
-
|
66 |
-
'label' => __('Testimonials', 'livemesh-el-addons'),
|
67 |
-
]
|
68 |
-
);
|
69 |
-
|
70 |
$repeater = new Repeater();
|
71 |
-
|
72 |
-
|
73 |
-
'
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
$repeater->add_control(
|
100 |
-
'
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
129 |
-
|
130 |
-
|
131 |
-
|
132 |
-
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
138 |
-
|
139 |
-
|
140 |
-
|
141 |
-
);
|
142 |
-
|
143 |
-
$this->add_control(
|
144 |
-
'testimonials',
|
145 |
-
[
|
146 |
-
'label' => __('Testimonials', 'livemesh-el-addons'),
|
147 |
-
'type' => Controls_Manager::REPEATER,
|
148 |
-
'separator' => 'before',
|
149 |
-
'default' => [
|
150 |
-
[
|
151 |
-
'client_name' => __('Customer #1', 'livemesh-el-addons'),
|
152 |
-
'credentials' => __('CEO, Invision Inc.', 'livemesh-el-addons'),
|
153 |
-
'testimonial_text' => __('I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
154 |
-
],
|
155 |
-
[
|
156 |
-
'client_name' => __('Customer #2', 'livemesh-el-addons'),
|
157 |
-
'credentials' => __('Lead Developer, Automattic Inc', 'livemesh-el-addons'),
|
158 |
-
'testimonial_text' => __('I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
159 |
-
],
|
160 |
-
[
|
161 |
-
'client_name' => __('Customer #3', 'livemesh-el-addons'),
|
162 |
-
'credentials' => __('Store Manager, Walmart Inc', 'livemesh-el-addons'),
|
163 |
-
'testimonial_text' => __('I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons'),
|
164 |
-
],
|
165 |
-
],
|
166 |
-
'fields' => $repeater->get_controls(),
|
167 |
-
'title_field' => '{{{ client_name }}}',
|
168 |
-
]
|
169 |
-
);
|
170 |
-
|
171 |
$this->end_controls_section();
|
172 |
-
|
173 |
-
|
174 |
-
'
|
175 |
-
|
176 |
-
|
177 |
-
|
178 |
-
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
187 |
-
|
188 |
-
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
'
|
197 |
-
|
198 |
-
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
204 |
-
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
'
|
221 |
-
[
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
-
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
$this->add_control(
|
243 |
-
'
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
],
|
260 |
-
]
|
261 |
-
);
|
262 |
-
|
263 |
-
$this->add_control(
|
264 |
-
'row_gap',
|
265 |
-
[
|
266 |
-
'label' => __('Row Gap', 'livemesh-el-addons'),
|
267 |
-
'type' => Controls_Manager::SLIDER,
|
268 |
-
'size_units' => ['px'],
|
269 |
-
'default' => [
|
270 |
-
'size' => 30,
|
271 |
-
],
|
272 |
-
'range' => [
|
273 |
-
'px' => [
|
274 |
-
'min' => 0,
|
275 |
-
'max' => 100,
|
276 |
-
],
|
277 |
-
],
|
278 |
-
'selectors' => [
|
279 |
-
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
280 |
-
],
|
281 |
-
]
|
282 |
-
);
|
283 |
-
|
284 |
$this->end_controls_section();
|
285 |
-
|
286 |
-
|
287 |
-
'
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
293 |
-
|
294 |
-
|
295 |
-
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
|
301 |
-
|
302 |
-
|
303 |
-
|
304 |
-
|
305 |
-
|
306 |
-
|
307 |
-
|
308 |
-
|
309 |
-
'
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
|
315 |
-
|
316 |
-
'min' => 10,
|
317 |
-
'max' => 100,
|
318 |
-
],
|
319 |
-
'px' => [
|
320 |
-
'min' => 50,
|
321 |
-
'max' => 156,
|
322 |
-
],
|
323 |
-
],
|
324 |
-
'selectors' => [
|
325 |
-
'{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-image-wrapper img' => 'max-width: {{SIZE}}{{UNIT}};',
|
326 |
-
],
|
327 |
-
]
|
328 |
-
);
|
329 |
-
|
330 |
-
|
331 |
$this->end_controls_section();
|
332 |
-
|
333 |
-
|
334 |
-
'
|
335 |
-
|
336 |
-
|
337 |
-
|
338 |
-
|
339 |
-
|
340 |
-
|
341 |
-
|
342 |
-
|
343 |
-
'
|
344 |
-
|
345 |
-
|
346 |
-
|
347 |
-
|
348 |
-
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
'
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
[
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
);
|
376 |
-
|
377 |
-
|
378 |
-
$this->add_control(
|
379 |
-
'text_border_width',
|
380 |
-
[
|
381 |
-
'label' => __('Border Width', 'livemesh-el-addons'),
|
382 |
-
'type' => Controls_Manager::SLIDER,
|
383 |
-
'range' => [
|
384 |
-
'px' => [
|
385 |
-
'min' => 1,
|
386 |
-
'max' => 5,
|
387 |
-
],
|
388 |
-
],
|
389 |
-
'selectors' => [
|
390 |
-
'{{WRAPPER}} .lae-testimonials .lae-testimonial-text, {{WRAPPER}} .lae-testimonials .lae-testimonial-text:after' => 'border-width: {{SIZE}}{{UNIT}};',
|
391 |
-
],
|
392 |
-
]
|
393 |
-
);
|
394 |
-
|
395 |
-
|
396 |
-
$this->add_group_control(
|
397 |
-
Group_Control_Typography::get_type(),
|
398 |
-
[
|
399 |
-
'name' => 'text_typography',
|
400 |
-
'selector' => '{{WRAPPER}} .lae-testimonials .lae-testimonial-text',
|
401 |
-
]
|
402 |
-
);
|
403 |
-
|
404 |
-
|
405 |
$this->end_controls_section();
|
406 |
-
|
407 |
-
|
408 |
-
'
|
409 |
-
|
410 |
-
|
411 |
-
|
412 |
-
|
413 |
-
|
414 |
-
|
415 |
-
|
416 |
-
'
|
417 |
-
|
418 |
-
|
419 |
-
|
420 |
-
|
421 |
-
|
422 |
-
|
423 |
-
|
424 |
-
|
425 |
-
|
426 |
-
|
427 |
-
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
)
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
[
|
436 |
-
'label' => __('Color', 'livemesh-el-addons'),
|
437 |
-
'type' => Controls_Manager::COLOR,
|
438 |
-
'selectors' => [
|
439 |
-
'{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-text .lae-author-name' => 'color: {{VALUE}};',
|
440 |
-
],
|
441 |
-
]
|
442 |
-
);
|
443 |
-
|
444 |
-
$this->add_group_control(
|
445 |
-
Group_Control_Typography::get_type(),
|
446 |
-
[
|
447 |
-
'name' => 'title_typography',
|
448 |
-
'selector' => '{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-text .lae-author-name',
|
449 |
-
]
|
450 |
-
);
|
451 |
-
|
452 |
$this->end_controls_section();
|
453 |
-
|
454 |
-
|
455 |
-
'
|
456 |
-
|
457 |
-
|
458 |
-
|
459 |
-
|
460 |
-
|
461 |
-
|
462 |
-
|
463 |
-
|
464 |
-
|
465 |
-
|
466 |
-
|
467 |
-
|
468 |
-
'{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-text' => 'color: {{VALUE}};',
|
469 |
-
],
|
470 |
-
]
|
471 |
-
);
|
472 |
-
|
473 |
-
$this->add_group_control(
|
474 |
-
Group_Control_Typography::get_type(),
|
475 |
-
[
|
476 |
-
'name' => 'credential_typography',
|
477 |
-
'selector' => '{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-text',
|
478 |
-
]
|
479 |
-
);
|
480 |
-
|
481 |
-
|
482 |
$this->end_controls_section();
|
483 |
-
|
484 |
}
|
485 |
-
|
486 |
-
protected function render()
|
487 |
-
|
488 |
$settings = $this->get_settings_for_display();
|
489 |
-
|
490 |
-
$settings = apply_filters('lae_testimonials_' . $this->get_id() . '_settings', $settings);
|
491 |
-
|
492 |
$args['settings'] = $settings;
|
493 |
-
|
494 |
$args['widget_instance'] = $this;
|
495 |
-
|
496 |
-
lae_get_template_part('addons/testimonials/loop', $args);
|
497 |
-
|
498 |
}
|
499 |
-
|
500 |
-
protected function content_template()
|
|
|
501 |
}
|
502 |
|
503 |
}
|
6 |
Author: LiveMesh
|
7 |
Author URI: https://www.livemeshthemes.com
|
8 |
*/
|
|
|
9 |
namespace LivemeshAddons\Widgets;
|
10 |
|
11 |
+
use Elementor\Repeater ;
|
12 |
+
use Elementor\Widget_Base ;
|
13 |
+
use Elementor\Controls_Manager ;
|
14 |
+
use Elementor\Utils ;
|
15 |
+
use Elementor\Scheme_Color ;
|
16 |
+
use Elementor\Group_Control_Typography ;
|
17 |
+
use Elementor\Scheme_Typography ;
|
18 |
+
if ( !defined( 'ABSPATH' ) ) {
|
19 |
+
exit;
|
20 |
+
}
|
21 |
+
// Exit if accessed directly
|
22 |
+
class LAE_Testimonials_Widget extends LAE_Widget_Base
|
23 |
+
{
|
24 |
+
public function get_name()
|
25 |
+
{
|
26 |
return 'lae-testimonials';
|
27 |
}
|
28 |
+
|
29 |
+
public function get_title()
|
30 |
+
{
|
31 |
+
return __( 'Testimonials', 'livemesh-el-addons' );
|
32 |
}
|
33 |
+
|
34 |
+
public function get_icon()
|
35 |
+
{
|
36 |
return 'lae-icon-testimonials3';
|
37 |
}
|
38 |
+
|
39 |
+
public function get_categories()
|
40 |
+
{
|
41 |
+
return array( 'livemesh-addons' );
|
42 |
}
|
43 |
+
|
44 |
+
public function get_custom_help_url()
|
45 |
+
{
|
46 |
return 'https://livemeshelementor.com/docs/livemesh-addons/core-addons/testimonials-addons/';
|
47 |
}
|
48 |
+
|
49 |
+
public function get_script_depends()
|
50 |
+
{
|
51 |
+
return [ 'lae-waypoints', 'lae-frontend-scripts' ];
|
|
|
|
|
52 |
}
|
53 |
+
|
54 |
+
public function get_style_depends()
|
55 |
+
{
|
56 |
+
return [ 'lae-animate-styles', 'lae-frontend-styles', 'lae-testimonials-styles' ];
|
|
|
|
|
|
|
57 |
}
|
58 |
+
|
59 |
+
protected function _register_controls()
|
60 |
+
{
|
61 |
+
$this->start_controls_section( 'section_testimonials', [
|
62 |
+
'label' => __( 'Testimonials', 'livemesh-el-addons' ),
|
63 |
+
] );
|
|
|
|
|
|
|
|
|
64 |
$repeater = new Repeater();
|
65 |
+
$repeater->add_control( 'client_name', [
|
66 |
+
'label' => __( 'Name', 'livemesh-el-addons' ),
|
67 |
+
'type' => Controls_Manager::TEXT,
|
68 |
+
'default' => __( 'My client name', 'livemesh-el-addons' ),
|
69 |
+
'description' => __( 'The client or customer name for the testimonial', 'livemesh-el-addons' ),
|
70 |
+
'dynamic' => [
|
71 |
+
'active' => true,
|
72 |
+
],
|
73 |
+
] );
|
74 |
+
$repeater->add_control( 'credentials', [
|
75 |
+
'label' => __( 'Client Details', 'livemesh-el-addons' ),
|
76 |
+
'type' => Controls_Manager::TEXT,
|
77 |
+
'description' => __( 'The details of the client/customer like company name, credential held, company URL etc. HTML accepted.', 'livemesh-el-addons' ),
|
78 |
+
'dynamic' => [
|
79 |
+
'active' => true,
|
80 |
+
],
|
81 |
+
] );
|
82 |
+
$repeater->add_control( 'client_image', [
|
83 |
+
'label' => __( 'Customer/Client Image', 'livemesh-el-addons' ),
|
84 |
+
'type' => Controls_Manager::MEDIA,
|
85 |
+
'default' => [
|
86 |
+
'url' => Utils::get_placeholder_image_src(),
|
87 |
+
],
|
88 |
+
'label_block' => true,
|
89 |
+
'dynamic' => [
|
90 |
+
'active' => true,
|
91 |
+
],
|
92 |
+
] );
|
93 |
+
$repeater->add_control( 'testimonial_text', [
|
94 |
+
'label' => __( 'Testimonials Text', 'livemesh-el-addons' ),
|
95 |
+
'type' => Controls_Manager::WYSIWYG,
|
96 |
+
'description' => __( 'What your customer/client had to say', 'livemesh-el-addons' ),
|
97 |
+
'show_label' => false,
|
98 |
+
'dynamic' => [
|
99 |
+
'active' => true,
|
100 |
+
],
|
101 |
+
] );
|
102 |
+
$repeater->add_control( "widget_animation", [
|
103 |
+
"type" => Controls_Manager::SELECT,
|
104 |
+
"label" => __( "Animation Type", "livemesh-el-addons" ),
|
105 |
+
'options' => lae_get_animation_options(),
|
106 |
+
'default' => 'none',
|
107 |
+
'dynamic' => [
|
108 |
+
'active' => true,
|
109 |
+
],
|
110 |
+
] );
|
111 |
+
$this->add_control( 'testimonials', [
|
112 |
+
'label' => __( 'Testimonials', 'livemesh-el-addons' ),
|
113 |
+
'type' => Controls_Manager::REPEATER,
|
114 |
+
'separator' => 'before',
|
115 |
+
'default' => [ [
|
116 |
+
'client_name' => __( 'Customer #1', 'livemesh-el-addons' ),
|
117 |
+
'credentials' => __( 'CEO, Invision Inc.', 'livemesh-el-addons' ),
|
118 |
+
'testimonial_text' => __( 'I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
119 |
+
], [
|
120 |
+
'client_name' => __( 'Customer #2', 'livemesh-el-addons' ),
|
121 |
+
'credentials' => __( 'Lead Developer, Automattic Inc', 'livemesh-el-addons' ),
|
122 |
+
'testimonial_text' => __( 'I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
123 |
+
], [
|
124 |
+
'client_name' => __( 'Customer #3', 'livemesh-el-addons' ),
|
125 |
+
'credentials' => __( 'Store Manager, Walmart Inc', 'livemesh-el-addons' ),
|
126 |
+
'testimonial_text' => __( 'I am testimonial text. Click edit button to change this text. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut elit tellus, luctus nec ullamcorper mattis, pulvinar dapibus leo.', 'livemesh-el-addons' ),
|
127 |
+
] ],
|
128 |
+
'fields' => $repeater->get_controls(),
|
129 |
+
'title_field' => '{{{ client_name }}}',
|
130 |
+
] );
|
131 |
+
$this->add_control( 'upgrade_notice', [
|
132 |
+
'type' => Controls_Manager::RAW_HTML,
|
133 |
+
'separator' => 'before',
|
134 |
+
'raw' => '<div style="text-align:center;line-height:1.6;"><p>' . __( 'Unlock new possibilities with premium widgets and styles of <strong>Livemesh Addons for Elementor <i>Premium</i></strong>. ', 'livemesh-el-addons' ) . '</p><p style="padding-top:15px;"><a class="elementor-button elementor-button-default elementor-button-go-pro" href="https://livemeshelementor.com/pricing/#pricing-plans" target="_blank"><i class="fa fa-hand-o-right" aria-hidden="true"></i>' . __( 'Go Pro', 'livemesh-el-addons' ) . '</a></p></div>',
|
135 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
$this->end_controls_section();
|
137 |
+
$this->start_controls_section( 'section_grid_settings', [
|
138 |
+
'label' => __( 'Grid Settings', 'livemesh-el-addons' ),
|
139 |
+
'tab' => Controls_Manager::TAB_SETTINGS,
|
140 |
+
] );
|
141 |
+
$this->add_control( 'column_layout', [
|
142 |
+
'label' => __( 'Column Layout', 'livemesh-el-addons' ),
|
143 |
+
'type' => Controls_Manager::SELECT,
|
144 |
+
'options' => array(
|
145 |
+
'auto' => __( 'Auto', 'livemesh-el-addons' ),
|
146 |
+
'custom' => __( 'Custom', 'livemesh-el-addons' ),
|
147 |
+
),
|
148 |
+
'default' => 'auto',
|
149 |
+
'description' => __( 'Set column layout to be <strong>Auto</strong> to let the widget auto calculate number of columns based on minimum column size specified. The option <strong>Custom</strong> lets you explicitly control number of columns based on screen width.', 'livemesh-el-addons' ),
|
150 |
+
] );
|
151 |
+
$this->add_control( 'min_column_size', [
|
152 |
+
'label' => __( 'Minimum Column Size', 'livemesh-el-addons' ),
|
153 |
+
'type' => Controls_Manager::SLIDER,
|
154 |
+
'size_units' => [ 'px' ],
|
155 |
+
'default' => [
|
156 |
+
'size' => 300,
|
157 |
+
],
|
158 |
+
'range' => [
|
159 |
+
'px' => [
|
160 |
+
'min' => 50,
|
161 |
+
'max' => 500,
|
162 |
+
],
|
163 |
+
],
|
164 |
+
'selectors' => [
|
165 |
+
'{{WRAPPER}} .lae-uber-grid-container.lae-grid-auto-column-layout' => 'grid-template-columns: repeat(auto-fit, minmax({{SIZE}}{{UNIT}}, 1fr));',
|
166 |
+
],
|
167 |
+
'condition' => [
|
168 |
+
'column_layout' => 'auto',
|
169 |
+
],
|
170 |
+
] );
|
171 |
+
$this->add_responsive_control( 'per_line', [
|
172 |
+
'label' => __( 'Columns per row', 'livemesh-el-addons' ),
|
173 |
+
'type' => Controls_Manager::SELECT,
|
174 |
+
'default' => '3',
|
175 |
+
'tablet_default' => '2',
|
176 |
+
'mobile_default' => '1',
|
177 |
+
'options' => [
|
178 |
+
'1' => '1',
|
179 |
+
'2' => '2',
|
180 |
+
'3' => '3',
|
181 |
+
'4' => '4',
|
182 |
+
'5' => '5',
|
183 |
+
'6' => '6',
|
184 |
+
],
|
185 |
+
'frontend_available' => true,
|
186 |
+
'condition' => [
|
187 |
+
'column_layout' => 'custom',
|
188 |
+
],
|
189 |
+
] );
|
190 |
+
$this->add_control( 'column_gap', [
|
191 |
+
'label' => __( 'Column Gap', 'livemesh-el-addons' ),
|
192 |
+
'type' => Controls_Manager::SLIDER,
|
193 |
+
'size_units' => [ 'px' ],
|
194 |
+
'default' => [
|
195 |
+
'size' => 30,
|
196 |
+
],
|
197 |
+
'range' => [
|
198 |
+
'px' => [
|
199 |
+
'min' => 0,
|
200 |
+
'max' => 100,
|
201 |
+
],
|
202 |
+
],
|
203 |
+
'selectors' => [
|
204 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'column-gap: {{SIZE}}{{UNIT}};',
|
205 |
+
],
|
206 |
+
] );
|
207 |
+
$this->add_control( 'row_gap', [
|
208 |
+
'label' => __( 'Row Gap', 'livemesh-el-addons' ),
|
209 |
+
'type' => Controls_Manager::SLIDER,
|
210 |
+
'size_units' => [ 'px' ],
|
211 |
+
'default' => [
|
212 |
+
'size' => 30,
|
213 |
+
],
|
214 |
+
'range' => [
|
215 |
+
'px' => [
|
216 |
+
'min' => 0,
|
217 |
+
'max' => 100,
|
218 |
+
],
|
219 |
+
],
|
220 |
+
'selectors' => [
|
221 |
+
'{{WRAPPER}} .lae-uber-grid-container' => 'row-gap: {{SIZE}}{{UNIT}};',
|
222 |
+
],
|
223 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
$this->end_controls_section();
|
225 |
+
$this->start_controls_section( 'section_testimonials_thumbnail', [
|
226 |
+
'label' => __( 'Author Thumbnail', 'livemesh-el-addons' ),
|
227 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
228 |
+
'show_label' => false,
|
229 |
+
] );
|
230 |
+
$this->add_control( 'thumbnail_border_radius', [
|
231 |
+
'label' => __( 'Thumbnail Border Radius', 'livemesh-el-addons' ),
|
232 |
+
'type' => Controls_Manager::DIMENSIONS,
|
233 |
+
'size_units' => [ 'px', '%' ],
|
234 |
+
'selectors' => [
|
235 |
+
'{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-image-wrapper img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
236 |
+
],
|
237 |
+
] );
|
238 |
+
$this->add_control( 'thumbnail_size', [
|
239 |
+
'label' => __( 'Thumbnail Size', 'livemesh-el-addons' ),
|
240 |
+
'type' => Controls_Manager::SLIDER,
|
241 |
+
'size_units' => [ '%', 'px' ],
|
242 |
+
'range' => [
|
243 |
+
'%' => [
|
244 |
+
'min' => 10,
|
245 |
+
'max' => 100,
|
246 |
+
],
|
247 |
+
'px' => [
|
248 |
+
'min' => 50,
|
249 |
+
'max' => 156,
|
250 |
+
],
|
251 |
+
],
|
252 |
+
'selectors' => [
|
253 |
+
'{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-image-wrapper img' => 'max-width: {{SIZE}}{{UNIT}};',
|
254 |
+
],
|
255 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
256 |
$this->end_controls_section();
|
257 |
+
$this->start_controls_section( 'section_testimonials_text', [
|
258 |
+
'label' => __( 'Author Testimonial', 'livemesh-el-addons' ),
|
259 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
260 |
+
] );
|
261 |
+
$this->add_responsive_control( 'text_padding', [
|
262 |
+
'label' => __( 'Text Padding', 'livemesh-el-addons' ),
|
263 |
+
'type' => Controls_Manager::DIMENSIONS,
|
264 |
+
'size_units' => [ 'px', 'em' ],
|
265 |
+
'selectors' => [
|
266 |
+
'{{WRAPPER}} .lae-testimonials .lae-testimonial-text' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
|
267 |
+
],
|
268 |
+
'isLinked' => false,
|
269 |
+
] );
|
270 |
+
$this->add_control( 'text_color', [
|
271 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
272 |
+
'type' => Controls_Manager::COLOR,
|
273 |
+
'selectors' => [
|
274 |
+
'{{WRAPPER}} .lae-testimonials .lae-testimonial-text' => 'color: {{VALUE}};',
|
275 |
+
],
|
276 |
+
] );
|
277 |
+
$this->add_control( 'text_border_color', [
|
278 |
+
'label' => __( 'Border Color', 'livemesh-el-addons' ),
|
279 |
+
'type' => Controls_Manager::COLOR,
|
280 |
+
'selectors' => [
|
281 |
+
'{{WRAPPER}} .lae-testimonials .lae-testimonial-text, {{WRAPPER}} .lae-testimonials .lae-testimonial-text:after' => 'border-color: {{VALUE}};',
|
282 |
+
],
|
283 |
+
] );
|
284 |
+
$this->add_control( 'text_border_width', [
|
285 |
+
'label' => __( 'Border Width', 'livemesh-el-addons' ),
|
286 |
+
'type' => Controls_Manager::SLIDER,
|
287 |
+
'range' => [
|
288 |
+
'px' => [
|
289 |
+
'min' => 1,
|
290 |
+
'max' => 5,
|
291 |
+
],
|
292 |
+
],
|
293 |
+
'selectors' => [
|
294 |
+
'{{WRAPPER}} .lae-testimonials .lae-testimonial-text, {{WRAPPER}} .lae-testimonials .lae-testimonial-text:after' => 'border-width: {{SIZE}}{{UNIT}};',
|
295 |
+
],
|
296 |
+
] );
|
297 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
298 |
+
'name' => 'text_typography',
|
299 |
+
'selector' => '{{WRAPPER}} .lae-testimonials .lae-testimonial-text',
|
300 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
301 |
$this->end_controls_section();
|
302 |
+
$this->start_controls_section( 'section_testimonials_author_name', [
|
303 |
+
'label' => __( 'Author Name', 'livemesh-el-addons' ),
|
304 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
305 |
+
] );
|
306 |
+
$this->add_control( 'title_tag', [
|
307 |
+
'label' => __( 'Title HTML Tag', 'livemesh-el-addons' ),
|
308 |
+
'type' => Controls_Manager::SELECT,
|
309 |
+
'options' => [
|
310 |
+
'h1' => __( 'H1', 'livemesh-el-addons' ),
|
311 |
+
'h2' => __( 'H2', 'livemesh-el-addons' ),
|
312 |
+
'h3' => __( 'H3', 'livemesh-el-addons' ),
|
313 |
+
'h4' => __( 'H4', 'livemesh-el-addons' ),
|
314 |
+
'h5' => __( 'H5', 'livemesh-el-addons' ),
|
315 |
+
'h6' => __( 'H6', 'livemesh-el-addons' ),
|
316 |
+
'div' => __( 'div', 'livemesh-el-addons' ),
|
317 |
+
],
|
318 |
+
'default' => 'h4',
|
319 |
+
] );
|
320 |
+
$this->add_control( 'title_color', [
|
321 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
322 |
+
'type' => Controls_Manager::COLOR,
|
323 |
+
'selectors' => [
|
324 |
+
'{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-text .lae-author-name' => 'color: {{VALUE}};',
|
325 |
+
],
|
326 |
+
] );
|
327 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
328 |
+
'name' => 'title_typography',
|
329 |
+
'selector' => '{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-text .lae-author-name',
|
330 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
331 |
$this->end_controls_section();
|
332 |
+
$this->start_controls_section( 'section_testimonials_author_credentials', [
|
333 |
+
'label' => __( 'Author Credentials', 'livemesh-el-addons' ),
|
334 |
+
'tab' => Controls_Manager::TAB_STYLE,
|
335 |
+
] );
|
336 |
+
$this->add_control( 'credential_color', [
|
337 |
+
'label' => __( 'Color', 'livemesh-el-addons' ),
|
338 |
+
'type' => Controls_Manager::COLOR,
|
339 |
+
'selectors' => [
|
340 |
+
'{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-text' => 'color: {{VALUE}};',
|
341 |
+
],
|
342 |
+
] );
|
343 |
+
$this->add_group_control( Group_Control_Typography::get_type(), [
|
344 |
+
'name' => 'credential_typography',
|
345 |
+
'selector' => '{{WRAPPER}} .lae-testimonials .lae-testimonial-user .lae-text',
|
346 |
+
] );
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
$this->end_controls_section();
|
|
|
348 |
}
|
349 |
+
|
350 |
+
protected function render()
|
351 |
+
{
|
352 |
$settings = $this->get_settings_for_display();
|
353 |
+
$settings = apply_filters( 'lae_testimonials_' . $this->get_id() . '_settings', $settings );
|
|
|
|
|
354 |
$args['settings'] = $settings;
|
|
|
355 |
$args['widget_instance'] = $this;
|
356 |
+
lae_get_template_part( 'addons/testimonials/loop', $args );
|
|
|
|
|
357 |
}
|
358 |
+
|
359 |
+
protected function content_template()
|
360 |
+
{
|
361 |
}
|
362 |
|
363 |
}
|
plugin.php
CHANGED
@@ -45,7 +45,7 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
|
|
45 |
public function __clone()
|
46 |
{
|
47 |
// Cloning instances of the class is forbidden
|
48 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '6.7' );
|
49 |
}
|
50 |
|
51 |
/**
|
@@ -55,7 +55,7 @@ if ( !class_exists( 'Livemesh_Elementor_Addons' ) ) {
|
|
55 |
public function __wakeup()
|
56 |
{
|
57 |
// Unserializing instances of the class is forbidden
|
58 |
-
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '6.7' );
|
59 |
}
|
60 |
|
61 |
private function setup_debug_constants()
|
45 |
public function __clone()
|
46 |
{
|
47 |
// Cloning instances of the class is forbidden
|
48 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '6.7.1' );
|
49 |
}
|
50 |
|
51 |
/**
|
55 |
public function __wakeup()
|
56 |
{
|
57 |
// Unserializing instances of the class is forbidden
|
58 |
+
_doing_it_wrong( __FUNCTION__, __( 'Cheatin’ huh?', 'livemesh-el-addons' ), '6.7.1' );
|
59 |
}
|
60 |
|
61 |
private function setup_debug_constants()
|
readme.txt
CHANGED
@@ -7,7 +7,7 @@ Tags: elementor, elementor addons, elementor extensions, elementor widgets, page
|
|
7 |
Requires at least: 4.5
|
8 |
Tested up to: 5.7
|
9 |
Requires PHP: 5.6
|
10 |
-
Stable Tag: 6.7
|
11 |
License: GPLv3
|
12 |
License URI: https://opensource.org/licenses/GPL-3.0
|
13 |
|
@@ -258,6 +258,9 @@ Email us at support[at]livemeshthemes.com and we will be happy to assist you.
|
|
258 |
|
259 |
|
260 |
|
|
|
|
|
|
|
261 |
= 6.7 =
|
262 |
* Added – New high performance, light-weight yet feature rich grid system for Services, Team Member, Testimonials, Pricing Table, Odometers, Piecharts and Clients Elementor addons.
|
263 |
* Added - Options for specifying auto column layout using minimum column size, column gap and row gap for those addons using the new grid system.
|
7 |
Requires at least: 4.5
|
8 |
Tested up to: 5.7
|
9 |
Requires PHP: 5.6
|
10 |
+
Stable Tag: 6.7.1
|
11 |
License: GPLv3
|
12 |
License URI: https://opensource.org/licenses/GPL-3.0
|
13 |
|
258 |
|
259 |
|
260 |
|
261 |
+
= 6.7.1 =
|
262 |
+
* Added – Upgrade notice on the addons
|
263 |
+
|
264 |
= 6.7 =
|
265 |
* Added – New high performance, light-weight yet feature rich grid system for Services, Team Member, Testimonials, Pricing Table, Odometers, Piecharts and Clients Elementor addons.
|
266 |
* Added - Options for specifying auto column layout using minimum column size, column gap and row gap for those addons using the new grid system.
|