PluginProbe ʕ •ᴥ•ʔ
Essential Addons for Elementor – Popular Elementor Templates & Widgets / 6.0.10
Essential Addons for Elementor – Popular Elementor Templates & Widgets v6.0.10
6.6.5 6.6.4 6.6.3 5.7.3 5.7.4 5.8.0 5.8.1 5.8.10 5.8.11 5.8.12 5.8.13 5.8.14 5.8.15 5.8.16 5.8.18 5.8.2 5.8.3 5.8.4 5.8.5 5.8.6 5.8.7 5.8.8 5.8.9 5.9.0 5.9.1 5.9.10 5.9.11 5.9.12 5.9.13 5.9.14 5.9.15 5.9.16 5.9.17 5.9.18 5.9.19 5.9.2 5.9.20 5.9.21 5.9.22 5.9.23 5.9.24 5.9.25 5.9.26 5.9.27 5.9.3 5.9.4 5.9.5 5.9.6 5.9.7 5.9.8 5.9.9 6.0.0 6.0.1 6.0.10 6.0.11 6.0.12 6.0.13 6.0.14 6.0.15 6.0.2 6.0.3 6.0.4 6.0.5 6.0.6 6.0.7 6.0.8 6.0.9 6.1.0 6.1.1 6.1.10 6.1.11 trunk 6.1.12 1.0.0 6.1.13 1.0.1 6.1.14 1.1.0 6.1.15 2.0 6.1.17 2.1 6.1.18 2.10.0 6.1.19 2.10.1 6.1.2 2.10.2 6.1.20 2.10.3 6.1.3 2.10.4 6.1.4 2.10.5 6.1.5 2.2.0 6.1.6 2.2.1 6.1.7 2.2.2 6.1.8 2.2.3 6.1.9 2.2.4 6.2.0 2.2.5 6.2.1 2.3.0 6.2.2 2.3.1 6.2.3 2.4.0 6.2.4 2.4.1 6.3.0 2.4.2 6.3.1 2.4.3 6.3.2 2.5.0 6.3.3 2.6.0 6.4.0 2.7.0 6.5.0 2.7.1 6.5.1 2.7.10 6.5.10 2.7.11 6.5.11 2.7.2 6.5.12 2.7.3 6.5.13 2.7.4 6.5.2 2.7.5 6.5.3 2.7.6 6.5.4 2.7.7 6.5.5 2.7.8 6.5.6 2.7.9 6.5.7 2.8.0 6.5.8 2.8.1 6.5.9 2.8.2 6.6.0 2.8.3 6.6.1 2.8.4 6.6.2 2.8.5 2.8.6 2.8.7 2.9.0 2.9.1 2.9.2 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8 2.9.9 3.0.0 3.0.1 3.0.2 3.0.3 3.0.4 3.0.5 3.1.0 3.1.1 3.1.2 3.1.3 3.1.4 3.1.4.1 3.1.5 3.2.0 3.3.0 3.3.1 3.3.2 3.3.3 3.4.0 3.5.0 3.5.1 3.5.2 3.6.0 3.6.1 3.6.2 3.7.0 3.7.1 3.7.2 3.8.0 3.8.1 3.8.2 3.8.3 3.8.4 3.8.5 3.9.0 3.9.1 3.9.2 3.9.3 3.9.4 4.0.0 4.0.1 4.0.2 4.0.3 4.0.4 4.1.0 4.1.1 4.1.2 4.2.0 4.2.1 4.2.2 4.2.3 4.2.4 4.3.0 4.3.1 4.3.2 4.3.3 4.3.4 4.3.5 4.3.6 4.3.7 4.3.8 4.3.9 4.4.0 4.4.1 4.5.0 4.5.1 4.5.2 4.5.3 4.5.4 4.5.5 4.6.0 4.6.1 4.6.2 4.6.3 4.6.4 4.6.5 4.6.6 4.7.0 4.7.1 4.7.2 4.7.3 4.7.4 4.7.5 4.8.0 4.8.1 4.8.2 4.8.3 4.8.4 4.9.0 4.9.1 4.9.2 4.9.3 4.9.4 4.9.5 4.9.6 4.9.7 5.0.0 5.0.1 5.0.10 5.0.11 5.0.12 5.0.13 5.0.2 5.0.3 5.0.4 5.0.5 5.0.6 5.0.7 5.0.8 5.0.9 5.1.0 5.1.1 5.1.2 5.1.3 5.1.4 5.1.5 5.1.6 5.1.7 5.1.8 5.1.9 5.2.0 5.2.1 5.2.2 5.2.3 5.2.4 5.3.0 5.3.1 5.3.2 5.4.6 5.5.5 5.6.5 5.7.2
essential-addons-for-elementor-lite / includes / Elements / Post_Timeline.php
essential-addons-for-elementor-lite / includes / Elements Last commit date
Adv_Accordion.php 1 year ago Adv_Tabs.php 1 year ago Advanced_Data_Table.php 1 year ago Better_Payment.php 4 years ago Betterdocs_Category_Box.php 1 year ago Betterdocs_Category_Grid.php 1 year ago Betterdocs_Search_Form.php 1 year ago Business_Reviews.php 1 year ago Caldera_Forms.php 1 year ago Career_Page.php 4 years ago Contact_Form_7.php 1 year ago Content_Ticker.php 1 year ago Countdown.php 1 year ago Creative_Button.php 1 year ago Cta_Box.php 1 year ago Data_Table.php 1 year ago Dual_Color_Header.php 1 year ago EmbedPress.php 4 years ago Event_Calendar.php 1 year ago Facebook_Feed.php 1 year ago Fancy_Text.php 1 year ago Feature_List.php 1 year ago Filterable_Gallery.php 1 year ago Flip_Box.php 1 year ago FluentForm.php 1 year ago Formstack.php 1 year ago GravityForms.php 1 year ago Image_Accordion.php 1 year ago Info_Box.php 1 year ago Interactive_Circle.php 1 year ago Login_Register.php 1 year ago NFT_Gallery.php 1 year ago NinjaForms.php 1 year ago Post_Grid.php 1 year ago Post_Timeline.php 1 year ago Pricing_Table.php 1 year ago Product_Grid.php 1 year ago Progress_Bar.php 1 year ago SVG_Draw.php 1 year ago Simple_Menu.php 1 year ago Sticky_Video.php 1 year ago Team_Member.php 1 year ago Testimonial.php 1 year ago Tooltip.php 1 year ago Twitter_Feed.php 1 year ago TypeForm.php 1 year ago WeForms.php 2 years ago Woo_Cart.php 1 year ago Woo_Checkout.php 1 year ago Woo_Product_Carousel.php 1 year ago Woo_Product_Compare.php 2 years ago Woo_Product_Gallery.php 1 year ago Woo_Product_List.php 1 year ago WpForms.php 1 year ago index.php 3 years ago
Post_Timeline.php
804 lines
1 <?php
2
3 namespace Essential_Addons_Elementor\Elements;
4
5 // If this file is called directly, abort.
6 if (!defined('ABSPATH')) {
7 exit;
8 }
9
10 use \Elementor\Controls_Manager;
11 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
12 use Elementor\Group_Control_Box_Shadow;
13 use \Elementor\Group_Control_Typography;
14 use \Elementor\Widget_Base;
15 use \Essential_Addons_Elementor\Classes\Helper as HelperClass;
16 use Essential_Addons_Elementor\Traits\Helper;
17
18 class Post_Timeline extends Widget_Base
19 {
20 use Helper;
21
22 protected $page_id;
23
24 public function get_name()
25 {
26 return 'eael-post-timeline';
27 }
28
29 public function get_title()
30 {
31 return __('Post Timeline', 'essential-addons-for-elementor-lite');
32 }
33
34 public function get_icon()
35 {
36 return 'eaicon-post-timeline';
37 }
38
39 public function get_categories()
40 {
41 return ['essential-addons-for-elementor-lite'];
42 }
43
44 public function get_keywords()
45 {
46 return [
47 'post',
48 'posts',
49 'timeline',
50 'ea post timeline',
51 'ea posts timeline',
52 'blog posts',
53 'content marketing',
54 'blogger',
55 'ea',
56 'essential addons',
57 ];
58 }
59
60 public function get_custom_help_url()
61 {
62 return 'https://essential-addons.com/elementor/docs/post-timeline/';
63 }
64
65 protected function register_controls()
66 {
67
68 /**
69 * Query And Layout Controls!
70 * @source includes/elementor-helper.php
71 */
72 do_action('eael/controls/query', $this);
73 do_action('eael/controls/layout', $this);
74
75 $this->start_controls_section(
76 'section_post_timeline_links',
77 [
78 'label' => __('Links', 'essential-addons-for-elementor-lite'),
79 ]
80 );
81
82 $this->add_control(
83 'timeline_link_nofollow',
84 [
85 'label' => __('No Follow', 'essential-addons-for-elementor-lite'),
86 'type' => Controls_Manager::SWITCHER,
87 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
88 'label_off' => __('No', 'essential-addons-for-elementor-lite'),
89 'return_value' => 'true',
90 ]
91 );
92
93 $this->add_control(
94 'timeline_link_target_blank',
95 [
96 'label' => __('Target Blank', 'essential-addons-for-elementor-lite'),
97 'type' => Controls_Manager::SWITCHER,
98 'label_on' => __('Yes', 'essential-addons-for-elementor-lite'),
99 'label_off' => __('No', 'essential-addons-for-elementor-lite'),
100 'return_value' => 'true',
101 ]
102 );
103
104 $this->end_controls_section();
105
106 if (!apply_filters('eael/pro_enabled', false)) {
107 HelperClass::go_premium($this);
108 }
109
110 $this->start_controls_section(
111 'eael_section_post_timeline_style',
112 [
113 'label' => __('Timeline Style', 'essential-addons-for-elementor-lite'),
114 'tab' => Controls_Manager::TAB_STYLE,
115 ]
116 );
117
118 $this->add_control(
119 'eael_timeline_display_overlay',
120 [
121 'label' => __('Show Overlay', 'essential-addons-for-elementor-lite'),
122 'type' => Controls_Manager::SWITCHER,
123 'label_on' => __('Show', 'essential-addons-for-elementor-lite'),
124 'label_off' => __('Hide', 'essential-addons-for-elementor-lite'),
125 'return_value' => 'yes',
126 'default' => 'yes',
127 'selectors' => [
128 '{{WRAPPER}} .eael-timeline-post-image' => 'opacity: .6',
129 ],
130 'condition'=> [
131 'eael_dynamic_template_Layout!' => 'card',
132 ]
133 ]
134 );
135
136 $this->add_control(
137 'eael_timeline_overlay_color',
138 [
139 'label' => __('Overlay Color', 'essential-addons-for-elementor-lite'),
140 'type' => Controls_Manager::COLOR,
141 'description' => __('Leave blank or Clear to use default gradient overlay', 'essential-addons-for-elementor-lite'),
142 'default' => 'linear-gradient(45deg, #3f3f46 0%, #05abe0 100%) repeat scroll 0 0 rgba(0, 0, 0, 0)',
143 'selectors' => [
144 '{{WRAPPER}} .eael-timeline-post-inner' => 'background: {{VALUE}}',
145 ],
146 'condition' => [
147 'eael_timeline_display_overlay' => 'yes',
148 'eael_dynamic_template_Layout!' => 'card',
149 ],
150 ]
151 );
152
153
154 $this->add_control(
155 'eael_timeline_bg_color',
156 [
157 'label' => __('Background Color', 'essential-addons-for-elementor-lite'),
158 'type' => Controls_Manager::COLOR,
159 'default' => '#3DB1C0',
160 'selectors' => [
161 '{{WRAPPER}} .eael-timeline-post-inner' => 'background: {{VALUE}}',
162 ],
163 'condition' => [
164 'eael_dynamic_template_Layout' => 'card',
165 ],
166 ]
167 );
168
169 $this->add_responsive_control(
170 'eael_post_grid_spacing',
171 [
172 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'),
173 'type' => Controls_Manager::DIMENSIONS,
174 'size_units' => ['px', '%', 'em'],
175 'selectors' => [
176 '{{WRAPPER}} .eael-timeline-post-inner' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
177 ],
178 'condition' => [
179 'eael_dynamic_template_Layout' => 'card',
180 ],
181 ]
182 );
183
184 $this->add_control(
185 'eael_post_timeline_border_radius',
186 [
187 'label' => esc_html__('Border Radius', 'essential-addons-for-elementor-lite'),
188 'type' => Controls_Manager::DIMENSIONS,
189 'selectors' => [
190 '{{WRAPPER}} .eael-timeline-post-inner' => 'border-radius: {{TOP}}px {{RIGHT}}px {{BOTTOM}}px {{LEFT}}px;',
191 ],
192 'condition' => [
193 'eael_dynamic_template_Layout' => 'card',
194 ],
195 ]
196 );
197
198 $this->add_group_control(
199 Group_Control_Box_Shadow::get_type(),
200 [
201 'name' => 'eael_post_timeline_box_shadow',
202 'selector' => '{{WRAPPER}} .eael-timeline-post-inner',
203 'condition' => [
204 'eael_dynamic_template_Layout' => 'card',
205 ],
206 ]
207 );
208
209 $this->add_control(
210 'eael_post_timeline_content_heading',
211 [
212 'label' => esc_html__('Content', 'essential-addons-for-elementor-lite'),
213 'type' => Controls_Manager::HEADING,
214 'condition' => [
215 'eael_dynamic_template_Layout' => 'card',
216 ],
217 'separator' => 'before',
218 ]
219 );
220
221 $this->add_responsive_control(
222 'eael_post_timeline_content_spacing',
223 [
224 'label' => esc_html__('Spacing', 'essential-addons-for-elementor-lite'),
225 'type' => Controls_Manager::DIMENSIONS,
226 'size_units' => ['px', '%', 'em'],
227 'selectors' => [
228 '{{WRAPPER}} .eael-timeline-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
229 ],
230 'condition' => [
231 'eael_dynamic_template_Layout' => 'card',
232 ],
233 ]
234 );
235
236 $this->add_control(
237 'eael_post_timeline_image_heading',
238 [
239 'label' => esc_html__('Image', 'essential-addons-for-elementor-lite'),
240 'type' => Controls_Manager::HEADING,
241 'separator' => 'before',
242 'condition' => [
243 'eael_dynamic_template_Layout!' => 'default',
244 ],
245 ]
246 );
247
248 $this->add_responsive_control(
249 'eael_timeline_image_height',
250 [
251 'label' => esc_html__('Height', 'essential-addons-for-elementor-lite'),
252 'type' => Controls_Manager::SLIDER,
253 'range' => [
254 'px' => [
255 'max' => 500,
256 ],
257 ],
258 'selectors' => [
259 '{{WRAPPER}} .eael-timeline-post-image' => 'height: {{SIZE}}PX;',
260 ],
261 'condition' => [
262 'eael_dynamic_template_Layout!' => 'default',
263 ],
264 ]
265 );
266
267 $this->add_control(
268 'eael_timeline_img_border_radius',
269 [
270 'label' => esc_html__('Border Radius', 'essential-addons-for-elementor-lite'),
271 'type' => Controls_Manager::DIMENSIONS,
272 'size_units' => ['px', '%'],
273 'selectors' => [
274 '{{WRAPPER}} .eael-timeline-post-image' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
275 ],
276 'condition' => [
277 'eael_dynamic_template_Layout!' => 'default',
278 ],
279 ]
280 );
281
282 $this->end_controls_section();
283
284 $this->start_controls_section(
285 'eael_section_typography',
286 [
287 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
288 'tab' => Controls_Manager::TAB_STYLE,
289 ]
290 );
291
292 $this->add_control(
293 'eael_timeline_title_style',
294 [
295 'label' => __('Title Style', 'essential-addons-for-elementor-lite'),
296 'type' => Controls_Manager::HEADING,
297 'separator' => 'before',
298 ]
299 );
300
301 $this->add_control(
302 'eael_timeline_title_color',
303 [
304 'label' => __('Title Color', 'essential-addons-for-elementor-lite'),
305 'type' => Controls_Manager::COLOR,
306 'default' => '#fff',
307 'selectors' => [
308 '{{WRAPPER}} .eael-timeline-post-title .eael-timeline-post-title-text' => 'color: {{VALUE}};',
309 '{{WRAPPER}} .timeline-layout-card .eael-timeline-post-title .eael-timeline-post-title-text-card' => 'color: {{VALUE}};',
310 ],
311
312 ]
313 );
314
315 $this->add_responsive_control(
316 'eael_timeline_title_alignment',
317 [
318 'label' => __('Title Alignment', 'essential-addons-for-elementor-lite'),
319 'type' => Controls_Manager::CHOOSE,
320 'options' => [
321 'left' => [
322 'title' => __('Left', 'essential-addons-for-elementor-lite'),
323 'icon' => 'eicon-text-align-left',
324 ],
325 'center' => [
326 'title' => __('Center', 'essential-addons-for-elementor-lite'),
327 'icon' => 'eicon-text-align-center',
328 ],
329 'right' => [
330 'title' => __('Right', 'essential-addons-for-elementor-lite'),
331 'icon' => 'eicon-text-align-right',
332 ],
333 ],
334 'selectors' => [
335 '{{WRAPPER}} .eael-timeline-post-title .eael-timeline-post-title-text' => 'text-align: {{VALUE}};',
336 '{{WRAPPER}} .eael-timeline-post-title .eael-timeline-post-title-text-card' => 'text-align: {{VALUE}};',
337 ],
338 ]
339 );
340
341 $this->add_group_control(
342 Group_Control_Typography::get_type(),
343 [
344 'name' => 'eael_timeline_title_typography',
345 'label' => __('Title Typography', 'essential-addons-for-elementor-lite'),
346 'global' => [
347 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
348 ],
349 'selector' => '{{WRAPPER}} .eael-timeline-post-title .eael-timeline-post-title-text',
350 'selector' => '{{WRAPPER}} .eael-timeline-post-title .eael-timeline-post-title-text-card',
351 ]
352 );
353
354 $this->add_control(
355 'eael_timeline_excerpt_style',
356 [
357 'label' => __('Excerpt Style', 'essential-addons-for-elementor-lite'),
358 'type' => Controls_Manager::HEADING,
359 'separator' => 'before',
360 ]
361 );
362
363 $this->add_control(
364 'eael_timeline_excerpt_color',
365 [
366 'label' => __('Excerpt Color', 'essential-addons-for-elementor-lite'),
367 'type' => Controls_Manager::COLOR,
368 'default' => '#ffffff',
369 'selectors' => [
370 '{{WRAPPER}} .eael-timeline-post-excerpt p' => 'color: {{VALUE}};',
371 ],
372 ]
373 );
374
375 $this->add_responsive_control(
376 'eael_timeline_excerpt_alignment',
377 [
378 'label' => __('Excerpt Alignment', 'essential-addons-for-elementor-lite'),
379 'type' => Controls_Manager::CHOOSE,
380 'options' => [
381 'left' => [
382 'title' => __('Left', 'essential-addons-for-elementor-lite'),
383 'icon' => 'eicon-text-align-left',
384 ],
385 'center' => [
386 'title' => __('Center', 'essential-addons-for-elementor-lite'),
387 'icon' => 'eicon-text-align-center',
388 ],
389 'right' => [
390 'title' => __('Right', 'essential-addons-for-elementor-lite'),
391 'icon' => 'eicon-text-align-right',
392 ],
393 'justify' => [
394 'title' => __('Justified', 'essential-addons-for-elementor-lite'),
395 'icon' => 'eicon-text-align-justify',
396 ],
397 ],
398 'selectors' => [
399 '{{WRAPPER}} .eael-timeline-post-excerpt p' => 'text-align: {{VALUE}};',
400 ],
401 ]
402 );
403
404 $this->add_group_control(
405 Group_Control_Typography::get_type(),
406 [
407 'name' => 'eael_timeline_excerpt_typography',
408 'label' => __('Excerpt Typography', 'essential-addons-for-elementor-lite'),
409 'global' => [
410 'default' => Global_Typography::TYPOGRAPHY_TEXT,
411 ],
412 'selector' => '{{WRAPPER}} .eael-timeline-post-excerpt p',
413 ]
414 );
415
416 $this->end_controls_section();
417
418 // Start Arrow Styling
419
420 $this->start_controls_section(
421 'eael_section_arrow',
422 [
423 'label' => __('Arrow', 'essential-addons-for-elementor-lite'),
424 'tab' => Controls_Manager::TAB_STYLE,
425 ]
426 );
427
428 $this->add_control(
429 'eael_timeline_border_color',
430 [
431 'label' => __('Border & Arrow Color', 'essential-addons-for-elementor-lite'),
432 'type' => Controls_Manager::COLOR,
433 'default' => '#e5eaed',
434 'selectors' => [
435 '{{WRAPPER}} .eael-timeline-post-inner' => 'border-color: {{VALUE}};',
436 '{{WRAPPER}} .eael-timeline-post-inner::after' => 'border-left-color: {{VALUE}};',
437 '{{WRAPPER}} .eael-timeline-post:nth-child(2n) .eael-timeline-post-inner::after' => 'border-right-color: {{VALUE}};',
438 ],
439 'condition' => [
440 'eael_dynamic_template_Layout' => 'default',
441 ],
442 ]
443 );
444
445 $this->add_control(
446 'eael_timeline_arrow_color',
447 [
448 'label' => __('Arrow Color', 'essential-addons-for-elementor-lite'),
449 'type' => Controls_Manager::COLOR,
450 'default' => '#3DB1C0',
451 'selectors' => [
452 '{{WRAPPER}} .eael-timeline-post-inner' => 'border-color: {{VALUE}};',
453 '{{WRAPPER}} .eael-timeline-post-inner::after' => 'border-left-color: {{VALUE}}; border-right-color: {{VALUE}}',
454 // '{{WRAPPER}} .eael-timeline-post:nth-child(2n) .eael-timeline-post-inner::after' => 'border-right-color: {{VALUE}};',
455 ],
456 'condition' => [
457 'eael_dynamic_template_Layout!' => 'default',
458 ],
459 ]
460 );
461
462 $this->add_responsive_control(
463 'eael_timeline_arrow_size',
464 [
465 'label' => esc_html__('Size', 'essential-addons-for-elementor-lite'),
466 'type' => Controls_Manager::SLIDER,
467 'range' => [
468 'px' => [
469 'max' => 20,
470 ],
471 ],
472 'selectors' => [
473 '{{WRAPPER}} .eael-post-timeline.timeline-layout-card .eael-timeline-post-inner:after' => 'border-width: {{SIZE}}px; right: -{{SIZE}}px; left: -{{SIZE}}px',
474 '{{WRAPPER}} .eael-post-timeline.timeline-layout-card .eael-timeline-post:nth-child(2n) .eael-timeline-post-inner:after' => 'left: -{{SIZE}}px;',
475 ],
476
477 'condition' => [
478 'eael_dynamic_template_Layout!' => 'default',
479 ],
480 ]
481 );
482
483 $this->add_control(
484 'eael_timeline_arrow_alignment',
485 [
486 'label' => __('Alignment', 'essential-addons-for-elementor-lite'),
487 'type' => Controls_Manager::CHOOSE,
488 'options' => [
489 'top' => [
490 'title' => __( 'Top', 'essential-addons-for-elementor-lite' ),
491 'icon' => 'eicon-v-align-top',
492 ],
493 'middle' => [
494 'title' => __( 'Middle', 'essential-addons-for-elementor-lite' ),
495 'icon' => 'eicon-v-align-middle',
496 ],
497 'bottom' => [
498 'title' => __( 'Bottom', 'essential-addons-for-elementor-lite' ),
499 'icon' => 'eicon-v-align-bottom',
500 ],
501 ],
502 'default' => 'top',
503 'condition' => [
504 'eael_dynamic_template_Layout!' => 'default',
505 ],
506 ]
507 );
508
509 $this->end_controls_section();
510
511 // Start Time Styling
512
513 $this->start_controls_section(
514 'eael_section_time',
515 [
516 'label' => __('Time', 'essential-addons-for-elementor-lite'),
517 'tab' => Controls_Manager::TAB_STYLE,
518 ]
519 );
520
521 $this->add_control(
522 'eael_timeline_date_background_color',
523 [
524 'label' => __('Date Background Color', 'essential-addons-for-elementor-lite'),
525 'type' => Controls_Manager::COLOR,
526 'default' => 'rgba(0, 0, 0, 0.7)',
527 'selectors' => [
528 '{{WRAPPER}} .eael-timeline-post time' => 'background-color: {{VALUE}};',
529 '{{WRAPPER}} .eael-timeline-post time::before' => 'border-bottom-color: {{VALUE}};',
530 ],
531
532 ]
533 );
534
535 $this->add_control(
536 'eael_timeline_date_color',
537 [
538 'label' => __('Date Text Color', 'essential-addons-for-elementor-lite'),
539 'type' => Controls_Manager::COLOR,
540 'default' => '#fff',
541 'selectors' => [
542 '{{WRAPPER}} .eael-timeline-post time' => 'color: {{VALUE}};',
543 ],
544
545 ]
546 );
547
548 $this->add_group_control(
549 Group_Control_Typography::get_type(),
550 [
551 'name' => 'eael_timeline_time_typography',
552 'label' => __('Typography', 'essential-addons-for-elementor-lite'),
553 'selector' => '{{WRAPPER}} time',
554 ]
555 );
556
557 $this->add_control(
558 'eael_timeline_time_padding',
559 [
560 'label' => esc_html__('Padding', 'essential-addons-for-elementor-lite'),
561 'type' => Controls_Manager::DIMENSIONS,
562 'size_units' => ['px', '%'],
563 'selectors' => [
564 '{{WRAPPER}} time' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
565 ],
566 ]
567 );
568
569 $this->add_control(
570 'eael_timeline_time_border_radius',
571 [
572 'label' => esc_html__('Border Radius', 'essential-addons-for-elementor-lite'),
573 'type' => Controls_Manager::DIMENSIONS,
574 'size_units' => ['px', '%'],
575 'selectors' => [
576 '{{WRAPPER}} time' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
577 ],
578 ]
579 );
580
581 $this->end_controls_section();
582
583 $this->start_controls_section(
584 'eael_section_line',
585 [
586 'label' => __('Line & Bullet', 'essential-addons-for-elementor-lite'),
587 'tab' => Controls_Manager::TAB_STYLE,
588 ]
589 );
590
591 $this->add_control(
592 'eael_section_post_timeline_line_heading',
593 [
594 'label' => __('Line', 'essential-addons-for-elementor-lite'),
595 'type' => Controls_Manager::HEADING,
596 'separator' => 'before',
597 ]
598 );
599
600 $this->add_control(
601 'eael_section_post_timeline_line_size',
602 [
603 'label' => __('Line Width', 'essential-addons-for-elementor-lite'),
604 'type' => Controls_Manager::SLIDER,
605 'size_units' => ['px', '%'],
606 'range' => [
607 'px' => [
608 'min' => 0,
609 'max' => 20,
610 'step' => 1,
611 ],
612 ],
613 'selectors' => [
614 '{{WRAPPER}} .eael-timeline-post:after' => 'width: {{SIZE}}{{UNIT}};',
615 ],
616 ]
617 );
618 $this->add_control(
619 'eael_section_post_timeline_line_position_from_right',
620 [
621 'label' => __('Line Position From Right', 'essential-addons-for-elementor-lite'),
622 'type' => Controls_Manager::SLIDER,
623 'size_units' => ['px'],
624 'range' => [
625 'px' => [
626 'min' => 0,
627 'max' => 20,
628 'step' => 1,
629 ],
630 ],
631 'selectors' => [
632 '{{WRAPPER}} .eael-timeline-post:after' => 'right: -{{SIZE}}{{UNIT}};',
633 ],
634 'condition'=> [
635 'eael_dynamic_template_Layout!' => 'card',
636 ]
637 ]
638 );
639
640 $this->add_control(
641 'eael_section_post_timeline_bullet_size',
642 [
643 'label' => __('Bullet Size', 'essential-addons-for-elementor-lite'),
644 'type' => Controls_Manager::SLIDER,
645 'size_units' => ['px', '%'],
646 'range' => [
647 'px' => [
648 'min' => 0,
649 'max' => 100,
650 'step' => 1,
651 ],
652 ],
653 'selectors' => [
654 '{{WRAPPER}} .eael-timeline-bullet' => 'width: {{SIZE}}{{UNIT}}; height: {{SIZE}}{{UNIT}};',
655 ],
656 ]
657 );
658 $this->add_control(
659 'eael_section_post_timeline_bullet_position_from_left',
660 [
661 'label' => __('Left-sided Bullet Positon', 'essential-addons-for-elementor-lite'),
662 'type' => Controls_Manager::SLIDER,
663 'size_units' => ['px'],
664 'range' => [
665 'px' => [
666 'min' => 0,
667 'max' => 50,
668 'step' => 1,
669 ],
670 ],
671 'selectors' => [
672 '{{WRAPPER}} .eael-timeline-bullet' => 'right: -{{SIZE}}{{UNIT}};',
673 ],
674 'condition'=> [
675 'eael_dynamic_template_Layout!' => 'card',
676 ]
677 ]
678 );
679 $this->add_control(
680 'eael_section_post_timeline_bullet_position_from_right',
681 [
682 'label' => __('Right-sided Bullet Position', 'essential-addons-for-elementor-lite'),
683 'type' => Controls_Manager::SLIDER,
684 'size_units' => ['px'],
685 'range' => [
686 'px' => [
687 'min' => 0,
688 'max' => 50,
689 'step' => 1,
690 ],
691 ],
692 'selectors' => [
693 '{{WRAPPER}} .eael-timeline-post:nth-child(2n) .eael-timeline-bullet' => 'left: -{{SIZE}}{{UNIT}};',
694 ],
695 'condition'=> [
696 'eael_dynamic_template_Layout!' => 'card',
697 ]
698 ]
699 );
700
701 $this->add_control(
702 'eael_timeline_bullet_color',
703 [
704 'label' => __('Timeline Bullet Color', 'essential-addons-for-elementor-lite'),
705 'type' => Controls_Manager::COLOR,
706 'default' => '#9fa9af',
707 'selectors' => [
708 '{{WRAPPER}} .eael-timeline-bullet' => 'background-color: {{VALUE}};',
709 ],
710
711 ]
712 );
713
714 $this->add_control(
715 'eael_timeline_bullet_border_color',
716 [
717 'label' => __('Timeline Bullet Border Color', 'essential-addons-for-elementor-lite'),
718 'type' => Controls_Manager::COLOR,
719 'default' => '#fff',
720 'selectors' => [
721 '{{WRAPPER}} .eael-timeline-bullet' => 'border-color: {{VALUE}};',
722 ],
723
724 ]
725 );
726
727 $this->add_control(
728 'eael_timeline_vertical_line_color',
729 [
730 'label' => __('Timeline Vertical Line Color', 'essential-addons-for-elementor-lite'),
731 'type' => Controls_Manager::COLOR,
732 'default' => 'rgba(83, 85, 86, .2)',
733 'selectors' => [
734 '{{WRAPPER}} .eael-timeline-post:after' => 'background-color: {{VALUE}};',
735 ],
736
737 ]
738 );
739
740 $this->end_controls_section();
741
742 do_action('eael/controls/load_more_button_style', $this);
743
744 }
745
746 protected function render()
747 {
748 $settings = $this->get_settings_for_display();
749 $settings = HelperClass::fix_old_query($settings);
750 $args = HelperClass::get_query_args($settings);
751 $args = HelperClass::get_dynamic_args($settings, $args);
752
753 $settings ['expanison_indicator'] = $settings['excerpt_expanison_indicator'];
754
755 $this->add_render_attribute(
756 'eael_post_timeline_wrapper',
757 [
758 'id' => "eael-post-timeline-{$this->get_id()}",
759 'class' => ["eael-post-timeline", "timeline-layout-{$settings['eael_dynamic_template_Layout']}", "eael-post-timeline-arrow-{$settings['eael_timeline_arrow_alignment']}"],
760 ]
761 );
762
763 $this->add_render_attribute(
764 'eael_post_timeline',
765 [
766 'class' => ['eael-post-timeline', 'eael-post-appender', "eael-post-appender-{$this->get_id()}"],
767 ]
768 );
769
770 echo '<div '; $this->print_render_attribute_string('eael_post_timeline_wrapper'); echo '>
771 <div '; $this->print_render_attribute_string('eael_post_timeline'); echo '>';
772
773 $template = $this->get_template($this->get_settings('eael_dynamic_template_Layout'));
774 $settings['loadable_file_name'] = $this->get_filename_only($template);
775 $dir_name = $this->get_temp_dir_name($settings['loadable_file_name']);
776 $found_posts = 0;
777
778 if(file_exists($template)){
779 $query = new \WP_Query($args);
780 if ($query->have_posts()) {
781 $found_posts = $query->found_posts;
782 $ppp = empty( $args['posts_per_page'] ) ? get_option( 'posts_per_page' ) : $args['posts_per_page'];
783 $max_page = ceil( $found_posts / absint( $ppp ) );
784 $args['max_page'] = $max_page;
785 while ($query->have_posts()) {
786 $query->the_post();
787 include($template);
788 }
789 } else {
790 echo '<p class="no-posts-found">' . esc_html__( 'No posts found!', 'essential-addons-for-elementor-lite' ) . '</p>';
791 }
792 wp_reset_postdata();
793 } else {
794 echo '<p class="no-posts-found">' . esc_html__( 'No layout found!', 'essential-addons-for-elementor-lite' ) . '</p>';
795 }
796 echo '</div>
797 </div>';
798
799 if ( $found_posts > $args['posts_per_page'] ) {
800 $this->print_load_more_button( $settings, $args, $dir_name );
801 }
802 }
803 }
804