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