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-grid-carousel.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-grid-carousel.php
2075 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 use Elementor\Group_Control_Background;
10 use Elementor\Group_Control_Box_Shadow;
11 use Elementor\Group_Control_Text_Shadow;
12
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit; // Exit if accessed directly.
16 }
17
18 /**
19 * Elementor 'RecentPostsGridCarousel' widget.
20 *
21 * Elementor widget that displays an 'RecentPostsGridCarousel' with lightbox.
22 *
23 * @since 1.0.0
24 */
25 class RecentPostsGridCarousel extends Widget_Base {
26
27 /**
28 * Get widget name.
29 *
30 * Retrieve 'RecentPostsGridCarousel' widget name.
31 *
32 * @since 1.0.0
33 * @access public
34 *
35 * @return string Widget name.
36 */
37 public function get_name() {
38 return 'aux_recent_posts';
39 }
40
41 /**
42 * Get widget title.
43 *
44 * Retrieve 'RecentPostsGridCarousel' widget title.
45 *
46 * @since 1.0.0
47 * @access public
48 *
49 * @return string Widget title.
50 */
51 public function get_title() {
52 return __('Grid & Carousel Posts', 'auxin-elements' );
53 }
54
55 /**
56 * Get widget icon.
57 *
58 * Retrieve 'RecentPostsGridCarousel' widget icon.
59 *
60 * @since 1.0.0
61 * @access public
62 *
63 * @return string Widget icon.
64 */
65 public function get_icon() {
66 return 'eicon-posts-grid auxin-badge';
67 }
68
69 /**
70 * Get widget categories.
71 *
72 * Retrieve 'RecentPostsGridCarousel' widget icon.
73 *
74 * @since 1.0.0
75 * @access public
76 *
77 * @return string Widget icon.
78 */
79 public function get_categories() {
80 return array( 'auxin-dynamic' );
81 }
82
83 /**
84 * Retrieve the terms in a given taxonomy or list of taxonomies.
85 *
86 * Retrieve 'RecentPostsGridCarousel' widget icon.
87 *
88 * @since 1.0.0
89 * @access public
90 *
91 * @return string Widget icon.
92 */
93 public function get_terms() {
94 $terms = get_terms([
95 'taxonomy' => 'category',
96 'orderby' => 'count',
97 'hide_empty' => false,
98 ]);
99
100 $list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
101 foreach ( $terms as $key => $value ) {
102 $list[$value->term_id] = $value->name;
103 }
104
105 return $list;
106 }
107
108 /**
109 * Register 'RecentPostsGridCarousel' widget controls.
110 *
111 * Adds different input fields to allow the user to change and customize the widget settings.
112 *
113 * @since 1.0.0
114 * @access protected
115 */
116 protected function register_controls() {
117
118 /*-----------------------------------------------------------------------------------*/
119 /* layout_section
120 /*-----------------------------------------------------------------------------------*/
121
122 $this->start_controls_section(
123 'layout_section',
124 array(
125 'label' => __('Layout', 'auxin-elements' ),
126 'tab' => Controls_Manager::TAB_LAYOUT
127 )
128 );
129
130 $this->add_responsive_control(
131 'columns',
132 array(
133 'label' => __( 'Columns', 'auxin-elements' ),
134 'type' => Controls_Manager::SELECT,
135 'default' => '4',
136 'tablet_default' => 'inherit',
137 'mobile_default' => '1',
138 'options' => array(
139 'inherit' => __( 'Inherited from larger', 'auxin-elements' ),
140 '1' => '1',
141 '2' => '2',
142 '3' => '3',
143 '4' => '4',
144 '5' => '5',
145 '6' => '6'
146 ),
147 'frontend_available' => true,
148 )
149 );
150
151 $this->add_control(
152 'preview_mode',
153 array(
154 'label' => __('Display items as', 'auxin-elements'),
155 'type' => Controls_Manager::SELECT,
156 'default' => 'grid',
157 'options' => array(
158 'grid' => __( 'Grid', 'auxin-elements' ),
159 'grid-table' => __( 'Grid - Table Style', 'auxin-elements' ),
160 'grid-modern' => __( 'Grid - Modern Style', 'auxin-elements' ),
161 'flip' => __( 'Flip', 'auxin-elements' ),
162 'carousel-modern' => __( 'Carousel - Modern Style', 'auxin-elements' ),
163 'carousel' => __( 'Carousel', 'auxin-elements' )
164 )
165 )
166 );
167
168 $this->add_control(
169 'carousel_space',
170 array(
171 'label' => __( 'Column space', 'auxin-elements' ),
172 'description' => __( 'Specifies horizontal space between items (pixel).', 'auxin-elements' ),
173 'type' => Controls_Manager::NUMBER,
174 'default' => '25',
175 'condition' => array(
176 'preview_mode' => array( 'carousel', 'carousel-modern' ),
177 )
178 )
179 );
180
181 $this->add_control(
182 'content_layout',
183 array(
184 'label' => __('Content layout', 'auxin-elements'),
185 'type' => Controls_Manager::SELECT,
186 'default' => 'default',
187 'options' => array(
188 'default' => __('Full Content', 'auxin-elements'),
189 'entry-boxed' => __('Boxed Content', 'auxin-elements')
190 ),
191 'condition' => array(
192 'preview_mode' => array( 'grid', 'grid-table', 'grid-modern' ),
193 )
194 )
195 );
196
197 $this->add_control(
198 'grid_table_hover',
199 array(
200 'label' => __('Mouse Over Effect', 'auxin-elements'),
201 'type' => Controls_Manager::SELECT,
202 'label_block' => true,
203 'default' => 'bgimage-bgcolor',
204 'options' => array(
205 'bgcolor' => __( 'Background color', 'auxin-elements' ),
206 'bgimage' => __( 'Cover image', 'auxin-elements' ),
207 'bgimage-bgcolor' => __( 'Cover image or background color', 'auxin-elements' ),
208 'none' => __( 'Nothing', 'auxin-elements' )
209 ),
210 'condition' => array(
211 'preview_mode' => array( 'grid', 'grid-table', 'grid-modern' ),
212 )
213 )
214 );
215
216 $this->add_control(
217 'carousel_navigation',
218 array(
219 'label' => __('Navigation type', 'auxin-elements'),
220 'type' => Controls_Manager::SELECT,
221 'default' => 'peritem',
222 'options' => array(
223 'peritem' => __('Move per column', 'auxin-elements'),
224 'perpage' => __('Move per page', 'auxin-elements'),
225 'scroll' => __('Smooth scroll', 'auxin-elements')
226 ),
227 'condition' => array(
228 'preview_mode' => array( 'carousel', 'carousel-modern' ),
229 )
230 )
231 );
232
233 $this->add_control(
234 'carousel_navigation_control',
235 array(
236 'label' => __('Navigation control', 'auxin-elements'),
237 'type' => Controls_Manager::SELECT,
238 'default' => 'bullets',
239 'options' => array(
240 '' => __('None', 'auxin-elements'),
241 'arrows' => __('Arrows', 'auxin-elements'),
242 'bullets' => __('Bullets', 'auxin-elements')
243 ),
244 'condition' => array(
245 'preview_mode' => array( 'carousel', 'carousel-modern' ),
246 )
247 )
248 );
249
250 $this->add_control(
251 'carousel_nav_control_pos',
252 array(
253 'label' => __('Control Position', 'auxin-elements'),
254 'type' => Controls_Manager::SELECT,
255 'default' => 'center',
256 'options' => array(
257 'center' => __('Center', 'auxin-elements'),
258 'side' => __('Side', 'auxin-elements')
259 ),
260 'condition' => array(
261 'carousel_navigation_control' => 'arrows',
262 )
263 )
264 );
265
266 $this->add_control(
267 'carousel_nav_control_skin',
268 array(
269 'label' => __('Control Skin', 'auxin-elements'),
270 'type' => Controls_Manager::SELECT,
271 'default' => 'boxed',
272 'options' => array(
273 'boxed' => __('boxed', 'auxin-elements'),
274 'long' => __('Long Arrow', 'auxin-elements')
275 ),
276 'condition' => array(
277 'carousel_navigation_control' => 'arrows',
278 )
279 )
280 );
281
282 $this->add_control(
283 'carousel_loop',
284 array(
285 'label' => __('Loop navigation','auxin-elements' ),
286 'type' => Controls_Manager::SWITCHER,
287 'label_on' => __( 'On', 'auxin-elements' ),
288 'label_off' => __( 'Off', 'auxin-elements' ),
289 'return_value' => 'yes',
290 'default' => 'yes',
291 'condition' => array(
292 'preview_mode' => array( 'carousel', 'carousel-modern' ),
293 )
294 )
295 );
296
297 $this->add_control(
298 'carousel_autoplay',
299 array(
300 'label' => __('Autoplay carousel','auxin-elements' ),
301 'type' => Controls_Manager::SWITCHER,
302 'label_on' => __( 'On', 'auxin-elements' ),
303 'label_off' => __( 'Off', 'auxin-elements' ),
304 'return_value' => 'yes',
305 'default' => 'no',
306 'condition' => array(
307 'preview_mode' => array( 'carousel', 'carousel-modern' ),
308 )
309 )
310 );
311
312 $this->add_control(
313 'carousel_autoplay_delay',
314 array(
315 'label' => __( 'Autoplay delay', 'auxin-elements' ),
316 'description' => __('Specifies the delay between auto-forwarding in seconds.', 'auxin-elements' ),
317 'type' => Controls_Manager::NUMBER,
318 'default' => '2',
319 'condition' => array(
320 'preview_mode' => array( 'carousel', 'carousel-modern' ),
321 )
322 )
323 );
324
325 $this->end_controls_section();
326
327 /*-----------------------------------------------------------------------------------*/
328 /* display_section
329 /*-----------------------------------------------------------------------------------*/
330
331 $this->start_controls_section(
332 'display_section',
333 array(
334 'label' => __('Display', 'auxin-elements' ),
335 'tab' => Controls_Manager::TAB_LAYOUT
336 )
337 );
338
339 $this->add_control(
340 'show_media',
341 array(
342 'label' => __('Display post media (image, video, etc)','auxin-elements' ),
343 'label_block' => true,
344 'type' => Controls_Manager::SWITCHER,
345 'label_on' => __( 'On', 'auxin-elements' ),
346 'label_off' => __( 'Off', 'auxin-elements' ),
347 'return_value' => 'yes',
348 'default' => 'yes',
349 'label_block' => true
350 )
351 );
352
353 $this->add_control(
354 'post_media_size',
355 array(
356 'label' => __('Media size','auxin-elements' ),
357 'type' => Controls_Manager::SELECT,
358 'options' => auxin_get_available_image_sizes(),
359 'default' => 'auto',
360 'condition' => array(
361 'show_media' => 'yes'
362 )
363 )
364 );
365
366 $this->add_control(
367 'ignore_formats',
368 array(
369 'label' => __('Ignore post formats media','auxin-elements' ),
370 'label_block' => true,
371 'type' => Controls_Manager::SWITCHER,
372 'label_on' => __( 'On', 'auxin-elements' ),
373 'label_off' => __( 'Off', 'auxin-elements' ),
374 'return_value' => 'yes',
375 'default' => 'no',
376 'label_block' => true,
377 'condition' => array(
378 'show_media' => 'yes'
379 )
380 )
381 );
382
383 $this->add_control(
384 'preloadable',
385 array(
386 'label' => __('Preload image','auxin-elements' ),
387 'type' => Controls_Manager::SWITCHER,
388 'label_on' => __( 'On', 'auxin-elements' ),
389 'label_off' => __( 'Off', 'auxin-elements' ),
390 'return_value' => 'yes',
391 'default' => 'no',
392 'condition' => array(
393 'show_media' => 'yes',
394 )
395 )
396 );
397
398 $this->add_control(
399 'preload_preview',
400 array(
401 'label' => __('While loading image display','auxin-elements' ),
402 'label_block' => true,
403 'type' => Controls_Manager::SELECT,
404 'options' => auxin_get_preloadable_previews(),
405 'return_value' => 'yes',
406 'default' => 'yes',
407 'condition' => array(
408 'preloadable' => 'yes'
409 )
410 )
411 );
412
413 $this->add_control(
414 'preload_bgcolor',
415 array(
416 'label' => __( 'Placeholder color while loading image', 'auxin-elements' ),
417 'type' => Controls_Manager::COLOR,
418 'condition' => array(
419 'preloadable' => 'yes',
420 'preload_preview' => array('simple-spinner', 'simple-spinner-light', 'simple-spinner-dark')
421 )
422 )
423 );
424
425 $this->add_control(
426 'display_title',
427 array(
428 'label' => __('Display post title', 'auxin-elements' ),
429 'type' => Controls_Manager::SWITCHER,
430 'label_on' => __( 'On', 'auxin-elements' ),
431 'label_off' => __( 'Off', 'auxin-elements' ),
432 'return_value' => 'yes',
433 'default' => 'yes'
434 )
435 );
436
437 $this->add_control(
438 'words_num',
439 array(
440 'label' => __( 'Title Trim', 'auxin-elements' ),
441 'type' => Controls_Manager::NUMBER,
442 'default' => '',
443 'condition' => array(
444 'display_title' => 'yes',
445 )
446 )
447 );
448
449 $this->add_control(
450 'show_info',
451 array(
452 'label' => __('Display post info','auxin-elements' ),
453 'type' => Controls_Manager::SWITCHER,
454 'label_on' => __( 'On', 'auxin-elements' ),
455 'label_off' => __( 'Off', 'auxin-elements' ),
456 'return_value' => 'yes',
457 'default' => 'yes'
458 )
459 );
460
461 $this->add_control(
462 'show_format_icon',
463 array(
464 'label' => __('Display format icon','auxin-elements' ),
465 'type' => Controls_Manager::SWITCHER,
466 'label_on' => __( 'On', 'auxin-elements' ),
467 'label_off' => __( 'Off', 'auxin-elements' ),
468 'return_value' => 'yes',
469 'default' => 'no'
470 )
471 );
472
473 $this->add_control(
474 'post_info_position',
475 array(
476 'label' => __('Post info position', 'auxin-elements' ),
477 'type' => Controls_Manager::SELECT,
478 'default' => 'after-title',
479 'options' => array(
480 'after-title' => __('After Title' , 'auxin-elements' ),
481 'before-title' => __('Before Title', 'auxin-elements' )
482 ),
483 'condition' => array(
484 'show_info' => 'yes',
485 'preview_mode!' => 'flip'
486 )
487 )
488 );
489
490 $this->add_control(
491 'display_categories',
492 array(
493 'label' => __('Display Categories','auxin-elements' ),
494 'type' => Controls_Manager::SWITCHER,
495 'label_on' => __( 'On', 'auxin-elements' ),
496 'label_off' => __( 'Off', 'auxin-elements' ),
497 'return_value' => 'yes',
498 'default' => 'yes',
499 'condition' => array(
500 'show_info' => 'yes',
501 )
502 )
503 );
504
505 $this->add_control(
506 'max_taxonomy_num',
507 array(
508 'label' => __('Number of Categories Limit','auxin-elements' ),
509 'type' => Controls_Manager::NUMBER,
510 'default' => '1',
511 'condition' => array(
512 'show_info' => 'yes',
513 'display_categories' => 'yes'
514 )
515 )
516 );
517
518 $this->add_control(
519 'show_badge',
520 array(
521 'label' => __('Display Category Badge', 'auxin-elements' ),
522 'type' => Controls_Manager::SWITCHER,
523 'label_on' => __( 'On', 'auxin-elements' ),
524 'label_off' => __( 'Off', 'auxin-elements' ),
525 'return_value' => 'yes',
526 'default' => 'no'
527 )
528 );
529
530 $this->add_control(
531 'show_date',
532 array(
533 'label' => __('Display Date','auxin-elements' ),
534 'type' => Controls_Manager::SWITCHER,
535 'label_on' => __( 'On', 'auxin-elements' ),
536 'label_off' => __( 'Off', 'auxin-elements' ),
537 'return_value' => 'yes',
538 'default' => 'yes',
539 'condition' => array(
540 'show_info' => 'yes',
541 )
542 )
543 );
544
545 $this->add_control(
546 'display_author_header',
547 array(
548 'label' => __('Display Author in Header','auxin-elements' ),
549 'description' => __('Enable it to display author name in header','auxin-elements' ),
550 'type' => Controls_Manager::SWITCHER,
551 'label_on' => __( 'On', 'auxin-elements' ),
552 'label_off' => __( 'Off', 'auxin-elements' ),
553 'return_value' => 'yes',
554 'default' => 'yes',
555 )
556 );
557
558 $this->add_control(
559 'show_content',
560 array(
561 'label' => __('Display post content','auxin-elements' ),
562 'type' => Controls_Manager::SWITCHER,
563 'label_on' => __( 'On', 'auxin-elements' ),
564 'label_off' => __( 'Off', 'auxin-elements' ),
565 'return_value' => 'yes',
566 'default' => 'yes'
567 )
568 );
569
570 $this->add_control(
571 'display_comments',
572 array(
573 'label' => __('Display Comments Number', 'auxin-elements' ),
574 'type' => Controls_Manager::SWITCHER,
575 'label_on' => __( 'On', 'auxin-elements' ),
576 'label_off' => __( 'Off', 'auxin-elements' ),
577 'return_value' => 'yes',
578 'default' => 'yes'
579 )
580 );
581
582 $this->add_control(
583 'display_like',
584 array(
585 'label' => __('Display like button', 'auxin-elements' ),
586 'type' => Controls_Manager::SWITCHER,
587 'label_on' => __( 'On', 'auxin-elements' ),
588 'label_off' => __( 'Off', 'auxin-elements' ),
589 'return_value' => 'yes',
590 'default' => 'yes'
591 )
592 );
593
594 $this->add_control(
595 'show_excerpt',
596 array(
597 'label' => __('Display excerpt','auxin-elements' ),
598 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
599 'type' => Controls_Manager::SWITCHER,
600 'label_on' => __( 'On', 'auxin-elements' ),
601 'label_off' => __( 'Off', 'auxin-elements' ),
602 'return_value' => 'yes',
603 'default' => 'yes'
604 )
605 );
606
607 $this->add_control(
608 'excerpt_len',
609 array(
610 'label' => __('Excerpt length','auxin-elements' ),
611 'description' => __('Specify summary content in character.','auxin-elements' ),
612 'type' => Controls_Manager::NUMBER,
613 'default' => '160',
614 'condition' => array(
615 'show_excerpt' => 'yes',
616 )
617 )
618 );
619
620 $this->add_control(
621 'author_or_readmore',
622 array(
623 'label' => __('Display author or read more', 'auxin-elements'),
624 'label_block' => true,
625 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
626 'type' => Controls_Manager::SELECT,
627 'default' => 'readmore',
628 'options' => array(
629 'readmore' => __('Read More', 'auxin-elements'),
630 'author' => __('Author Name', 'auxin-elements'),
631 'none' => __('None', 'auxin-elements')
632 ),
633 'label_block' => true
634 )
635 );
636
637 $this->add_control(
638 'display_author_footer',
639 array(
640 'label' => __('Display Author in Footer','auxin-elements' ),
641 'description' => __('Enable it to display author name in footer','auxin-elements' ),
642 'type' => Controls_Manager::SWITCHER,
643 'label_on' => __( 'On', 'auxin-elements' ),
644 'label_off' => __( 'Off', 'auxin-elements' ),
645 'return_value' => 'yes',
646 'default' => 'no',
647 'condition' => array(
648 'author_or_readmore' => 'author',
649 )
650 )
651 );
652
653 $this->add_control(
654 'meta_info_position',
655 array(
656 'label' => __('Meta info position', 'auxin-elements' ),
657 'type' => Controls_Manager::SELECT,
658 'default' => 'after-content',
659 'options' => array(
660 'after-content' => __('After Content' , 'auxin-elements' ),
661 'before-content' => __('Before Content', 'auxin-elements' )
662 ),
663 'condition' => array(
664 'preview_mode!' => 'flip'
665 )
666 )
667 );
668
669 $this->end_controls_section();
670
671 /*-----------------------------------------------------------------------------------*/
672 /* query_section
673 /*-----------------------------------------------------------------------------------*/
674
675 $this->start_controls_section(
676 'query_section',
677 array(
678 'label' => __('Query', 'auxin-elements' ),
679 )
680 );
681
682 $this->add_control(
683 'use_wp_query',
684 array(
685 'label' => __('Use wp query','auxin-elements' ),
686 'type' => Controls_Manager::SWITCHER,
687 'label_on' => __( 'On', 'auxin-elements' ),
688 'label_off' => __( 'Off', 'auxin-elements' ),
689 'return_value' => 'yes',
690 'default' => 'no'
691 )
692 );
693
694 $this->add_control(
695 'cat',
696 array(
697 'label' => __('Categories', 'auxin-elements'),
698 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
699 'type' => Controls_Manager::SELECT2,
700 'multiple' => true,
701 'options' => $this->get_terms(),
702 'default' => array( ' ' ),
703 'condition' => array(
704 'use_wp_query!' => 'yes'
705 )
706 )
707 );
708
709 $this->add_control(
710 'num',
711 array(
712 'label' => __('Number of posts to show', 'auxin-elements'),
713 'label_block' => true,
714 'type' => Controls_Manager::NUMBER,
715 'default' => '8',
716 'min' => 1,
717 'step' => 1
718 )
719 );
720
721 $this->add_control(
722 'exclude_without_media',
723 array(
724 'label' => __('Exclude posts without media','auxin-elements' ),
725 'type' => Controls_Manager::SWITCHER,
726 'label_on' => __( 'On', 'auxin-elements' ),
727 'label_off' => __( 'Off', 'auxin-elements' ),
728 'return_value' => 'yes',
729 'default' => 'no',
730 'condition' => array(
731 'use_wp_query!' => 'yes'
732 )
733 )
734 );
735
736 $this->add_control(
737 'exclude_custom_post_formats',
738 array(
739 'label' => __('Exclude all custom post formats','auxin-elements' ),
740 'type' => Controls_Manager::SWITCHER,
741 'label_on' => __( 'On', 'auxin-elements' ),
742 'label_off' => __( 'Off', 'auxin-elements' ),
743 'return_value' => 'yes',
744 'default' => 'no',
745 'condition' => array(
746 'use_wp_query!' => 'yes'
747 )
748 )
749 );
750
751 $this->add_control(
752 'include_post_formats_in',
753 array(
754 'label' => __('Include custom post formats', 'auxin-elements'),
755 'type' => Controls_Manager::SELECT2,
756 'multiple' => true,
757 'options' => array(
758 'aside' => __('Aside', 'auxin-elements'),
759 'gallery' => __('Gallery', 'auxin-elements'),
760 'image' => __('Image', 'auxin-elements'),
761 'link' => __('Link', 'auxin-elements'),
762 'quote' => __('Quote', 'auxin-elements'),
763 'video' => __('Video', 'auxin-elements'),
764 'audio' => __('Audio', 'auxin-elements')
765 ),
766 'condition' => array(
767 'exclude_custom_post_formats!' => 'yes',
768 'use_wp_query!' => 'yes'
769 )
770 )
771 );
772
773 $this->add_control(
774 'exclude_quote_link',
775 array(
776 'label' => __('Exclude quote and link post formats','auxin-elements' ),
777 'type' => Controls_Manager::SWITCHER,
778 'label_on' => __( 'On', 'auxin-elements' ),
779 'label_off' => __( 'Off', 'auxin-elements' ),
780 'return_value' => 'yes',
781 'default' => 'no',
782 'condition' => array(
783 'exclude_custom_post_formats' => 'yes',
784 'use_wp_query!' => 'yes'
785 )
786 )
787 );
788
789
790 $this->add_control(
791 'order_by',
792 array(
793 'label' => __('Order by', 'auxin-elements'),
794 'type' => Controls_Manager::SELECT,
795 'default' => 'date',
796 'options' => array(
797 'date' => __('Date', 'auxin-elements'),
798 'menu_order date' => __('Menu Order', 'auxin-elements'),
799 'title' => __('Title', 'auxin-elements'),
800 'ID' => __('ID', 'auxin-elements'),
801 'rand' => __('Random', 'auxin-elements'),
802 'comment_count' => __('Comments', 'auxin-elements'),
803 'modified' => __('Date Modified', 'auxin-elements'),
804 'author' => __('Author', 'auxin-elements'),
805 'post__in' => __('Inserted Post IDs', 'auxin-elements')
806 ),
807 'condition' => array(
808 'use_wp_query!' => 'yes'
809 )
810 )
811 );
812
813 $this->add_control(
814 'order',
815 array(
816 'label' => __('Order', 'auxin-elements'),
817 'type' => Controls_Manager::SELECT,
818 'default' => 'DESC',
819 'options' => array(
820 'DESC' => __('Descending', 'auxin-elements'),
821 'ASC' => __('Ascending', 'auxin-elements'),
822 ),
823 'condition' => array(
824 'use_wp_query!' => 'yes'
825 )
826 )
827 );
828
829 $this->add_control(
830 'only_posts__in',
831 array(
832 'label' => __('Only posts','auxin-elements' ),
833 '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' ),
834 'type' => Controls_Manager::TEXT,
835 'condition' => array(
836 'use_wp_query!' => 'yes'
837 )
838 )
839 );
840
841 $this->add_control(
842 'include',
843 array(
844 'label' => __('Include posts','auxin-elements' ),
845 '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' ),
846 'type' => Controls_Manager::TEXT,
847 'condition' => array(
848 'use_wp_query!' => 'yes'
849 )
850 )
851 );
852
853 $this->add_control(
854 'exclude',
855 array(
856 'label' => __('Exclude posts','auxin-elements' ),
857 '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' ),
858 'type' => Controls_Manager::TEXT,
859 'condition' => array(
860 'use_wp_query!' => 'yes'
861 )
862 )
863 );
864
865 $this->add_control(
866 'offset',
867 array(
868 'label' => __('Start offset','auxin-elements' ),
869 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
870 'type' => Controls_Manager::NUMBER,
871 'condition' => array(
872 'use_wp_query!' => 'yes'
873 )
874 )
875 );
876
877 $this->end_controls_section();
878
879 /*-----------------------------------------------------------------------------------*/
880 /* paginate_section
881 /*-----------------------------------------------------------------------------------*/
882
883 $this->start_controls_section(
884 'paginate_section',
885 array(
886 'label' => __('Paginate', 'auxin-elements' ),
887 )
888 );
889
890 $this->add_control(
891 'loadmore_type',
892 array(
893 'label' => __('Load More Type','auxin-elements' ),
894 'type' => 'aux-visual-select',
895 'options' => array(
896 '' => array(
897 'label' => __('None', 'auxin-elements' ),
898 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
899 ),
900 'scroll' => array(
901 'label' => __('Infinite Scroll', 'auxin-elements' ),
902 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
903 ),
904 'next' => array(
905 'label' => __('Next Button', 'auxin-elements' ),
906 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
907 ),
908 'next-prev' => array(
909 'label' => __('Next Prev', 'auxin-elements' ),
910 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
911 )
912 ),
913 'default' => ''
914 )
915 );
916
917 $this->end_controls_section();
918
919 /*-----------------------------------------------------------------------------------*/
920 /* image_style_section
921 /*-----------------------------------------------------------------------------------*/
922
923 $this->start_controls_section(
924 'image_style_section',
925 array(
926 'label' => __( 'Image', 'auxin-elements' ),
927 'tab' => Controls_Manager::TAB_STYLE,
928 'condition' => array(
929 'show_media' => 'yes',
930 ),
931 )
932 );
933
934 $this->add_control(
935 'image_aspect_ratio',
936 array(
937 'label' => __('Image aspect ratio', 'auxin-elements'),
938 'type' => Controls_Manager::SELECT,
939 'default' => '0.75',
940 'options' => array(
941 '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
942 '0.56' => __('Horizontal 16:9', 'auxin-elements'),
943 '1.00' => __('Square 1:1' , 'auxin-elements'),
944 '1.33' => __('Vertical 3:4' , 'auxin-elements'),
945 'custom' => __('Custom' , 'auxin-elements'),
946 ),
947 'condition' => array(
948 'show_media' => 'yes',
949 ),
950 )
951 );
952
953
954 $this->add_responsive_control(
955 'image_aspect_ratio_custom',
956 array(
957 'label' => __( 'Custom Aspect Ratio', 'auxin-elements' ),
958 'type' => Controls_Manager::SLIDER,
959 'range' => array(
960 'px' => array(
961 'min' => 0,
962 'max' => 3,
963 'step' => 0.1
964 ),
965 ),
966 'condition' => array(
967 'image_aspect_ratio' => 'custom',
968 ),
969 )
970 );
971
972 $this->add_control(
973 'img_border_radius',
974 array(
975 'label' => __( 'Border Radius', 'auxin-elements' ),
976 'type' => Controls_Manager::DIMENSIONS,
977 'size_units' => array( 'px', '%' ),
978 'selectors' => array(
979 '{{WRAPPER}} .entry-media img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
980 ),
981 'condition' => array(
982 'show_media' => 'yes',
983 ),
984 )
985 );
986
987 $this->start_controls_tabs( 'img_tabs' );
988
989 $this->start_controls_tab(
990 'image_tab_normal',
991 array(
992 'label' => __( 'Normal' , 'auxin-elements' ),
993 'condition' => array(
994 'show_media' => 'yes',
995 ),
996 )
997 );
998
999 $this->add_group_control(
1000 Group_Control_Box_Shadow::get_type(),
1001 array(
1002 'name' => 'img_normal_box_shadow',
1003 'selector' => '{{WRAPPER}} .aux-media-image',
1004 'condition' => array(
1005 'show_media' => 'yes',
1006 ),
1007 )
1008 );
1009
1010 $this->end_controls_tab();
1011
1012 $this->start_controls_tab(
1013 'image_tab_hover',
1014 array(
1015 'label' => __( 'Hover' , 'auxin-elements' ),
1016 'condition' => array(
1017 'show_media' => 'yes',
1018 ),
1019 )
1020 );
1021
1022 $this->add_group_control(
1023 Group_Control_Box_Shadow::get_type(),
1024 array(
1025 'name' => 'img_hover_box_shadow',
1026 'selector' => '{{WRAPPER}} .post:hover .aux-media-image',
1027 'condition' => array(
1028 'show_media' => 'yes',
1029 ),
1030 )
1031 );
1032
1033 $this->end_controls_tab();
1034
1035 $this->end_controls_tabs();
1036
1037 $this->end_controls_section();
1038
1039 /*-----------------------------------------------------------------------------------*/
1040 /* title_style_section
1041 /*-----------------------------------------------------------------------------------*/
1042
1043 $this->start_controls_section(
1044 'title_style_section',
1045 array(
1046 'label' => __( 'Title', 'auxin-elements' ),
1047 'tab' => Controls_Manager::TAB_STYLE,
1048 'condition' => array(
1049 'display_title' => 'yes',
1050 ),
1051 )
1052 );
1053
1054 $this->start_controls_tabs( 'title_colors' );
1055
1056 $this->start_controls_tab(
1057 'title_color_normal',
1058 array(
1059 'label' => __( 'Normal' , 'auxin-elements' ),
1060 'condition' => array(
1061 'display_title' => 'yes',
1062 ),
1063 )
1064 );
1065
1066 $this->add_control(
1067 'title_color',
1068 array(
1069 'label' => __( 'Color', 'auxin-elements' ),
1070 'type' => Controls_Manager::COLOR,
1071 'selectors' => array(
1072 '{{WRAPPER}} .entry-title a' => 'color: {{VALUE}};',
1073 ),
1074 'condition' => array(
1075 'display_title' => 'yes',
1076 ),
1077 )
1078 );
1079
1080 $this->end_controls_tab();
1081
1082 $this->start_controls_tab(
1083 'title_color_hover',
1084 array(
1085 'label' => __( 'Hover' , 'auxin-elements' ),
1086 'condition' => array(
1087 'display_title' => 'yes',
1088 ),
1089 )
1090 );
1091
1092 $this->add_control(
1093 'title_hover_color',
1094 array(
1095 'label' => __( 'Color', 'auxin-elements' ),
1096 'type' => Controls_Manager::COLOR,
1097 'selectors' => array(
1098 '{{WRAPPER}} .entry-title a:hover' => 'color: {{VALUE}};',
1099 ),
1100 'condition' => array(
1101 'display_title' => 'yes',
1102 ),
1103 )
1104 );
1105
1106 $this->end_controls_tab();
1107
1108 $this->end_controls_tabs();
1109
1110 $this->add_group_control(
1111 Group_Control_Typography::get_type(),
1112 array(
1113 'name' => 'title_typography',
1114 'global' => [
1115 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1116 ],
1117 'selector' => '{{WRAPPER}} .entry-title a',
1118 'condition' => array(
1119 'display_title' => 'yes',
1120 ),
1121 )
1122 );
1123
1124 $this->add_responsive_control(
1125 'title_margin_bottom',
1126 array(
1127 'label' => __( 'Bottom space', 'auxin-elements' ),
1128 'type' => Controls_Manager::SLIDER,
1129 'range' => array(
1130 'px' => array(
1131 'max' => 100,
1132 ),
1133 ),
1134 'selectors' => array(
1135 '{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1136 ),
1137 'condition' => array(
1138 'display_title' => 'yes',
1139 ),
1140 )
1141 );
1142
1143 $this->end_controls_section();
1144
1145 /*-----------------------------------------------------------------------------------*/
1146 /* info_style_section
1147 /*-----------------------------------------------------------------------------------*/
1148
1149 $this->start_controls_section(
1150 'info_style_section',
1151 array(
1152 'label' => __( 'Post Info', 'auxin-elements' ),
1153 'tab' => Controls_Manager::TAB_STYLE,
1154 'condition' => array(
1155 'show_info' => 'yes',
1156 ),
1157 )
1158 );
1159
1160 $this->start_controls_tabs( 'info_colors' );
1161
1162 $this->start_controls_tab(
1163 'info_color_normal',
1164 array(
1165 'label' => __( 'Normal' , 'auxin-elements' ),
1166 'condition' => array(
1167 'show_info' => 'yes',
1168 ),
1169 )
1170 );
1171
1172 $this->add_control(
1173 'info_color',
1174 array(
1175 'label' => __( 'Color', 'auxin-elements' ),
1176 'type' => Controls_Manager::COLOR,
1177 'selectors' => array(
1178 '{{WRAPPER}} .entry-info a, {{WRAPPER}} .entry-info' => 'color: {{VALUE}};',
1179 ),
1180 'condition' => array(
1181 'show_info' => 'yes',
1182 ),
1183 )
1184 );
1185
1186 $this->end_controls_tab();
1187
1188 $this->start_controls_tab(
1189 'info_color_hover',
1190 array(
1191 'label' => __( 'Hover' , 'auxin-elements' ),
1192 'condition' => array(
1193 'show_info' => 'yes',
1194 ),
1195 )
1196 );
1197
1198 $this->add_control(
1199 'info_hover_color',
1200 array(
1201 'label' => __( 'Color', 'auxin-elements' ),
1202 'type' => Controls_Manager::COLOR,
1203 'selectors' => array(
1204 '{{WRAPPER}} .entry-info a:hover' => 'color: {{VALUE}};',
1205 ),
1206 'condition' => array(
1207 'show_info' => 'yes',
1208 ),
1209 )
1210 );
1211
1212 $this->end_controls_tab();
1213
1214 $this->end_controls_tabs();
1215
1216 $this->add_group_control(
1217 Group_Control_Typography::get_type(),
1218 array(
1219 'name' => 'info_typography',
1220 'global' => [
1221 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1222 ],
1223 'selector' => '{{WRAPPER}} .entry-info, {{WRAPPER}} .entry-info a',
1224 'condition' => array(
1225 'show_info' => 'yes',
1226 ),
1227 )
1228 );
1229
1230 $this->add_responsive_control(
1231 'info_margin_bottom',
1232 array(
1233 'label' => __( 'Bottom space', 'auxin-elements' ),
1234 'type' => Controls_Manager::SLIDER,
1235 'range' => array(
1236 'px' => array(
1237 'max' => 100
1238 )
1239 ),
1240 'selectors' => array(
1241 '{{WRAPPER}} .entry-info' => 'margin-bottom: {{SIZE}}{{UNIT}};'
1242 ),
1243 'condition' => array(
1244 'show_info' => 'yes'
1245 )
1246 )
1247 );
1248
1249 $this->add_responsive_control(
1250 'info_spacing_between',
1251 array(
1252 'label' => __( 'Space between metas', 'auxin-elements' ),
1253 'type' => Controls_Manager::SLIDER,
1254 'range' => array(
1255 'px' => array(
1256 'max' => 30
1257 )
1258 ),
1259 'selectors' => array(
1260 '{{WRAPPER}} .entry-info [class^="entry-"] + [class^="entry-"]:before, {{WRAPPER}} .entry-info .entry-tax a:after' =>
1261 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};'
1262 ),
1263 'condition' => array(
1264 'show_info' => 'yes'
1265 )
1266 )
1267 );
1268
1269 $this->end_controls_section();
1270
1271 /*-----------------------------------------------------------------------------------*/
1272 /* content_style_section
1273 /*-----------------------------------------------------------------------------------*/
1274
1275 $this->start_controls_section(
1276 'content_style_section',
1277 array(
1278 'label' => __( 'Excerpt', 'auxin-elements' ),
1279 'tab' => Controls_Manager::TAB_STYLE,
1280 'condition' => array(
1281 'show_excerpt' => 'yes',
1282 )
1283 )
1284 );
1285
1286 $this->add_control(
1287 'content_color',
1288 array(
1289 'label' => __( 'Color', 'auxin-elements' ),
1290 'type' => Controls_Manager::COLOR,
1291 'selectors' => array(
1292 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}};',
1293 ),
1294 'condition' => array(
1295 'show_excerpt' => 'yes',
1296 ),
1297 )
1298 );
1299
1300 $this->add_group_control(
1301 Group_Control_Typography::get_type(),
1302 array(
1303 'name' => 'content_typography',
1304 'global' => [
1305 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1306 ],
1307 'selector' => '{{WRAPPER}} .entry-content',
1308 'condition' => array(
1309 'show_excerpt' => 'yes',
1310 ),
1311 )
1312 );
1313
1314 $this->add_responsive_control(
1315 'content_margin_bottom',
1316 array(
1317 'label' => __( 'Bottom space', 'auxin-elements' ),
1318 'type' => Controls_Manager::SLIDER,
1319 'range' => array(
1320 'px' => array(
1321 'max' => 100,
1322 ),
1323 ),
1324 'selectors' => array(
1325 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1326 ),
1327 'condition' => array(
1328 'show_excerpt' => 'yes',
1329 ),
1330 )
1331 );
1332
1333 $this->end_controls_section();
1334
1335
1336 /*-----------------------------------------------------------------------------------*/
1337 /* badge_style_section
1338 /*-----------------------------------------------------------------------------------*/
1339
1340 $this->start_controls_section(
1341 'badge_style_section',
1342 array(
1343 'label' => __( 'Badge', 'auxin-elements' ),
1344 'tab' => Controls_Manager::TAB_STYLE,
1345 'condition' => array(
1346 'show_badge' => 'yes',
1347 )
1348 )
1349 );
1350
1351 $this->start_controls_tabs( 'badge_colors' );
1352
1353 $this->start_controls_tab(
1354 'badge_color_normal',
1355 array(
1356 'label' => __( 'Normal' , 'auxin-elements' )
1357 )
1358 );
1359
1360 $this->add_group_control(
1361 Group_Control_Background::get_type(),
1362 array(
1363 'name' => 'badge_background_color',
1364 'label' => __( 'Background', 'auxin-elements' ),
1365 'types' => array( 'classic', 'gradient' ),
1366 'selector' => '{{WRAPPER}} .entry-badge',
1367 )
1368 );
1369
1370 $this->add_control(
1371 'badge_text_color',
1372 array(
1373 'label' => __( 'Text', 'auxin-elements' ),
1374 'type' => Controls_Manager::COLOR,
1375 'selectors' => array(
1376 '{{WRAPPER}} .entry-badge a' => 'color: {{VALUE}} !important;',
1377 )
1378 )
1379 );
1380
1381 $this->end_controls_tab();
1382
1383 $this->start_controls_tab(
1384 'badge_color_hover',
1385 array(
1386 'label' => __( 'Hover' , 'auxin-elements' )
1387 )
1388 );
1389
1390 $this->add_group_control(
1391 Group_Control_Background::get_type(),
1392 array(
1393 'name' => 'badge_hover_background_color',
1394 'label' => __( 'Background', 'auxin-elements' ),
1395 'types' => array( 'classic', 'gradient' ),
1396 'selector' => '{{WRAPPER}} .entry-badge:hover',
1397 )
1398 );
1399
1400 $this->add_control(
1401 'badge_hover_text_color',
1402 array(
1403 'label' => __( 'Text', 'auxin-elements' ),
1404 'type' => Controls_Manager::COLOR,
1405 'selectors' => array(
1406 '{{WRAPPER}} .entry-badge a:hover' => 'color: {{VALUE}} !important;',
1407 )
1408 )
1409 );
1410 $this->end_controls_tab();
1411
1412 $this->end_controls_tabs();
1413
1414 $this->add_group_control(
1415 Group_Control_Typography::get_type(),
1416 array(
1417 'name' => 'badge_typography',
1418 'global' => [
1419 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1420 ],
1421 'selector' => '{{WRAPPER}} .entry-badge a'
1422 )
1423 );
1424
1425
1426 $this->add_responsive_control(
1427 'button_padding',
1428 array(
1429 'label' => __( 'Padding', 'auxin-elements' ),
1430 'type' => Controls_Manager::DIMENSIONS,
1431 'size_units' => array( 'px', '%' ),
1432 'selectors' => array(
1433 '{{WRAPPER}} .entry-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1434 )
1435 )
1436 );
1437
1438 $this->add_responsive_control(
1439 'badge_margin_bottom',
1440 array(
1441 'label' => __( 'Bottom space', 'auxin-elements' ),
1442 'type' => Controls_Manager::SLIDER,
1443 'range' => array(
1444 'px' => array(
1445 'max' => 100,
1446 ),
1447 ),
1448 'selectors' => array(
1449 '{{WRAPPER}} .entry-badge' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1450 )
1451 )
1452 );
1453
1454 $this->end_controls_section();
1455
1456 /*-----------------------------------------------------------------------------------*/
1457 /* meta_style_section
1458 /*-----------------------------------------------------------------------------------*/
1459
1460 $this->start_controls_section(
1461 'meta_style_section',
1462 array(
1463 'label' => __( 'Meta', 'auxin-elements' ),
1464 'tab' => Controls_Manager::TAB_STYLE
1465 )
1466 );
1467
1468 $this->start_controls_tabs( 'meta_colors' );
1469
1470 $this->start_controls_tab(
1471 'meta_color_normal',
1472 array(
1473 'label' => __( 'Normal' , 'auxin-elements' ),
1474 )
1475 );
1476
1477 $this->add_control(
1478 'meta_color',
1479 array(
1480 'label' => __( 'Color', 'auxin-elements' ),
1481 'type' => Controls_Manager::COLOR,
1482 'selectors' => array(
1483 '{{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta span' => 'color: {{VALUE}};',
1484 )
1485 )
1486 );
1487
1488 $this->end_controls_tab();
1489
1490 $this->start_controls_tab(
1491 'meta_color_hover',
1492 array(
1493 'label' => __( 'Hover' , 'auxin-elements' )
1494 )
1495 );
1496
1497 $this->add_control(
1498 'meta_hover_color',
1499 array(
1500 'label' => __( 'Color', 'auxin-elements' ),
1501 'type' => Controls_Manager::COLOR,
1502 'selectors' => array(
1503 '{{WRAPPER}} .entry-meta a:hover, {{WRAPPER}} .entry-meta span:hover' => 'color: {{VALUE}};',
1504 )
1505 )
1506 );
1507
1508 $this->end_controls_tab();
1509
1510 $this->end_controls_tabs();
1511
1512 $this->add_group_control(
1513 Group_Control_Typography::get_type(),
1514 array(
1515 'name' => 'meta_typography',
1516 'global' => [
1517 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1518 ],
1519 'selector' => '{{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta span'
1520 )
1521 );
1522
1523 $this->add_responsive_control(
1524 'meta_padding',
1525 array(
1526 'label' => __( 'Padding for meta wrapper', 'auxin-elements' ),
1527 'type' => Controls_Manager::DIMENSIONS,
1528 'size_units' => array( 'px', '%' ),
1529 'selectors' => array(
1530 '{{WRAPPER}} .entry-meta' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1531 )
1532 )
1533 );
1534
1535 $this->add_responsive_control(
1536 'meta_margin_bottom',
1537 array(
1538 'label' => __( 'Bottom space', 'auxin-elements' ),
1539 'type' => Controls_Manager::SLIDER,
1540 'range' => array(
1541 'px' => array(
1542 'max' => 100,
1543 ),
1544 ),
1545 'selectors' => array(
1546 '{{WRAPPER}} .entry-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1547 )
1548 )
1549 );
1550
1551 $this->end_controls_section();
1552
1553
1554 /* wrapper_style_section
1555 /*-------------------------------------*/
1556
1557 $this->start_controls_section(
1558 'wrapper_style_section',
1559 array(
1560 'label' => __( 'Wrapper', 'auxin-elements' ),
1561 'tab' => Controls_Manager::TAB_STYLE
1562 )
1563 );
1564
1565 $this->add_responsive_control(
1566 'wrapper_main_padding',
1567 array(
1568 'label' => __( 'Padding for main wrapper', 'auxin-elements' ),
1569 'type' => Controls_Manager::DIMENSIONS,
1570 'size_units' => array( 'px', '%' ),
1571 'selectors' => array(
1572 '{{WRAPPER}} .column-entry' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1573 )
1574 )
1575 );
1576
1577 $this->add_responsive_control(
1578 'wrapper_content_padding',
1579 array(
1580 'label' => __( 'Padding for content wrapper', 'auxin-elements' ),
1581 'type' => Controls_Manager::DIMENSIONS,
1582 'size_units' => array( 'px', '%' ),
1583 'selectors' => array(
1584 '{{WRAPPER}} .type-post .entry-main' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1585 )
1586 )
1587 );
1588
1589 $this->start_controls_tabs( 'button_background' );
1590
1591 $this->start_controls_tab(
1592 'button_bg_normal',
1593 array(
1594 'label' => __( 'Normal' , 'auxin-elements' )
1595 )
1596 );
1597
1598 $this->add_group_control(
1599 Group_Control_Background::get_type(),
1600 array(
1601 'name' => 'background',
1602 'label' => __( 'Background', 'auxin-elements' ),
1603 'types' => array( 'classic', 'gradient' ),
1604 'selector' => '{{WRAPPER}} .aux-col .column-entry',
1605 )
1606 );
1607
1608 $this->add_group_control(
1609 Group_Control_Box_Shadow::get_type(),
1610 array(
1611 'name' => 'box_shadow',
1612 'selector' => '{{WRAPPER}} .aux-col .column-entry'
1613 )
1614 );
1615
1616 $this->end_controls_tab();
1617
1618 $this->start_controls_tab(
1619 'button_bg_hover',
1620 array(
1621 'label' => __( 'Hover' , 'auxin-elements' )
1622 )
1623 );
1624
1625 $this->add_control(
1626 'general_hover_text_color',
1627 array(
1628 'label' => __( 'Text Color', 'auxin-elements' ),
1629 'type' => Controls_Manager::COLOR,
1630 'selectors' => array(
1631 '{{WRAPPER}} .aux-col:hover .entry-main a, {{WRAPPER}} .aux-col:hover .entry-main *' => 'transition:all 150ms ease; color:{{VALUE}};'
1632 )
1633 )
1634 );
1635
1636 $this->add_group_control(
1637 Group_Control_Background::get_type(),
1638 array(
1639 'name' => 'hover_background',
1640 'label' => __( 'Background', 'auxin-elements' ),
1641 'types' => array( 'classic', 'gradient' ),
1642 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry',
1643 )
1644 );
1645
1646 $this->add_group_control(
1647 Group_Control_Box_Shadow::get_type(),
1648 array(
1649 'name' => 'hover_box_shadow',
1650 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry'
1651 )
1652 );
1653
1654 $this->add_control(
1655 'hover_wrapper_transition_duration',
1656 array(
1657 'label' => __( 'Transition duration', 'auxin-elements' ),
1658 'type' => Controls_Manager::SLIDER,
1659 'range' => array(
1660 'px' => array(
1661 'min' => 0,
1662 'max' => 2000,
1663 'step' => 50
1664 )
1665 ),
1666 'selectors' => array(
1667 '{{WRAPPER}} .aux-col:hover .column-entry' => 'transition-duration:{{SIZE}}ms;'
1668 )
1669 )
1670 );
1671
1672 $this->end_controls_tab();
1673
1674 $this->end_controls_tabs();
1675
1676 $this->add_responsive_control(
1677 'align',
1678 array(
1679 'label' => __('Align','auxin-elements'),
1680 'type' => Controls_Manager::CHOOSE,
1681 'devices' => array( 'desktop', 'mobile' ),
1682 'options' => array(
1683 'left' => array(
1684 'title' => __( 'Left', 'auxin-elements' ),
1685 'icon' => 'eicon-text-align-left',
1686 ),
1687 'center' => array(
1688 'title' => __( 'Center', 'auxin-elements' ),
1689 'icon' => 'eicon-text-align-center',
1690 ),
1691 'right' => array(
1692 'title' => __( 'Right', 'auxin-elements' ),
1693 'icon' => 'eicon-text-align-right',
1694 ),
1695 ),
1696 'default' => 'left',
1697 'toggle' => true,
1698 'selectors' => array(
1699 '{{WRAPPER}}' => 'text-align: {{VALUE}}',
1700 )
1701 )
1702 );
1703
1704 $this->end_controls_section();
1705
1706 /* flip_wrapper_style_section
1707 /*-------------------------------------*/
1708
1709 $this->start_controls_section(
1710 'flip_wrapper_style_section',
1711 array(
1712 'label' => __( 'Flip Wrapper', 'auxin-elements' ),
1713 'tab' => Controls_Manager::TAB_STYLE,
1714 'condition' => array(
1715 'preview_mode' => 'flip'
1716 )
1717 )
1718 );
1719
1720 $this->start_controls_tabs( 'flip_button_background' );
1721
1722 $this->start_controls_tab(
1723 'flip_button_bg_normal',
1724 array(
1725 'label' => __( 'Normal' , 'auxin-elements' )
1726 )
1727 );
1728
1729 $this->add_group_control(
1730 Group_Control_Background::get_type(),
1731 array(
1732 'name' => 'flip_background',
1733 'label' => __( 'Background', 'auxin-elements' ),
1734 'types' => array( 'classic', 'gradient' ),
1735 'selector' => '{{WRAPPER}} .aux-col .aux-flip-back',
1736 )
1737 );
1738
1739 $this->add_group_control(
1740 Group_Control_Box_Shadow::get_type(),
1741 array(
1742 'name' => 'flip_box_shadow',
1743 'selector' => '{{WRAPPER}} .aux-col .aux-flip-back'
1744 )
1745 );
1746
1747 $this->end_controls_tab();
1748
1749 $this->start_controls_tab(
1750 'flip_button_bg_hover',
1751 array(
1752 'label' => __( 'Hover' , 'auxin-elements' )
1753 )
1754 );
1755
1756 $this->add_control(
1757 'flip_general_hover_text_color',
1758 array(
1759 'label' => __( 'Text Color', 'auxin-elements' ),
1760 'type' => Controls_Manager::COLOR,
1761 'selectors' => array(
1762 '{{WRAPPER}} .aux-col:hover .aux-flip-back .entry-main a, {{WRAPPER}} .aux-col:hover .aux-flip-back .entry-main *' => 'transition:all 150ms ease; color:{{VALUE}};'
1763 )
1764 )
1765 );
1766
1767 $this->add_group_control(
1768 Group_Control_Background::get_type(),
1769 array(
1770 'name' => 'flip_hover_background',
1771 'label' => __( 'Background', 'auxin-elements' ),
1772 'types' => array( 'classic', 'gradient' ),
1773 'selector' => '{{WRAPPER}} .aux-col:hover .aux-flip-back',
1774 )
1775 );
1776
1777 $this->add_group_control(
1778 Group_Control_Box_Shadow::get_type(),
1779 array(
1780 'name' => 'flip_hover_box_shadow',
1781 'selector' => '{{WRAPPER}} .aux-col:hover .aux-flip-back'
1782 )
1783 );
1784
1785 $this->end_controls_tab();
1786
1787 $this->end_controls_tabs();
1788
1789 $this->add_responsive_control(
1790 'flip_align',
1791 array(
1792 'label' => __('Align','auxin-elements'),
1793 'type' => Controls_Manager::CHOOSE,
1794 'devices' => array( 'desktop', 'mobile' ),
1795 'options' => array(
1796 'left' => array(
1797 'title' => __( 'Left', 'auxin-elements' ),
1798 'icon' => 'eicon-text-align-left',
1799 ),
1800 'center' => array(
1801 'title' => __( 'Center', 'auxin-elements' ),
1802 'icon' => 'eicon-text-align-center',
1803 ),
1804 'right' => array(
1805 'title' => __( 'Right', 'auxin-elements' ),
1806 'icon' => 'eicon-text-align-right',
1807 ),
1808 ),
1809 'default' => 'left',
1810 'toggle' => true,
1811 'selectors' => array(
1812 '{{WRAPPER}} .aux-flip-back' => 'text-align: {{VALUE}}',
1813 )
1814 )
1815 );
1816
1817 $this->add_responsive_control(
1818 'flip_wrapper_padding',
1819 array(
1820 'label' => __( 'Padding for content wrapper', 'auxin-elements' ),
1821 'type' => Controls_Manager::DIMENSIONS,
1822 'size_units' => array( 'px', '%' ),
1823 'selectors' => array(
1824 '{{WRAPPER}} .type-post .aux-flip-back' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1825 )
1826 )
1827 );
1828
1829 $this->end_controls_section();
1830
1831 /*-----------------------------------------------------------------------------------*/
1832 /* ReadMore Button
1833 /*-----------------------------------------------------------------------------------*/
1834
1835 $this->start_controls_section(
1836 'btn_section',
1837 array(
1838 'label' => __('Read More', 'auxin-elements' ),
1839 'tab' => Controls_Manager::TAB_STYLE,
1840 )
1841 );
1842
1843 $this->start_controls_tabs( 'btn_bg_tab' );
1844
1845 $this->start_controls_tab(
1846 'btn_bg_normal',
1847 array(
1848 'label' => __( 'Normal' , 'auxin-elements' )
1849 )
1850 );
1851
1852 $this->add_group_control(
1853 Group_Control_Background::get_type(),
1854 array(
1855 'name' => 'btn',
1856 'label' => __( 'Background', 'auxin-elements' ),
1857 'types' => array( 'classic', 'gradient' ),
1858 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more',
1859 )
1860 );
1861
1862 $this->add_group_control(
1863 Group_Control_Box_Shadow::get_type(),
1864 array(
1865 'name' => 'btn_shadow',
1866 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more'
1867 )
1868 );
1869
1870 $this->add_control(
1871 'btn_text_color',
1872 array(
1873 'label' => __( 'Color', 'auxin-elements' ),
1874 'type' => Controls_Manager::COLOR,
1875 'selectors' => array(
1876 '{{WRAPPER}} .entry-meta .aux-read-more' => 'color: {{VALUE}};',
1877 )
1878 )
1879 );
1880
1881 $this->add_group_control(
1882 Group_Control_Text_Shadow::get_type(),
1883 array(
1884 'name' => 'btn_text_shadow',
1885 'label' => __( 'Text Shadow', 'auxin-elements' ),
1886 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more',
1887 )
1888 );
1889
1890 $this->add_group_control(
1891 Group_Control_Typography::get_type(),
1892 array(
1893 'name' => 'btn_text_typography',
1894 'global' => [
1895 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1896 ],
1897 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more'
1898 )
1899 );
1900
1901 $this->end_controls_tab();
1902
1903 $this->start_controls_tab(
1904 'btn_bg_hover',
1905 array(
1906 'label' => __( 'Hover' , 'auxin-elements' )
1907 )
1908 );
1909
1910 $this->add_group_control(
1911 Group_Control_Background::get_type(),
1912 array(
1913 'name' => 'btn_bg_hover',
1914 'label' => __( 'Background', 'auxin-elements' ),
1915 'types' => array( 'classic', 'gradient' ),
1916 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover',
1917 )
1918 );
1919
1920 $this->add_group_control(
1921 Group_Control_Box_Shadow::get_type(),
1922 array(
1923 'name' => 'btn_shadow_hover',
1924 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover'
1925 )
1926 );
1927
1928 $this->add_control(
1929 'btn_text_color_hover',
1930 array(
1931 'label' => __( 'Color', 'auxin-elements' ),
1932 'type' => Controls_Manager::COLOR,
1933 'selectors' => array(
1934 '{{WRAPPER}} .entry-meta .aux-read-more:hover' => 'color: {{VALUE}};',
1935 )
1936 )
1937 );
1938
1939 $this->add_group_control(
1940 Group_Control_Text_Shadow::get_type(),
1941 array(
1942 'name' => 'btn_text_shadow_hover',
1943 'label' => __( 'Text Shadow', 'auxin-elements' ),
1944 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover',
1945 )
1946 );
1947
1948 $this->add_group_control(
1949 Group_Control_Typography::get_type(),
1950 array(
1951 'name' => 'btn_text_typography_hover',
1952 'global' => [
1953 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1954 ],
1955 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover'
1956 )
1957 );
1958
1959 $this->end_controls_tab();
1960
1961 $this->end_controls_tabs();
1962
1963 $this->add_responsive_control(
1964 'btn_padding',
1965 array(
1966 'label' => __( 'Button Padding', 'auxin-elements' ),
1967 'type' => Controls_Manager::DIMENSIONS,
1968 'size_units' => array( 'px', '%' ),
1969 'selectors' => array(
1970 '{{WRAPPER}} .entry-meta .aux-read-more' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1971 ),
1972 )
1973 );
1974
1975 $this->end_controls_section();
1976
1977 }
1978
1979 /**
1980 * Render image box widget output on the frontend.
1981 *
1982 * Written in PHP and used to generate the final HTML.
1983 *
1984 * @since 1.0.0
1985 * @access protected
1986 */
1987 protected function render() {
1988
1989 $settings = $this->get_settings_for_display();
1990 $settings['post_media_size'] = $settings['post_media_size'] == 'auto' ? '' : $settings['post_media_size'];
1991
1992 if ( ! in_array( $settings['post_media_size'], auxin_get_available_image_sizes() ) ) {
1993 $settings['post_media_size'] = '';
1994 }
1995
1996 $args = array(
1997 // Display section
1998 'show_media' => $settings['show_media'],
1999 'size' => $settings['post_media_size'],
2000 'ignore_formats' => $settings['ignore_formats'],
2001 'preloadable' => $settings['preloadable'],
2002 'preload_preview' => $settings['preload_preview'],
2003 'preload_bgcolor' => $settings['preload_bgcolor'],
2004 'display_title' => $settings['display_title'],
2005 'words_num' => $settings['words_num'],
2006 'show_info' => $settings['show_info'],
2007 'show_format_icon' => $settings['show_format_icon'],
2008 'post_info_position' => $settings['post_info_position'],
2009 'meta_info_position' => $settings['meta_info_position'],
2010 'display_comments' => $settings['display_comments'],
2011 'display_like' => $settings['display_like'],
2012 'show_content' => $settings['show_content'],
2013 'display_categories' => $settings['display_categories'],
2014 'max_taxonomy_num' => $settings['max_taxonomy_num'],
2015 'show_badge' => $settings['show_badge'],
2016 'show_date' => $settings['show_date'],
2017 'show_excerpt' => $settings['show_excerpt'],
2018 'excerpt_len' => $settings['excerpt_len'],
2019 'author_or_readmore' => $settings['author_or_readmore'],
2020 'display_author_header' => $settings['display_author_header'],
2021 'display_author_footer' => $settings['display_author_footer'],
2022
2023 // Content Section
2024 'desktop_cnum' => $settings['columns'],
2025 'tablet_cnum' => $settings['columns_tablet'],
2026 'phone_cnum' => $settings['columns_mobile'],
2027 'preview_mode' => $settings['preview_mode'],
2028 'content_layout' => $settings['content_layout'],
2029 'grid_table_hover' => $settings['grid_table_hover'],
2030 'carousel_space' => $settings['carousel_space'],
2031 'carousel_navigation' => $settings['carousel_navigation'],
2032 'carousel_navigation_control' => $settings['carousel_navigation_control'],
2033 'carousel_nav_control_pos' => $settings['carousel_nav_control_pos'],
2034 'carousel_nav_control_skin' => $settings['carousel_nav_control_skin'],
2035 'carousel_loop' => $settings['carousel_loop'],
2036 'carousel_autoplay' => $settings['carousel_autoplay'],
2037 'carousel_autoplay_delay' => $settings['carousel_autoplay_delay'],
2038
2039 // Query Section
2040 'cat' => $settings['cat'],
2041 'num' => $settings['num'],
2042 'exclude_without_media' => $settings['exclude_without_media'],
2043 'exclude_custom_post_formats' => $settings['exclude_custom_post_formats'],
2044 'include_post_formats_in' => $settings['include_post_formats_in'],
2045 'exclude_quote_link' => $settings['exclude_quote_link'],
2046 'order_by' => $settings['order_by'],
2047 'order' => $settings['order'],
2048 'only_posts__in' => $settings['only_posts__in'],
2049 'include' => $settings['include'],
2050 'exclude' => $settings['exclude'],
2051 'offset' => $settings['offset'],
2052
2053 // Paginate Section
2054 'loadmore_type' => $settings['loadmore_type'],
2055
2056 // Style Section
2057 'image_aspect_ratio' => $settings['image_aspect_ratio'] === 'custom' ? $settings['image_aspect_ratio_custom']['size'] : $settings['image_aspect_ratio'],
2058 );
2059
2060 $args['image_aspect_ratio'] = empty( $args['image_aspect_ratio' ] ) ? 0.75 : $args['image_aspect_ratio'];
2061
2062 if( auxin_is_true( $settings['use_wp_query'] ) ){
2063 $args['use_wp_query'] = true;
2064 $args['reset_query'] = false;
2065 $args['request_from'] = 'archive';
2066 $args['paged'] = max( 1, get_query_var('paged'), get_query_var('page') );
2067 }
2068
2069 // get the shortcode base blog page
2070 echo auxin_widget_recent_posts_callback( $args );
2071
2072 }
2073
2074 }
2075