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