PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.17.4
Shortcodes and extra features for Phlox theme v2.17.4
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / recent-posts-timeline.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 1 year ago accordion.php 1 year ago audio.php 4 years ago before-after.php 3 years ago button.php 1 year ago carousel-navigation.php 4 years ago circle-chart.php 1 year ago contact-box.php 4 years ago contact-form.php 1 year ago custom-list.php 1 year ago divider.php 4 years ago gallery.php 1 year ago gmap.php 4 years ago heading-modern.php 1 year ago icon.php 1 year ago image.php 1 year ago mailchimp.php 1 year ago modern-button.php 1 year ago products-grid.php 1 year ago quote.php 1 year ago recent-comments.php 1 year ago recent-posts-grid-carousel.php 1 year ago recent-posts-land-style.php 1 year ago recent-posts-masonry.php 1 year ago recent-posts-tiles-carousel.php 1 year ago recent-posts-tiles.php 1 year ago recent-posts-timeline.php 1 year ago recent-products.php 1 year ago responsive-table.php 1 year ago search.php 4 years ago staff.php 1 year ago svg.php 1 year ago tabs.php 1 year ago testimonial.php 1 year ago text.php 1 year ago touch-slider.php 1 year ago video.php 4 years ago
recent-posts-timeline.php
1032 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7 use Elementor\Group_Control_Typography;
8 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
9
10
11 if ( ! defined( 'ABSPATH' ) ) {
12 exit; // Exit if accessed directly.
13 }
14
15 /**
16 * Elementor 'RecentPostsTimeline' widget.
17 *
18 * Elementor widget that displays an 'RecentPostsTimeline' with lightbox.
19 *
20 * @since 1.0.0
21 */
22 class RecentPostsTimeline extends Widget_Base {
23
24 /**
25 * Get widget name.
26 *
27 * Retrieve 'RecentPostsTimeline' widget name.
28 *
29 * @since 1.0.0
30 * @access public
31 *
32 * @return string Widget name.
33 */
34 public function get_name() {
35 return 'aux_recent_posts_timeline';
36 }
37
38 /**
39 * Get widget title.
40 *
41 * Retrieve 'RecentPostsTimeline' widget title.
42 *
43 * @since 1.0.0
44 * @access public
45 *
46 * @return string Widget title.
47 */
48 public function get_title() {
49 return __('Timeline Posts', 'auxin-elements' );
50 }
51
52 /**
53 * Get widget icon.
54 *
55 * Retrieve 'RecentPostsTimeline' widget icon.
56 *
57 * @since 1.0.0
58 * @access public
59 *
60 * @return string Widget icon.
61 */
62 public function get_icon() {
63 return 'eicon-time-line auxin-badge';
64 }
65
66 /**
67 * Get widget categories.
68 *
69 * Retrieve 'RecentPostsTimeline' widget icon.
70 *
71 * @since 1.0.0
72 * @access public
73 *
74 * @return string Widget icon.
75 */
76 public function get_categories() {
77 return array( 'auxin-dynamic' );
78 }
79
80 /**
81 * Retrieve the terms in a given taxonomy or list of taxonomies.
82 *
83 * Retrieve 'RecentPostsTimeline' widget icon.
84 *
85 * @since 1.0.0
86 * @access public
87 *
88 * @return string Widget icon.
89 */
90 public function get_terms() {
91 $terms = get_terms([
92 'taxonomy' => 'category',
93 'orderby' => 'count',
94 'hide_empty' => false,
95 ]);
96 $list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
97 foreach ( $terms as $key => $value ) {
98 $list[$value->term_id] = $value->name;
99 }
100
101 return $list;
102 }
103
104 /**
105 * Register 'RecentPostsTimeline' widget controls.
106 *
107 * Adds different input fields to allow the user to change and customize the widget settings.
108 *
109 * @since 1.0.0
110 * @access protected
111 */
112 protected function register_controls() {
113
114 /*-----------------------------------------------------------------------------------*/
115 /* layout_section
116 /*-----------------------------------------------------------------------------------*/
117
118 $this->start_controls_section(
119 'layout_section',
120 array(
121 'label' => __('Layout', 'auxin-elements' ),
122 'tab' => Controls_Manager::TAB_LAYOUT
123 )
124 );
125
126 $this->add_control(
127 'timeline_alignment',
128 array(
129 'label' => __('Timeline aignment','auxin-elements' ),
130 'description' => __('Specifies the alignment of timeline element.', 'auxin-elements'),
131 'type' => 'aux-visual-select',
132 'options' => array(
133 'center' => array(
134 'label' => __('Center', 'auxin-elements'),
135 'image' => AUXIN_URL . 'images/visual-select/blog-layout-8.svg'
136 ),
137 'left' => array(
138 'label' => __('Left', 'auxin-elements'),
139 'image' => AUXIN_URL . 'images/visual-select/blog-layout-8-left.svg'
140 ),
141 'right' => array(
142 'label' => __('Right', 'auxin-elements'),
143 'image' => AUXIN_URL . 'images/visual-select/blog-layout-8-right.svg'
144 )
145 ),
146 'default' => 'center'
147 )
148 );
149
150 $this->end_controls_section();
151
152 /*-----------------------------------------------------------------------------------*/
153 /* display_section
154 /*-----------------------------------------------------------------------------------*/
155
156 $this->start_controls_section(
157 'display_section',
158 array(
159 'label' => __('Display', 'auxin-elements' ),
160 'tab' => Controls_Manager::TAB_LAYOUT
161 )
162 );
163
164 $this->add_control(
165 'show_media',
166 array(
167 'label' => __('Display post media (image, video, etc)','auxin-elements' ),
168 'label_block' => true,
169 'type' => Controls_Manager::SWITCHER,
170 'label_on' => __( 'On', 'auxin-elements' ),
171 'label_off' => __( 'Off', 'auxin-elements' ),
172 'return_value' => 'yes',
173 'default' => 'yes',
174 'label_block' => true
175 )
176 );
177
178 $this->add_control(
179 'crop',
180 array(
181 'label' => __('Crop image','auxin-elements' ),
182 'type' => Controls_Manager::SWITCHER,
183 'label_on' => __( 'On', 'auxin-elements' ),
184 'label_off' => __( 'Off', 'auxin-elements' ),
185 'return_value' => 'yes',
186 'default' => 'no',
187 'condition' => array(
188 'show_media' => 'yes',
189 )
190 )
191 );
192
193 $this->add_control(
194 'preloadable',
195 array(
196 'label' => __('Preload image','auxin-elements' ),
197 'type' => Controls_Manager::SWITCHER,
198 'label_on' => __( 'On', 'auxin-elements' ),
199 'label_off' => __( 'Off', 'auxin-elements' ),
200 'return_value' => 'yes',
201 'default' => 'no',
202 'condition' => array(
203 'show_media' => 'yes',
204 )
205 )
206 );
207
208 $this->add_control(
209 'preload_preview',
210 array(
211 'label' => __('While loading image display','auxin-elements' ),
212 'label_block' => true,
213 'type' => Controls_Manager::SELECT,
214 'options' => auxin_get_preloadable_previews(),
215 'return_value' => 'yes',
216 'default' => 'yes',
217 'condition' => array(
218 'preloadable' => 'yes'
219 )
220 )
221 );
222
223 $this->add_control(
224 'preload_bgcolor',
225 array(
226 'label' => __( 'Placeholder color while loading image', 'auxin-elements' ),
227 'type' => Controls_Manager::COLOR,
228 'condition' => array(
229 'preloadable' => 'yes',
230 'preload_preview' => array('simple-spinner', 'simple-spinner-light', 'simple-spinner-dark')
231 )
232 )
233 );
234
235 $this->add_control(
236 'display_title',
237 array(
238 'label' => __('Display post title', 'auxin-elements' ),
239 'type' => Controls_Manager::SWITCHER,
240 'label_on' => __( 'On', 'auxin-elements' ),
241 'label_off' => __( 'Off', 'auxin-elements' ),
242 'return_value' => 'yes',
243 'default' => 'yes'
244 )
245 );
246
247 $this->add_control(
248 'show_info',
249 array(
250 'label' => __('Display post meta', 'auxin-elements' ),
251 'type' => Controls_Manager::SWITCHER,
252 'label_on' => __( 'On', 'auxin-elements' ),
253 'label_off' => __( 'Off', 'auxin-elements' ),
254 'return_value' => 'yes',
255 'default' => 'yes'
256 )
257 );
258
259 $this->add_control(
260 'display_like',
261 array(
262 'label' => __('Display like button', 'auxin-elements' ),
263 'type' => Controls_Manager::SWITCHER,
264 'label_on' => __( 'On', 'auxin-elements' ),
265 'label_off' => __( 'Off', 'auxin-elements' ),
266 'return_value' => 'yes',
267 'default' => 'yes'
268 )
269 );
270
271 $this->add_control(
272 'display_comments',
273 array(
274 'label' => __('Display Comment Number', 'auxin-elements' ),
275 'type' => Controls_Manager::SWITCHER,
276 'label_on' => __( 'On', 'auxin-elements' ),
277 'label_off' => __( 'Off', 'auxin-elements' ),
278 'return_value' => 'yes',
279 'default' => 'yes'
280 )
281 );
282
283 $this->add_control(
284 'show_excerpt',
285 array(
286 'label' => __('Display excerpt','auxin-elements' ),
287 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
288 'type' => Controls_Manager::SWITCHER,
289 'label_on' => __( 'On', 'auxin-elements' ),
290 'label_off' => __( 'Off', 'auxin-elements' ),
291 'return_value' => 'yes',
292 'default' => 'yes'
293 )
294 );
295
296 $this->add_control(
297 'excerpt_len',
298 array(
299 'label' => __('Excerpt length','auxin-elements' ),
300 'description' => __('Specify summary content in character.','auxin-elements' ),
301 'type' => Controls_Manager::NUMBER,
302 'default' => '160',
303 'condition' => array(
304 'show_excerpt' => 'yes',
305 )
306 )
307 );
308
309 $this->add_control(
310 'author_or_readmore',
311 array(
312 'label' => __('Display author or read more', 'auxin-elements'),
313 'label_block' => true,
314 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
315 'type' => Controls_Manager::SELECT,
316 'default' => 'readmore',
317 'options' => array(
318 'readmore' => __('Read More', 'auxin-elements'),
319 'author' => __('Author Name', 'auxin-elements'),
320 'none' => __('None', 'auxin-elements'),
321 ),
322 'label_block' => true
323 )
324 );
325
326 $this->add_control(
327 'display_author_header',
328 array(
329 'label' => __('Display Author in Header','auxin-elements' ),
330 'description' => __('Enable it to display author name in header','auxin-elements' ),
331 'type' => Controls_Manager::SWITCHER,
332 'label_on' => __( 'On', 'auxin-elements' ),
333 'label_off' => __( 'Off', 'auxin-elements' ),
334 'return_value' => 'yes',
335 'default' => 'yes',
336 'condition' => array(
337 'author_or_readmore' => 'author',
338 )
339 )
340 );
341
342 $this->add_control(
343 'display_author_footer',
344 array(
345 'label' => __('Display Author in Footer','auxin-elements' ),
346 'description' => __('Enable it to display author name in footer','auxin-elements' ),
347 'type' => Controls_Manager::SWITCHER,
348 'label_on' => __( 'On', 'auxin-elements' ),
349 'label_off' => __( 'Off', 'auxin-elements' ),
350 'return_value' => 'yes',
351 'default' => 'no',
352 'condition' => array(
353 'author_or_readmore' => 'author',
354 )
355 )
356 );
357
358 $this->end_controls_section();
359
360 /*-----------------------------------------------------------------------------------*/
361 /* query_section
362 /*-----------------------------------------------------------------------------------*/
363
364 $this->start_controls_section(
365 'query_section',
366 array(
367 'label' => __('Query', 'auxin-elements' ),
368 )
369 );
370
371 $this->add_control(
372 'cat',
373 array(
374 'label' => __('Categories', 'auxin-elements'),
375 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
376 'type' => Controls_Manager::SELECT2,
377 'multiple' => true,
378 'options' => $this->get_terms(),
379 'default' => array( ' ' ),
380 )
381 );
382
383 $this->add_control(
384 'num',
385 array(
386 'label' => __('Number of posts to show', 'auxin-elements'),
387 'label_block' => true,
388 'type' => Controls_Manager::NUMBER,
389 'default' => '8',
390 'min' => 1,
391 'step' => 1
392 )
393 );
394
395 $this->add_control(
396 'exclude_without_media',
397 array(
398 'label' => __('Exclude posts without media','auxin-elements' ),
399 'type' => Controls_Manager::SWITCHER,
400 'label_on' => __( 'On', 'auxin-elements' ),
401 'label_off' => __( 'Off', 'auxin-elements' ),
402 'return_value' => 'yes',
403 'default' => 'no'
404 )
405 );
406
407 $this->add_control(
408 'exclude_custom_post_formats',
409 array(
410 'label' => __('Exclude custom post formats','auxin-elements' ),
411 'type' => Controls_Manager::SWITCHER,
412 'label_on' => __( 'On', 'auxin-elements' ),
413 'label_off' => __( 'Off', 'auxin-elements' ),
414 'return_value' => 'yes',
415 'default' => 'no',
416 )
417 );
418
419 $this->add_control(
420 'exclude_quote_link',
421 array(
422 'label' => __('Exclude quote and link post formats','auxin-elements' ),
423 'type' => Controls_Manager::SWITCHER,
424 'label_on' => __( 'On', 'auxin-elements' ),
425 'label_off' => __( 'Off', 'auxin-elements' ),
426 'return_value' => 'yes',
427 'default' => 'no',
428 'condition' => array(
429 'exclude_custom_post_formats' => 'yes',
430 )
431 )
432 );
433
434 $this->add_control(
435 'order_by',
436 array(
437 'label' => __('Order by', 'auxin-elements'),
438 'type' => Controls_Manager::SELECT,
439 'default' => 'date',
440 'options' => array(
441 'date' => __('Date', 'auxin-elements'),
442 'menu_order date' => __('Menu Order', 'auxin-elements'),
443 'title' => __('Title', 'auxin-elements'),
444 'ID' => __('ID', 'auxin-elements'),
445 'rand' => __('Random', 'auxin-elements'),
446 'comment_count' => __('Comments', 'auxin-elements'),
447 'modified' => __('Date Modified', 'auxin-elements'),
448 'author' => __('Author', 'auxin-elements'),
449 'post__in' => __('Inserted Post IDs', 'auxin-elements')
450 ),
451 )
452 );
453
454 $this->add_control(
455 'order',
456 array(
457 'label' => __('Order', 'auxin-elements'),
458 'type' => Controls_Manager::SELECT,
459 'default' => 'DESC',
460 'options' => array(
461 'DESC' => __('Descending', 'auxin-elements'),
462 'ASC' => __('Ascending', 'auxin-elements'),
463 ),
464 )
465 );
466
467 $this->add_control(
468 'only_posts__in',
469 array(
470 'label' => __('Only posts','auxin-elements' ),
471 'description' => __('If you intend to display ONLY specific posts, you should specify the posts here. You have to insert the post IDs that are separated by comma (eg. 53,34,87,25).', 'auxin-elements' ),
472 'type' => Controls_Manager::TEXT
473 )
474 );
475
476 $this->add_control(
477 'include',
478 array(
479 'label' => __('Include posts','auxin-elements' ),
480 'description' => __('If you intend to include additional posts, you should specify the posts here. You have to insert the Post IDs that are separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
481 'type' => Controls_Manager::TEXT
482 )
483 );
484
485 $this->add_control(
486 'exclude',
487 array(
488 'label' => __('Exclude posts','auxin-elements' ),
489 'description' => __('If you intend to exclude specific posts from result, you should specify the posts here. You have to insert the Post IDs that are separated by comma (eg. 53,34,87,25)', 'auxin-elements' ),
490 'type' => Controls_Manager::TEXT
491 )
492 );
493
494 $this->add_control(
495 'offset',
496 array(
497 'label' => __('Start offset','auxin-elements' ),
498 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
499 'type' => Controls_Manager::NUMBER
500 )
501 );
502
503 $this->end_controls_section();
504
505 /*-----------------------------------------------------------------------------------*/
506 /* paginate_section
507 /*-----------------------------------------------------------------------------------*/
508
509 $this->start_controls_section(
510 'paginate_section',
511 array(
512 'label' => __('Paginate', 'auxin-elements' ),
513 )
514 );
515
516 $this->add_control(
517 'loadmore_type',
518 array(
519 'label' => __('Load More Type','auxin-elements' ),
520 'type' => 'aux-visual-select',
521 'options' => array(
522 '' => array(
523 'label' => __('None', 'auxin-elements' ),
524 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
525 ),
526 'scroll' => array(
527 'label' => __('Infinite Scroll', 'auxin-elements' ),
528 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
529 ),
530 'next' => array(
531 'label' => __('Next Button', 'auxin-elements' ),
532 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
533 ),
534 'next-prev' => array(
535 'label' => __('Next Prev', 'auxin-elements' ),
536 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
537 )
538 ),
539 'default' => ''
540 )
541 );
542
543 $this->end_controls_section();
544
545 /*-----------------------------------------------------------------------------------*/
546 /* image_style_section
547 /*-----------------------------------------------------------------------------------*/
548
549 $this->start_controls_section(
550 'image_style_section',
551 array(
552 'label' => __( 'Image', 'auxin-elements' ),
553 'tab' => Controls_Manager::TAB_STYLE,
554 'condition' => array(
555 'show_media' => 'yes',
556 ),
557 )
558 );
559
560 $this->add_control(
561 'image_aspect_ratio',
562 array(
563 'label' => __('Image aspect ratio', 'auxin-elements'),
564 'type' => Controls_Manager::SELECT,
565 'default' => '0.75',
566 'options' => array(
567 '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
568 '0.56' => __('Horizontal 16:9', 'auxin-elements'),
569 '1.00' => __('Square 1:1' , 'auxin-elements'),
570 '1.33' => __('Vertical 3:4' , 'auxin-elements')
571 ),
572 'condition' => array(
573 'show_media' => 'yes',
574 ),
575 )
576 );
577
578 $this->add_control(
579 'img_border_radius',
580 array(
581 'label' => __( 'Border Radius', 'auxin-elements' ),
582 'type' => Controls_Manager::DIMENSIONS,
583 'size_units' => array( 'px', '%' ),
584 'selectors' => array(
585 '{{WRAPPER}} .entry-media img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
586 ),
587 'condition' => array(
588 'show_media' => 'yes',
589 ),
590 )
591 );
592
593 $this->end_controls_section();
594
595 /*-----------------------------------------------------------------------------------*/
596 /* title_style_section
597 /*-----------------------------------------------------------------------------------*/
598
599 $this->start_controls_section(
600 'title_style_section',
601 array(
602 'label' => __( 'Title', 'auxin-elements' ),
603 'tab' => Controls_Manager::TAB_STYLE,
604 'condition' => array(
605 'display_title' => 'yes',
606 ),
607 )
608 );
609
610 $this->start_controls_tabs( 'title_colors' );
611
612 $this->start_controls_tab(
613 'title_color_normal',
614 array(
615 'label' => __( 'Normal' , 'auxin-elements' ),
616 'condition' => array(
617 'display_title' => 'yes',
618 ),
619 )
620 );
621
622 $this->add_control(
623 'title_color',
624 array(
625 'label' => __( 'Color', 'auxin-elements' ),
626 'type' => Controls_Manager::COLOR,
627 'selectors' => array(
628 '{{WRAPPER}} .entry-title a' => 'color: {{VALUE}};',
629 ),
630 'condition' => array(
631 'display_title' => 'yes',
632 ),
633 )
634 );
635
636 $this->end_controls_tab();
637
638 $this->start_controls_tab(
639 'title_color_hover',
640 array(
641 'label' => __( 'Hover' , 'auxin-elements' ),
642 'condition' => array(
643 'display_title' => 'yes',
644 ),
645 )
646 );
647
648 $this->add_control(
649 'title_hover_color',
650 array(
651 'label' => __( 'Color', 'auxin-elements' ),
652 'type' => Controls_Manager::COLOR,
653 'selectors' => array(
654 '{{WRAPPER}} .entry-title a:hover' => 'color: {{VALUE}};',
655 ),
656 'condition' => array(
657 'display_title' => 'yes',
658 ),
659 )
660 );
661
662 $this->end_controls_tab();
663
664 $this->end_controls_tabs();
665
666 $this->add_group_control(
667 Group_Control_Typography::get_type(),
668 array(
669 'name' => 'title_typography',
670 'global' => [
671 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
672 ],
673 'selector' => '{{WRAPPER}} .entry-title',
674 'condition' => array(
675 'display_title' => 'yes',
676 ),
677 )
678 );
679
680 $this->add_responsive_control(
681 'title_margin_bottom',
682 array(
683 'label' => __( 'Bottom space', 'auxin-elements' ),
684 'type' => Controls_Manager::SLIDER,
685 'range' => array(
686 'px' => array(
687 'max' => 100,
688 ),
689 ),
690 'selectors' => array(
691 '{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
692 ),
693 'condition' => array(
694 'display_title' => 'yes',
695 ),
696 )
697 );
698
699 $this->end_controls_section();
700
701 /*-----------------------------------------------------------------------------------*/
702 /* info_style_section
703 /*-----------------------------------------------------------------------------------*/
704
705 $this->start_controls_section(
706 'info_style_section',
707 array(
708 'label' => __( 'Post Info', 'auxin-elements' ),
709 'tab' => Controls_Manager::TAB_STYLE,
710 'condition' => array(
711 'show_info' => 'yes',
712 ),
713 )
714 );
715
716 $this->start_controls_tabs( 'info_colors' );
717
718 $this->start_controls_tab(
719 'info_color_normal',
720 array(
721 'label' => __( 'Normal' , 'auxin-elements' ),
722 'condition' => array(
723 'show_info' => 'yes',
724 ),
725 )
726 );
727
728 $this->add_control(
729 'info_color',
730 array(
731 'label' => __( 'Color', 'auxin-elements' ),
732 'type' => Controls_Manager::COLOR,
733 'selectors' => array(
734 '{{WRAPPER}} .entry-info a, {{WRAPPER}} .entry-info' => 'color: {{VALUE}};',
735 ),
736 'condition' => array(
737 'show_info' => 'yes',
738 ),
739 )
740 );
741
742 $this->end_controls_tab();
743
744 $this->start_controls_tab(
745 'info_color_hover',
746 array(
747 'label' => __( 'Hover' , 'auxin-elements' ),
748 'condition' => array(
749 'show_info' => 'yes',
750 ),
751 )
752 );
753
754 $this->add_control(
755 'info_hover_color',
756 array(
757 'label' => __( 'Color', 'auxin-elements' ),
758 'type' => Controls_Manager::COLOR,
759 'selectors' => array(
760 '{{WRAPPER}} .entry-info a:hover' => 'color: {{VALUE}};',
761 ),
762 'condition' => array(
763 'show_info' => 'yes',
764 ),
765 )
766 );
767
768 $this->end_controls_tab();
769
770 $this->end_controls_tabs();
771
772 $this->add_group_control(
773 Group_Control_Typography::get_type(),
774 array(
775 'name' => 'info_typography',
776 'global' => [
777 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
778 ],
779 'selector' => '{{WRAPPER}} .entry-info, {{WRAPPER}} .entry-info a',
780 'condition' => array(
781 'show_info' => 'yes',
782 ),
783 )
784 );
785
786 $this->add_responsive_control(
787 'info_margin_bottom',
788 array(
789 'label' => __( 'Bottom space', 'auxin-elements' ),
790 'type' => Controls_Manager::SLIDER,
791 'range' => array(
792 'px' => array(
793 'max' => 100
794 )
795 ),
796 'selectors' => array(
797 '{{WRAPPER}} .entry-info' => 'margin-bottom: {{SIZE}}{{UNIT}};'
798 ),
799 'condition' => array(
800 'show_info' => 'yes'
801 )
802 )
803 );
804
805 $this->add_responsive_control(
806 'info_spacing_between',
807 array(
808 'label' => __( 'Space between metas', 'auxin-elements' ),
809 'type' => Controls_Manager::SLIDER,
810 'range' => array(
811 'px' => array(
812 'max' => 30
813 )
814 ),
815 'selectors' => array(
816 '{{WRAPPER}} .entry-info [class^="entry-"] + [class^="entry-"]:before, {{WRAPPER}} .entry-info .entry-tax a:after' =>
817 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};'
818 ),
819 'condition' => array(
820 'show_info' => 'yes'
821 )
822 )
823 );
824
825 $this->end_controls_section();
826
827 /*-----------------------------------------------------------------------------------*/
828 /* content_style_section
829 /*-----------------------------------------------------------------------------------*/
830
831 $this->start_controls_section(
832 'content_style_section',
833 array(
834 'label' => __( 'Excerpt', 'auxin-elements' ),
835 'tab' => Controls_Manager::TAB_STYLE,
836 'condition' => array(
837 'show_excerpt' => 'yes',
838 )
839 )
840 );
841
842 $this->add_control(
843 'content_color',
844 array(
845 'label' => __( 'Color', 'auxin-elements' ),
846 'type' => Controls_Manager::COLOR,
847 'selectors' => array(
848 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}};',
849 ),
850 'condition' => array(
851 'show_excerpt' => 'yes',
852 ),
853 )
854 );
855
856 $this->add_group_control(
857 Group_Control_Typography::get_type(),
858 array(
859 'name' => 'content_typography',
860 'global' => [
861 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
862 ],
863 'selector' => '{{WRAPPER}} .entry-content',
864 'condition' => array(
865 'show_excerpt' => 'yes',
866 ),
867 )
868 );
869
870 $this->add_responsive_control(
871 'content_margin_bottom',
872 array(
873 'label' => __( 'Bottom space', 'auxin-elements' ),
874 'type' => Controls_Manager::SLIDER,
875 'range' => array(
876 'px' => array(
877 'max' => 100,
878 ),
879 ),
880 'selectors' => array(
881 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
882 ),
883 'condition' => array(
884 'show_excerpt' => 'yes',
885 ),
886 )
887 );
888
889 $this->end_controls_section();
890
891 /*-----------------------------------------------------------------------------------*/
892 /* meta_style_section
893 /*-----------------------------------------------------------------------------------*/
894
895 $this->start_controls_section(
896 'meta_style_section',
897 array(
898 'label' => __( 'Meta', 'auxin-elements' ),
899 'tab' => Controls_Manager::TAB_STYLE
900 )
901 );
902
903 $this->start_controls_tabs( 'meta_colors' );
904
905 $this->start_controls_tab(
906 'meta_color_normal',
907 array(
908 'label' => __( 'Normal' , 'auxin-elements' ),
909 )
910 );
911
912 $this->add_control(
913 'meta_color',
914 array(
915 'label' => __( 'Color', 'auxin-elements' ),
916 'type' => Controls_Manager::COLOR,
917 'selectors' => array(
918 '{{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta span' => 'color: {{VALUE}};',
919 )
920 )
921 );
922
923 $this->end_controls_tab();
924
925 $this->start_controls_tab(
926 'meta_color_hover',
927 array(
928 'label' => __( 'Hover' , 'auxin-elements' )
929 )
930 );
931
932 $this->add_control(
933 'meta_hover_color',
934 array(
935 'label' => __( 'Color', 'auxin-elements' ),
936 'type' => Controls_Manager::COLOR,
937 'selectors' => array(
938 '{{WRAPPER}} .entry-meta a:hover, {{WRAPPER}} .entry-meta span:hover' => 'color: {{VALUE}};',
939 )
940 )
941 );
942
943 $this->end_controls_tab();
944
945 $this->end_controls_tabs();
946
947 $this->add_group_control(
948 Group_Control_Typography::get_type(),
949 array(
950 'name' => 'meta_typography',
951 'global' => [
952 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
953 ],
954 'selector' => '{{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta span'
955 )
956 );
957
958 $this->add_responsive_control(
959 'meta_margin_bottom',
960 array(
961 'label' => __( 'Bottom space', 'auxin-elements' ),
962 'type' => Controls_Manager::SLIDER,
963 'range' => array(
964 'px' => array(
965 'max' => 100,
966 ),
967 ),
968 'selectors' => array(
969 '{{WRAPPER}} .entry-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
970 )
971 )
972 );
973
974 $this->end_controls_section();
975 }
976
977 /**
978 * Render image box widget output on the frontend.
979 *
980 * Written in PHP and used to generate the final HTML.
981 *
982 * @since 1.0.0
983 * @access protected
984 */
985 protected function render() {
986
987 $settings = $this->get_settings_for_display();
988
989 $args = array(
990 // Display Section
991 'show_media' => $settings['show_media'],
992 'crop' => $settings['crop'],
993 'preloadable' => $settings['preloadable'],
994 'preload_preview' => $settings['preload_preview'],
995 'preload_bgcolor' => $settings['preload_bgcolor'],
996 'display_title' => $settings['display_title'],
997 'show_info' => $settings['show_info'],
998 'display_like' => $settings['display_like'],
999 'show_excerpt' => $settings['show_excerpt'],
1000 'excerpt_len' => $settings['excerpt_len'],
1001 'author_or_readmore' => $settings['author_or_readmore'],
1002 'display_author_header' => $settings['display_author_header'],
1003 'display_author_footer' => $settings['display_author_footer'],
1004 'display_comments' => $settings['display_comments'],
1005
1006 // Layout Section
1007 'timeline_alignment' => $settings['timeline_alignment'],
1008
1009 // Query Section
1010 'cat' => $settings['cat'],
1011 'num' => $settings['num'],
1012 'exclude_without_media' => $settings['exclude_without_media'],
1013 'exclude_custom_post_formats' => $settings['exclude_custom_post_formats'],
1014 'exclude_quote_link' => $settings['exclude_quote_link'],
1015 'order_by' => $settings['order_by'],
1016 'order' => $settings['order'],
1017 'only_posts__in' => $settings['only_posts__in'],
1018 'include' => $settings['include'],
1019 'exclude' => $settings['exclude'],
1020 'offset' => $settings['offset'],
1021 'loadmore_type' => $settings['loadmore_type'],
1022
1023 // Style Section
1024 'image_aspect_ratio' => $settings['image_aspect_ratio'],
1025 );
1026
1027 // get the shortcode base blog page
1028 echo auxin_widget_recent_posts_timeline_callback( $args );
1029 }
1030
1031 }
1032