PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.5.8
Shortcodes and extra features for Phlox theme v2.5.8
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / recent-posts-grid-carousel.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 6 years ago accordion.php 6 years ago audio.php 6 years ago before-after.php 6 years ago button.php 6 years ago carousel-navigation.php 6 years ago contact-box.php 6 years ago contact-form.php 6 years ago custom-list.php 6 years ago divider.php 6 years ago gallery.php 6 years ago gmap.php 6 years ago heading-modern.php 6 years ago icon.php 6 years ago image.php 6 years ago mailchimp.php 6 years ago modern-button.php 6 years ago quote.php 6 years ago recent-comments.php 6 years ago recent-posts-grid-carousel.php 6 years ago recent-posts-land-style.php 6 years ago recent-posts-masonry.php 6 years ago recent-posts-tiles-carousel.php 6 years ago recent-posts-tiles.php 6 years ago recent-posts-timeline.php 6 years ago recent-products.php 6 years ago search.php 6 years ago staff.php 6 years ago svg.php 6 years ago tabs.php 6 years ago testimonial.php 6 years ago text.php 6 years ago touch-slider.php 6 years ago video.php 6 years ago
recent-posts-grid-carousel.php
2003 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7 use Elementor\Group_Control_Typography;
8 use Elementor\Scheme_Typography;
9 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 'ignore_formats',
350 array(
351 'label' => __('Ignore post formats media','auxin-elements' ),
352 'label_block' => true,
353 'type' => Controls_Manager::SWITCHER,
354 'label_on' => __( 'On', 'auxin-elements' ),
355 'label_off' => __( 'Off', 'auxin-elements' ),
356 'return_value' => 'yes',
357 'default' => 'no',
358 'label_block' => true,
359 'condition' => array(
360 'show_media' => 'yes'
361 )
362 )
363 );
364
365 $this->add_control(
366 'preloadable',
367 array(
368 'label' => __('Preload image','auxin-elements' ),
369 'type' => Controls_Manager::SWITCHER,
370 'label_on' => __( 'On', 'auxin-elements' ),
371 'label_off' => __( 'Off', 'auxin-elements' ),
372 'return_value' => 'yes',
373 'default' => 'no',
374 'condition' => array(
375 'show_media' => 'yes',
376 )
377 )
378 );
379
380 $this->add_control(
381 'preload_preview',
382 array(
383 'label' => __('While loading image display','auxin-elements' ),
384 'label_block' => true,
385 'type' => Controls_Manager::SELECT,
386 'options' => auxin_get_preloadable_previews(),
387 'return_value' => 'yes',
388 'default' => 'yes',
389 'condition' => array(
390 'preloadable' => 'yes'
391 )
392 )
393 );
394
395 $this->add_control(
396 'preload_bgcolor',
397 array(
398 'label' => __( 'Placeholder color while loading image', 'auxin-elements' ),
399 'type' => Controls_Manager::COLOR,
400 'condition' => array(
401 'preloadable' => 'yes',
402 'preload_preview' => array('simple-spinner', 'simple-spinner-light', 'simple-spinner-dark')
403 )
404 )
405 );
406
407 $this->add_control(
408 'display_title',
409 array(
410 'label' => __('Display post title', 'auxin-elements' ),
411 'type' => Controls_Manager::SWITCHER,
412 'label_on' => __( 'On', 'auxin-elements' ),
413 'label_off' => __( 'Off', 'auxin-elements' ),
414 'return_value' => 'yes',
415 'default' => 'yes'
416 )
417 );
418
419 $this->add_control(
420 'words_num',
421 array(
422 'label' => __( 'Title Trim', 'auxin-elements' ),
423 'type' => Controls_Manager::NUMBER,
424 'default' => '',
425 'condition' => array(
426 'display_title' => 'yes',
427 )
428 )
429 );
430
431 $this->add_control(
432 'show_info',
433 array(
434 'label' => __('Display post info','auxin-elements' ),
435 'type' => Controls_Manager::SWITCHER,
436 'label_on' => __( 'On', 'auxin-elements' ),
437 'label_off' => __( 'Off', 'auxin-elements' ),
438 'return_value' => 'yes',
439 'default' => 'yes'
440 )
441 );
442
443 $this->add_control(
444 'show_format_icon',
445 array(
446 'label' => __('Display format icon','auxin-elements' ),
447 'type' => Controls_Manager::SWITCHER,
448 'label_on' => __( 'On', 'auxin-elements' ),
449 'label_off' => __( 'Off', 'auxin-elements' ),
450 'return_value' => 'yes',
451 'default' => 'no'
452 )
453 );
454
455 $this->add_control(
456 'post_info_position',
457 array(
458 'label' => __('Post info position', 'auxin-elements' ),
459 'type' => Controls_Manager::SELECT,
460 'default' => 'after-title',
461 'options' => array(
462 'after-title' => __('After Title' , 'auxin-elements' ),
463 'before-title' => __('Before Title', 'auxin-elements' )
464 ),
465 'condition' => array(
466 'show_info' => 'yes',
467 'preview_mode!' => 'flip'
468 )
469 )
470 );
471
472 $this->add_control(
473 'display_categories',
474 array(
475 'label' => __('Display Categories','auxin-elements' ),
476 'type' => Controls_Manager::SWITCHER,
477 'label_on' => __( 'On', 'auxin-elements' ),
478 'label_off' => __( 'Off', 'auxin-elements' ),
479 'return_value' => 'yes',
480 'default' => 'yes',
481 'condition' => array(
482 'show_info' => 'yes',
483 )
484 )
485 );
486
487 $this->add_control(
488 'show_badge',
489 array(
490 'label' => __('Display Category Badge', 'auxin-elements' ),
491 'type' => Controls_Manager::SWITCHER,
492 'label_on' => __( 'On', 'auxin-elements' ),
493 'label_off' => __( 'Off', 'auxin-elements' ),
494 'return_value' => 'yes',
495 'default' => 'no'
496 )
497 );
498
499 $this->add_control(
500 'show_date',
501 array(
502 'label' => __('Display Date','auxin-elements' ),
503 'type' => Controls_Manager::SWITCHER,
504 'label_on' => __( 'On', 'auxin-elements' ),
505 'label_off' => __( 'Off', 'auxin-elements' ),
506 'return_value' => 'yes',
507 'default' => 'yes',
508 'condition' => array(
509 'show_info' => 'yes',
510 )
511 )
512 );
513
514 $this->add_control(
515 'display_author_header',
516 array(
517 'label' => __('Display Author in Header','auxin-elements' ),
518 'description' => __('Enable it to display author name in header','auxin-elements' ),
519 'type' => Controls_Manager::SWITCHER,
520 'label_on' => __( 'On', 'auxin-elements' ),
521 'label_off' => __( 'Off', 'auxin-elements' ),
522 'return_value' => 'yes',
523 'default' => 'yes',
524 )
525 );
526
527 $this->add_control(
528 'show_content',
529 array(
530 'label' => __('Display post content','auxin-elements' ),
531 'type' => Controls_Manager::SWITCHER,
532 'label_on' => __( 'On', 'auxin-elements' ),
533 'label_off' => __( 'Off', 'auxin-elements' ),
534 'return_value' => 'yes',
535 'default' => 'yes'
536 )
537 );
538
539 $this->add_control(
540 'display_comments',
541 array(
542 'label' => __('Display Comments Number', 'auxin-elements' ),
543 'type' => Controls_Manager::SWITCHER,
544 'label_on' => __( 'On', 'auxin-elements' ),
545 'label_off' => __( 'Off', 'auxin-elements' ),
546 'return_value' => 'yes',
547 'default' => 'yes'
548 )
549 );
550
551 $this->add_control(
552 'display_like',
553 array(
554 'label' => __('Display like button', 'auxin-elements' ),
555 'type' => Controls_Manager::SWITCHER,
556 'label_on' => __( 'On', 'auxin-elements' ),
557 'label_off' => __( 'Off', 'auxin-elements' ),
558 'return_value' => 'yes',
559 'default' => 'yes'
560 )
561 );
562
563 $this->add_control(
564 'show_excerpt',
565 array(
566 'label' => __('Display excerpt','auxin-elements' ),
567 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
568 'type' => Controls_Manager::SWITCHER,
569 'label_on' => __( 'On', 'auxin-elements' ),
570 'label_off' => __( 'Off', 'auxin-elements' ),
571 'return_value' => 'yes',
572 'default' => 'yes'
573 )
574 );
575
576 $this->add_control(
577 'excerpt_len',
578 array(
579 'label' => __('Excerpt length','auxin-elements' ),
580 'description' => __('Specify summary content in character.','auxin-elements' ),
581 'type' => Controls_Manager::NUMBER,
582 'default' => '160',
583 'condition' => array(
584 'show_excerpt' => 'yes',
585 )
586 )
587 );
588
589 $this->add_control(
590 'author_or_readmore',
591 array(
592 'label' => __('Display author or read more', 'auxin-elements'),
593 'label_block' => true,
594 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
595 'type' => Controls_Manager::SELECT,
596 'default' => 'readmore',
597 'options' => array(
598 'readmore' => __('Read More', 'auxin-elements'),
599 'author' => __('Author Name', 'auxin-elements'),
600 'none' => __('None', 'auxin-elements')
601 ),
602 'label_block' => true
603 )
604 );
605
606 $this->add_control(
607 'display_author_footer',
608 array(
609 'label' => __('Display Author in Footer','auxin-elements' ),
610 'description' => __('Enable it to display author name in footer','auxin-elements' ),
611 'type' => Controls_Manager::SWITCHER,
612 'label_on' => __( 'On', 'auxin-elements' ),
613 'label_off' => __( 'Off', 'auxin-elements' ),
614 'return_value' => 'yes',
615 'default' => 'no',
616 'condition' => array(
617 'author_or_readmore' => 'author',
618 )
619 )
620 );
621
622 $this->add_control(
623 'meta_info_position',
624 array(
625 'label' => __('Meta info position', 'auxin-elements' ),
626 'type' => Controls_Manager::SELECT,
627 'default' => 'after-content',
628 'options' => array(
629 'after-content' => __('After Content' , 'auxin-elements' ),
630 'before-content' => __('Before Content', 'auxin-elements' )
631 ),
632 'condition' => array(
633 'preview_mode!' => 'flip'
634 )
635 )
636 );
637
638 $this->end_controls_section();
639
640 /*-----------------------------------------------------------------------------------*/
641 /* query_section
642 /*-----------------------------------------------------------------------------------*/
643
644 $this->start_controls_section(
645 'query_section',
646 array(
647 'label' => __('Query', 'auxin-elements' ),
648 )
649 );
650
651 $this->add_control(
652 'use_wp_query',
653 array(
654 'label' => __('Use wp query','auxin-elements' ),
655 'type' => Controls_Manager::SWITCHER,
656 'label_on' => __( 'On', 'auxin-elements' ),
657 'label_off' => __( 'Off', 'auxin-elements' ),
658 'return_value' => 'yes',
659 'default' => 'no'
660 )
661 );
662
663 $this->add_control(
664 'cat',
665 array(
666 'label' => __('Categories', 'auxin-elements'),
667 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
668 'type' => Controls_Manager::SELECT2,
669 'multiple' => true,
670 'options' => $this->get_terms(),
671 'default' => array( ' ' ),
672 'condition' => array(
673 'use_wp_query!' => 'yes'
674 )
675 )
676 );
677
678 $this->add_control(
679 'num',
680 array(
681 'label' => __('Number of posts to show', 'auxin-elements'),
682 'label_block' => true,
683 'type' => Controls_Manager::NUMBER,
684 'default' => '8',
685 'min' => 1,
686 'step' => 1
687 )
688 );
689
690 $this->add_control(
691 'exclude_without_media',
692 array(
693 'label' => __('Exclude posts without media','auxin-elements' ),
694 'type' => Controls_Manager::SWITCHER,
695 'label_on' => __( 'On', 'auxin-elements' ),
696 'label_off' => __( 'Off', 'auxin-elements' ),
697 'return_value' => 'yes',
698 'default' => 'no',
699 'condition' => array(
700 'use_wp_query!' => 'yes'
701 )
702 )
703 );
704
705 $this->add_control(
706 'exclude_custom_post_formats',
707 array(
708 'label' => __('Exclude all custom post formats','auxin-elements' ),
709 'type' => Controls_Manager::SWITCHER,
710 'label_on' => __( 'On', 'auxin-elements' ),
711 'label_off' => __( 'Off', 'auxin-elements' ),
712 'return_value' => 'yes',
713 'default' => 'no',
714 'condition' => array(
715 'use_wp_query!' => 'yes'
716 )
717 )
718 );
719
720 $this->add_control(
721 'include_post_formats_in',
722 array(
723 'label' => __('Include custom post formats', 'auxin-elements'),
724 'type' => Controls_Manager::SELECT2,
725 'multiple' => true,
726 'options' => array(
727 'aside' => __('Aside', 'auxin-elements'),
728 'gallery' => __('Gallery', 'auxin-elements'),
729 'image' => __('Image', 'auxin-elements'),
730 'link' => __('Link', 'auxin-elements'),
731 'quote' => __('Quote', 'auxin-elements'),
732 'video' => __('Video', 'auxin-elements'),
733 'audio' => __('Audio', 'auxin-elements')
734 ),
735 'condition' => array(
736 'exclude_custom_post_formats!' => 'yes',
737 'use_wp_query!' => 'yes'
738 )
739 )
740 );
741
742 $this->add_control(
743 'exclude_quote_link',
744 array(
745 'label' => __('Exclude quote and link post formats','auxin-elements' ),
746 'type' => Controls_Manager::SWITCHER,
747 'label_on' => __( 'On', 'auxin-elements' ),
748 'label_off' => __( 'Off', 'auxin-elements' ),
749 'return_value' => 'yes',
750 'default' => 'no',
751 'condition' => array(
752 'exclude_custom_post_formats' => 'yes',
753 'use_wp_query!' => 'yes'
754 )
755 )
756 );
757
758
759 $this->add_control(
760 'order_by',
761 array(
762 'label' => __('Order by', 'auxin-elements'),
763 'type' => Controls_Manager::SELECT,
764 'default' => 'date',
765 'options' => array(
766 'date' => __('Date', 'auxin-elements'),
767 'menu_order date' => __('Menu Order', 'auxin-elements'),
768 'title' => __('Title', 'auxin-elements'),
769 'ID' => __('ID', 'auxin-elements'),
770 'rand' => __('Random', 'auxin-elements'),
771 'comment_count' => __('Comments', 'auxin-elements'),
772 'modified' => __('Date Modified', 'auxin-elements'),
773 'author' => __('Author', 'auxin-elements'),
774 'post__in' => __('Inserted Post IDs', 'auxin-elements')
775 ),
776 'condition' => array(
777 'use_wp_query!' => 'yes'
778 )
779 )
780 );
781
782 $this->add_control(
783 'order',
784 array(
785 'label' => __('Order', 'auxin-elements'),
786 'type' => Controls_Manager::SELECT,
787 'default' => 'DESC',
788 'options' => array(
789 'DESC' => __('Descending', 'auxin-elements'),
790 'ASC' => __('Ascending', 'auxin-elements'),
791 ),
792 'condition' => array(
793 'use_wp_query!' => 'yes'
794 )
795 )
796 );
797
798 $this->add_control(
799 'only_posts__in',
800 array(
801 'label' => __('Only posts','auxin-elements' ),
802 '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' ),
803 'type' => Controls_Manager::TEXT,
804 'condition' => array(
805 'use_wp_query!' => 'yes'
806 )
807 )
808 );
809
810 $this->add_control(
811 'include',
812 array(
813 'label' => __('Include posts','auxin-elements' ),
814 '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' ),
815 'type' => Controls_Manager::TEXT,
816 'condition' => array(
817 'use_wp_query!' => 'yes'
818 )
819 )
820 );
821
822 $this->add_control(
823 'exclude',
824 array(
825 'label' => __('Exclude posts','auxin-elements' ),
826 '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' ),
827 'type' => Controls_Manager::TEXT,
828 'condition' => array(
829 'use_wp_query!' => 'yes'
830 )
831 )
832 );
833
834 $this->add_control(
835 'offset',
836 array(
837 'label' => __('Start offset','auxin-elements' ),
838 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
839 'type' => Controls_Manager::NUMBER,
840 'condition' => array(
841 'use_wp_query!' => 'yes'
842 )
843 )
844 );
845
846 $this->end_controls_section();
847
848 /*-----------------------------------------------------------------------------------*/
849 /* paginate_section
850 /*-----------------------------------------------------------------------------------*/
851
852 $this->start_controls_section(
853 'paginate_section',
854 array(
855 'label' => __('Paginate', 'auxin-elements' ),
856 )
857 );
858
859 $this->add_control(
860 'loadmore_type',
861 array(
862 'label' => __('Load More Type','auxin-elements' ),
863 'type' => 'aux-visual-select',
864 'options' => array(
865 '' => array(
866 'label' => __('None', 'auxin-elements' ),
867 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
868 ),
869 'scroll' => array(
870 'label' => __('Infinite Scroll', 'auxin-elements' ),
871 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
872 ),
873 'next' => array(
874 'label' => __('Next Button', 'auxin-elements' ),
875 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
876 ),
877 'next-prev' => array(
878 'label' => __('Next Prev', 'auxin-elements' ),
879 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
880 )
881 ),
882 'default' => ''
883 )
884 );
885
886 $this->end_controls_section();
887
888 /*-----------------------------------------------------------------------------------*/
889 /* image_style_section
890 /*-----------------------------------------------------------------------------------*/
891
892 $this->start_controls_section(
893 'image_style_section',
894 array(
895 'label' => __( 'Image', 'auxin-elements' ),
896 'tab' => Controls_Manager::TAB_STYLE,
897 'condition' => array(
898 'show_media' => 'yes',
899 ),
900 )
901 );
902
903 $this->add_control(
904 'image_aspect_ratio',
905 array(
906 'label' => __('Image aspect ratio', 'auxin-elements'),
907 'type' => Controls_Manager::SELECT,
908 'default' => '0.75',
909 'options' => array(
910 '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
911 '0.56' => __('Horizontal 16:9', 'auxin-elements'),
912 '1.00' => __('Square 1:1' , 'auxin-elements'),
913 '1.33' => __('Vertical 3:4' , 'auxin-elements'),
914 'custom' => __('Custom' , 'auxin-elements'),
915 ),
916 'condition' => array(
917 'show_media' => 'yes',
918 ),
919 )
920 );
921
922
923 $this->add_responsive_control(
924 'image_aspect_ratio_custom',
925 array(
926 'label' => __( 'Custom Aspect Ratio', 'auxin-elements' ),
927 'type' => Controls_Manager::SLIDER,
928 'range' => array(
929 'px' => array(
930 'min' => 0,
931 'max' => 3,
932 'step' => 0.1
933 ),
934 ),
935 'condition' => array(
936 'image_aspect_ratio' => 'custom',
937 ),
938 )
939 );
940
941 $this->add_control(
942 'img_border_radius',
943 array(
944 'label' => __( 'Border Radius', 'auxin-elements' ),
945 'type' => Controls_Manager::DIMENSIONS,
946 'size_units' => array( 'px', '%' ),
947 'selectors' => array(
948 '{{WRAPPER}} .entry-media img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
949 ),
950 'condition' => array(
951 'show_media' => 'yes',
952 ),
953 )
954 );
955
956 $this->start_controls_tabs( 'img_tabs' );
957
958 $this->start_controls_tab(
959 'image_tab_normal',
960 array(
961 'label' => __( 'Normal' , 'auxin-elements' ),
962 'condition' => array(
963 'show_media' => 'yes',
964 ),
965 )
966 );
967
968 $this->add_group_control(
969 Group_Control_Box_Shadow::get_type(),
970 array(
971 'name' => 'img_normal_box_shadow',
972 'selector' => '{{WRAPPER}} .aux-media-image',
973 'condition' => array(
974 'show_media' => 'yes',
975 ),
976 )
977 );
978
979 $this->end_controls_tab();
980
981 $this->start_controls_tab(
982 'image_tab_hover',
983 array(
984 'label' => __( 'Hover' , 'auxin-elements' ),
985 'condition' => array(
986 'show_media' => 'yes',
987 ),
988 )
989 );
990
991 $this->add_group_control(
992 Group_Control_Box_Shadow::get_type(),
993 array(
994 'name' => 'img_hover_box_shadow',
995 'selector' => '{{WRAPPER}} .post:hover .aux-media-image',
996 'condition' => array(
997 'show_media' => 'yes',
998 ),
999 )
1000 );
1001
1002 $this->end_controls_tab();
1003
1004 $this->end_controls_tabs();
1005
1006 $this->end_controls_section();
1007
1008 /*-----------------------------------------------------------------------------------*/
1009 /* title_style_section
1010 /*-----------------------------------------------------------------------------------*/
1011
1012 $this->start_controls_section(
1013 'title_style_section',
1014 array(
1015 'label' => __( 'Title', 'auxin-elements' ),
1016 'tab' => Controls_Manager::TAB_STYLE,
1017 'condition' => array(
1018 'display_title' => 'yes',
1019 ),
1020 )
1021 );
1022
1023 $this->start_controls_tabs( 'title_colors' );
1024
1025 $this->start_controls_tab(
1026 'title_color_normal',
1027 array(
1028 'label' => __( 'Normal' , 'auxin-elements' ),
1029 'condition' => array(
1030 'display_title' => 'yes',
1031 ),
1032 )
1033 );
1034
1035 $this->add_control(
1036 'title_color',
1037 array(
1038 'label' => __( 'Color', 'auxin-elements' ),
1039 'type' => Controls_Manager::COLOR,
1040 'selectors' => array(
1041 '{{WRAPPER}} .entry-title a' => 'color: {{VALUE}};',
1042 ),
1043 'condition' => array(
1044 'display_title' => 'yes',
1045 ),
1046 )
1047 );
1048
1049 $this->end_controls_tab();
1050
1051 $this->start_controls_tab(
1052 'title_color_hover',
1053 array(
1054 'label' => __( 'Hover' , 'auxin-elements' ),
1055 'condition' => array(
1056 'display_title' => 'yes',
1057 ),
1058 )
1059 );
1060
1061 $this->add_control(
1062 'title_hover_color',
1063 array(
1064 'label' => __( 'Color', 'auxin-elements' ),
1065 'type' => Controls_Manager::COLOR,
1066 'selectors' => array(
1067 '{{WRAPPER}} .entry-title a:hover' => 'color: {{VALUE}};',
1068 ),
1069 'condition' => array(
1070 'display_title' => 'yes',
1071 ),
1072 )
1073 );
1074
1075 $this->end_controls_tab();
1076
1077 $this->end_controls_tabs();
1078
1079 $this->add_group_control(
1080 Group_Control_Typography::get_type(),
1081 array(
1082 'name' => 'title_typography',
1083 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1084 'selector' => '{{WRAPPER}} .entry-title a',
1085 'condition' => array(
1086 'display_title' => 'yes',
1087 ),
1088 )
1089 );
1090
1091 $this->add_responsive_control(
1092 'title_margin_bottom',
1093 array(
1094 'label' => __( 'Bottom space', 'auxin-elements' ),
1095 'type' => Controls_Manager::SLIDER,
1096 'range' => array(
1097 'px' => array(
1098 'max' => 100,
1099 ),
1100 ),
1101 'selectors' => array(
1102 '{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1103 ),
1104 'condition' => array(
1105 'display_title' => 'yes',
1106 ),
1107 )
1108 );
1109
1110 $this->end_controls_section();
1111
1112 /*-----------------------------------------------------------------------------------*/
1113 /* info_style_section
1114 /*-----------------------------------------------------------------------------------*/
1115
1116 $this->start_controls_section(
1117 'info_style_section',
1118 array(
1119 'label' => __( 'Post Info', 'auxin-elements' ),
1120 'tab' => Controls_Manager::TAB_STYLE,
1121 'condition' => array(
1122 'show_info' => 'yes',
1123 ),
1124 )
1125 );
1126
1127 $this->start_controls_tabs( 'info_colors' );
1128
1129 $this->start_controls_tab(
1130 'info_color_normal',
1131 array(
1132 'label' => __( 'Normal' , 'auxin-elements' ),
1133 'condition' => array(
1134 'show_info' => 'yes',
1135 ),
1136 )
1137 );
1138
1139 $this->add_control(
1140 'info_color',
1141 array(
1142 'label' => __( 'Color', 'auxin-elements' ),
1143 'type' => Controls_Manager::COLOR,
1144 'selectors' => array(
1145 '{{WRAPPER}} .entry-info a, {{WRAPPER}} .entry-info' => 'color: {{VALUE}};',
1146 ),
1147 'condition' => array(
1148 'show_info' => 'yes',
1149 ),
1150 )
1151 );
1152
1153 $this->end_controls_tab();
1154
1155 $this->start_controls_tab(
1156 'info_color_hover',
1157 array(
1158 'label' => __( 'Hover' , 'auxin-elements' ),
1159 'condition' => array(
1160 'show_info' => 'yes',
1161 ),
1162 )
1163 );
1164
1165 $this->add_control(
1166 'info_hover_color',
1167 array(
1168 'label' => __( 'Color', 'auxin-elements' ),
1169 'type' => Controls_Manager::COLOR,
1170 'selectors' => array(
1171 '{{WRAPPER}} .entry-info a:hover' => 'color: {{VALUE}};',
1172 ),
1173 'condition' => array(
1174 'show_info' => 'yes',
1175 ),
1176 )
1177 );
1178
1179 $this->end_controls_tab();
1180
1181 $this->end_controls_tabs();
1182
1183 $this->add_group_control(
1184 Group_Control_Typography::get_type(),
1185 array(
1186 'name' => 'info_typography',
1187 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1188 'selector' => '{{WRAPPER}} .entry-info, {{WRAPPER}} .entry-info a',
1189 'condition' => array(
1190 'show_info' => 'yes',
1191 ),
1192 )
1193 );
1194
1195 $this->add_responsive_control(
1196 'info_margin_bottom',
1197 array(
1198 'label' => __( 'Bottom space', 'auxin-elements' ),
1199 'type' => Controls_Manager::SLIDER,
1200 'range' => array(
1201 'px' => array(
1202 'max' => 100
1203 )
1204 ),
1205 'selectors' => array(
1206 '{{WRAPPER}} .entry-info' => 'margin-bottom: {{SIZE}}{{UNIT}};'
1207 ),
1208 'condition' => array(
1209 'show_info' => 'yes'
1210 )
1211 )
1212 );
1213
1214 $this->add_responsive_control(
1215 'info_spacing_between',
1216 array(
1217 'label' => __( 'Space between metas', 'auxin-elements' ),
1218 'type' => Controls_Manager::SLIDER,
1219 'range' => array(
1220 'px' => array(
1221 'max' => 30
1222 )
1223 ),
1224 'selectors' => array(
1225 '{{WRAPPER}} .entry-info [class^="entry-"] + [class^="entry-"]:before, {{WRAPPER}} .entry-info .entry-tax a:after' =>
1226 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};'
1227 ),
1228 'condition' => array(
1229 'show_info' => 'yes'
1230 )
1231 )
1232 );
1233
1234 $this->end_controls_section();
1235
1236 /*-----------------------------------------------------------------------------------*/
1237 /* content_style_section
1238 /*-----------------------------------------------------------------------------------*/
1239
1240 $this->start_controls_section(
1241 'content_style_section',
1242 array(
1243 'label' => __( 'Excerpt', 'auxin-elements' ),
1244 'tab' => Controls_Manager::TAB_STYLE,
1245 'condition' => array(
1246 'show_excerpt' => 'yes',
1247 )
1248 )
1249 );
1250
1251 $this->add_control(
1252 'content_color',
1253 array(
1254 'label' => __( 'Color', 'auxin-elements' ),
1255 'type' => Controls_Manager::COLOR,
1256 'selectors' => array(
1257 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}};',
1258 ),
1259 'condition' => array(
1260 'show_excerpt' => 'yes',
1261 ),
1262 )
1263 );
1264
1265 $this->add_group_control(
1266 Group_Control_Typography::get_type(),
1267 array(
1268 'name' => 'content_typography',
1269 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1270 'selector' => '{{WRAPPER}} .entry-content',
1271 'condition' => array(
1272 'show_excerpt' => 'yes',
1273 ),
1274 )
1275 );
1276
1277 $this->add_responsive_control(
1278 'content_margin_bottom',
1279 array(
1280 'label' => __( 'Bottom space', 'auxin-elements' ),
1281 'type' => Controls_Manager::SLIDER,
1282 'range' => array(
1283 'px' => array(
1284 'max' => 100,
1285 ),
1286 ),
1287 'selectors' => array(
1288 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1289 ),
1290 'condition' => array(
1291 'show_excerpt' => 'yes',
1292 ),
1293 )
1294 );
1295
1296 $this->end_controls_section();
1297
1298
1299 /*-----------------------------------------------------------------------------------*/
1300 /* badge_style_section
1301 /*-----------------------------------------------------------------------------------*/
1302
1303 $this->start_controls_section(
1304 'badge_style_section',
1305 array(
1306 'label' => __( 'Badge', 'auxin-elements' ),
1307 'tab' => Controls_Manager::TAB_STYLE,
1308 'condition' => array(
1309 'show_badge' => 'yes',
1310 )
1311 )
1312 );
1313
1314 $this->start_controls_tabs( 'badge_colors' );
1315
1316 $this->start_controls_tab(
1317 'badge_color_normal',
1318 array(
1319 'label' => __( 'Normal' , 'auxin-elements' )
1320 )
1321 );
1322
1323 $this->add_group_control(
1324 Group_Control_Background::get_type(),
1325 array(
1326 'name' => 'badge_background_color',
1327 'label' => __( 'Background', 'auxin-elements' ),
1328 'types' => array( 'classic', 'gradient' ),
1329 'selector' => '{{WRAPPER}} .entry-badge',
1330 )
1331 );
1332
1333 $this->add_control(
1334 'badge_text_color',
1335 array(
1336 'label' => __( 'Text', 'auxin-elements' ),
1337 'type' => Controls_Manager::COLOR,
1338 'selectors' => array(
1339 '{{WRAPPER}} .entry-badge a' => 'color: {{VALUE}} !important;',
1340 )
1341 )
1342 );
1343
1344 $this->end_controls_tab();
1345
1346 $this->start_controls_tab(
1347 'badge_color_hover',
1348 array(
1349 'label' => __( 'Hover' , 'auxin-elements' )
1350 )
1351 );
1352
1353 $this->add_group_control(
1354 Group_Control_Background::get_type(),
1355 array(
1356 'name' => 'badge_hover_background_color',
1357 'label' => __( 'Background', 'auxin-elements' ),
1358 'types' => array( 'classic', 'gradient' ),
1359 'selector' => '{{WRAPPER}} .entry-badge:hover',
1360 )
1361 );
1362
1363 $this->add_control(
1364 'badge_hover_text_color',
1365 array(
1366 'label' => __( 'Text', 'auxin-elements' ),
1367 'type' => Controls_Manager::COLOR,
1368 'selectors' => array(
1369 '{{WRAPPER}} .entry-badge a:hover' => 'color: {{VALUE}} !important;',
1370 )
1371 )
1372 );
1373 $this->end_controls_tab();
1374
1375 $this->end_controls_tabs();
1376
1377 $this->add_group_control(
1378 Group_Control_Typography::get_type(),
1379 array(
1380 'name' => 'badge_typography',
1381 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1382 'selector' => '{{WRAPPER}} .entry-badge a'
1383 )
1384 );
1385
1386
1387 $this->add_responsive_control(
1388 'button_padding',
1389 array(
1390 'label' => __( 'Padding', 'auxin-elements' ),
1391 'type' => Controls_Manager::DIMENSIONS,
1392 'size_units' => array( 'px', '%' ),
1393 'selectors' => array(
1394 '{{WRAPPER}} .entry-badge' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1395 )
1396 )
1397 );
1398
1399 $this->add_responsive_control(
1400 'badge_margin_bottom',
1401 array(
1402 'label' => __( 'Bottom space', 'auxin-elements' ),
1403 'type' => Controls_Manager::SLIDER,
1404 'range' => array(
1405 'px' => array(
1406 'max' => 100,
1407 ),
1408 ),
1409 'selectors' => array(
1410 '{{WRAPPER}} .entry-badge' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1411 )
1412 )
1413 );
1414
1415 $this->end_controls_section();
1416
1417 /*-----------------------------------------------------------------------------------*/
1418 /* meta_style_section
1419 /*-----------------------------------------------------------------------------------*/
1420
1421 $this->start_controls_section(
1422 'meta_style_section',
1423 array(
1424 'label' => __( 'Meta', 'auxin-elements' ),
1425 'tab' => Controls_Manager::TAB_STYLE
1426 )
1427 );
1428
1429 $this->start_controls_tabs( 'meta_colors' );
1430
1431 $this->start_controls_tab(
1432 'meta_color_normal',
1433 array(
1434 'label' => __( 'Normal' , 'auxin-elements' ),
1435 )
1436 );
1437
1438 $this->add_control(
1439 'meta_color',
1440 array(
1441 'label' => __( 'Color', 'auxin-elements' ),
1442 'type' => Controls_Manager::COLOR,
1443 'selectors' => array(
1444 '{{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta span' => 'color: {{VALUE}};',
1445 )
1446 )
1447 );
1448
1449 $this->end_controls_tab();
1450
1451 $this->start_controls_tab(
1452 'meta_color_hover',
1453 array(
1454 'label' => __( 'Hover' , 'auxin-elements' )
1455 )
1456 );
1457
1458 $this->add_control(
1459 'meta_hover_color',
1460 array(
1461 'label' => __( 'Color', 'auxin-elements' ),
1462 'type' => Controls_Manager::COLOR,
1463 'selectors' => array(
1464 '{{WRAPPER}} .entry-meta a:hover, {{WRAPPER}} .entry-meta span:hover' => 'color: {{VALUE}};',
1465 )
1466 )
1467 );
1468
1469 $this->end_controls_tab();
1470
1471 $this->end_controls_tabs();
1472
1473 $this->add_group_control(
1474 Group_Control_Typography::get_type(),
1475 array(
1476 'name' => 'meta_typography',
1477 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1478 'selector' => '{{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta span'
1479 )
1480 );
1481
1482 $this->add_responsive_control(
1483 'meta_padding',
1484 array(
1485 'label' => __( 'Padding for meta wrapper', 'auxin-elements' ),
1486 'type' => Controls_Manager::DIMENSIONS,
1487 'size_units' => array( 'px', '%' ),
1488 'selectors' => array(
1489 '{{WRAPPER}} .entry-meta' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1490 )
1491 )
1492 );
1493
1494 $this->add_responsive_control(
1495 'meta_margin_bottom',
1496 array(
1497 'label' => __( 'Bottom space', 'auxin-elements' ),
1498 'type' => Controls_Manager::SLIDER,
1499 'range' => array(
1500 'px' => array(
1501 'max' => 100,
1502 ),
1503 ),
1504 'selectors' => array(
1505 '{{WRAPPER}} .entry-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1506 )
1507 )
1508 );
1509
1510 $this->end_controls_section();
1511
1512
1513 /* wrapper_style_section
1514 /*-------------------------------------*/
1515
1516 $this->start_controls_section(
1517 'wrapper_style_section',
1518 array(
1519 'label' => __( 'Wrapper', 'auxin-elements' ),
1520 'tab' => Controls_Manager::TAB_STYLE
1521 )
1522 );
1523
1524 $this->start_controls_tabs( 'button_background' );
1525
1526 $this->start_controls_tab(
1527 'button_bg_normal',
1528 array(
1529 'label' => __( 'Normal' , 'auxin-elements' )
1530 )
1531 );
1532
1533 $this->add_group_control(
1534 Group_Control_Background::get_type(),
1535 array(
1536 'name' => 'background',
1537 'label' => __( 'Background', 'auxin-elements' ),
1538 'types' => array( 'classic', 'gradient' ),
1539 'selector' => '{{WRAPPER}} .aux-col .column-entry',
1540 )
1541 );
1542
1543 $this->add_group_control(
1544 Group_Control_Box_Shadow::get_type(),
1545 array(
1546 'name' => 'box_shadow',
1547 'selector' => '{{WRAPPER}} .aux-col .column-entry'
1548 )
1549 );
1550
1551 $this->end_controls_tab();
1552
1553 $this->start_controls_tab(
1554 'button_bg_hover',
1555 array(
1556 'label' => __( 'Hover' , 'auxin-elements' )
1557 )
1558 );
1559
1560 $this->add_control(
1561 'general_hover_text_color',
1562 array(
1563 'label' => __( 'Text Color', 'auxin-elements' ),
1564 'type' => Controls_Manager::COLOR,
1565 'selectors' => array(
1566 '{{WRAPPER}} .aux-col:hover .entry-main a, {{WRAPPER}} .aux-col:hover .entry-main *' => 'transition:all 150ms ease; color:{{VALUE}};'
1567 )
1568 )
1569 );
1570
1571 $this->add_group_control(
1572 Group_Control_Background::get_type(),
1573 array(
1574 'name' => 'hover_background',
1575 'label' => __( 'Background', 'auxin-elements' ),
1576 'types' => array( 'classic', 'gradient' ),
1577 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry',
1578 )
1579 );
1580
1581 $this->add_group_control(
1582 Group_Control_Box_Shadow::get_type(),
1583 array(
1584 'name' => 'hover_box_shadow',
1585 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry'
1586 )
1587 );
1588
1589 $this->end_controls_tab();
1590
1591 $this->end_controls_tabs();
1592
1593 $this->add_responsive_control(
1594 'align',
1595 array(
1596 'label' => __('Align','auxin-elements'),
1597 'type' => Controls_Manager::CHOOSE,
1598 'devices' => array( 'desktop', 'mobile' ),
1599 'options' => array(
1600 'left' => array(
1601 'title' => __( 'Left', 'auxin-elements' ),
1602 'icon' => 'fa fa-align-left',
1603 ),
1604 'center' => array(
1605 'title' => __( 'Center', 'auxin-elements' ),
1606 'icon' => 'fa fa-align-center',
1607 ),
1608 'right' => array(
1609 'title' => __( 'Right', 'auxin-elements' ),
1610 'icon' => 'fa fa-align-right',
1611 ),
1612 ),
1613 'default' => 'left',
1614 'toggle' => true,
1615 'selectors' => array(
1616 '{{WRAPPER}}' => 'text-align: {{VALUE}}',
1617 )
1618 )
1619 );
1620
1621 $this->add_responsive_control(
1622 'wrapper_main_padding',
1623 array(
1624 'label' => __( 'Padding for main wrapper', 'auxin-elements' ),
1625 'type' => Controls_Manager::DIMENSIONS,
1626 'size_units' => array( 'px', '%' ),
1627 'selectors' => array(
1628 '{{WRAPPER}} .column-entry' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1629 )
1630 )
1631 );
1632
1633 $this->add_responsive_control(
1634 'wrapper_content_padding',
1635 array(
1636 'label' => __( 'Padding for content wrapper', 'auxin-elements' ),
1637 'type' => Controls_Manager::DIMENSIONS,
1638 'size_units' => array( 'px', '%' ),
1639 'selectors' => array(
1640 '{{WRAPPER}} .type-post .entry-main' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1641 )
1642 )
1643 );
1644
1645 $this->end_controls_section();
1646
1647 /* flip_wrapper_style_section
1648 /*-------------------------------------*/
1649
1650 $this->start_controls_section(
1651 'flip_wrapper_style_section',
1652 array(
1653 'label' => __( 'Flip Wrapper', 'auxin-elements' ),
1654 'tab' => Controls_Manager::TAB_STYLE,
1655 'condition' => array(
1656 'preview_mode' => 'flip'
1657 )
1658 )
1659 );
1660
1661 $this->start_controls_tabs( 'flip_button_background' );
1662
1663 $this->start_controls_tab(
1664 'flip_button_bg_normal',
1665 array(
1666 'label' => __( 'Normal' , 'auxin-elements' )
1667 )
1668 );
1669
1670 $this->add_group_control(
1671 Group_Control_Background::get_type(),
1672 array(
1673 'name' => 'flip_background',
1674 'label' => __( 'Background', 'auxin-elements' ),
1675 'types' => array( 'classic', 'gradient' ),
1676 'selector' => '{{WRAPPER}} .aux-col .aux-flip-back',
1677 )
1678 );
1679
1680 $this->add_group_control(
1681 Group_Control_Box_Shadow::get_type(),
1682 array(
1683 'name' => 'flip_box_shadow',
1684 'selector' => '{{WRAPPER}} .aux-col .aux-flip-back'
1685 )
1686 );
1687
1688 $this->end_controls_tab();
1689
1690 $this->start_controls_tab(
1691 'flip_button_bg_hover',
1692 array(
1693 'label' => __( 'Hover' , 'auxin-elements' )
1694 )
1695 );
1696
1697 $this->add_control(
1698 'flip_general_hover_text_color',
1699 array(
1700 'label' => __( 'Text Color', 'auxin-elements' ),
1701 'type' => Controls_Manager::COLOR,
1702 'selectors' => array(
1703 '{{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}};'
1704 )
1705 )
1706 );
1707
1708 $this->add_group_control(
1709 Group_Control_Background::get_type(),
1710 array(
1711 'name' => 'flip_hover_background',
1712 'label' => __( 'Background', 'auxin-elements' ),
1713 'types' => array( 'classic', 'gradient' ),
1714 'selector' => '{{WRAPPER}} .aux-col:hover .aux-flip-back',
1715 )
1716 );
1717
1718 $this->add_group_control(
1719 Group_Control_Box_Shadow::get_type(),
1720 array(
1721 'name' => 'flip_hover_box_shadow',
1722 'selector' => '{{WRAPPER}} .aux-col:hover .aux-flip-back'
1723 )
1724 );
1725
1726 $this->end_controls_tab();
1727
1728 $this->end_controls_tabs();
1729
1730 $this->add_responsive_control(
1731 'flip_align',
1732 array(
1733 'label' => __('Align','auxin-elements'),
1734 'type' => Controls_Manager::CHOOSE,
1735 'devices' => array( 'desktop', 'mobile' ),
1736 'options' => array(
1737 'left' => array(
1738 'title' => __( 'Left', 'auxin-elements' ),
1739 'icon' => 'fa fa-align-left',
1740 ),
1741 'center' => array(
1742 'title' => __( 'Center', 'auxin-elements' ),
1743 'icon' => 'fa fa-align-center',
1744 ),
1745 'right' => array(
1746 'title' => __( 'Right', 'auxin-elements' ),
1747 'icon' => 'fa fa-align-right',
1748 ),
1749 ),
1750 'default' => 'left',
1751 'toggle' => true,
1752 'selectors' => array(
1753 '{{WRAPPER}} .aux-flip-back' => 'text-align: {{VALUE}}',
1754 )
1755 )
1756 );
1757
1758 $this->add_responsive_control(
1759 'flip_wrapper_padding',
1760 array(
1761 'label' => __( 'Padding for content wrapper', 'auxin-elements' ),
1762 'type' => Controls_Manager::DIMENSIONS,
1763 'size_units' => array( 'px', '%' ),
1764 'selectors' => array(
1765 '{{WRAPPER}} .type-post .aux-flip-back' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1766 )
1767 )
1768 );
1769
1770 $this->end_controls_section();
1771
1772 /*-----------------------------------------------------------------------------------*/
1773 /* ReadMore Button
1774 /*-----------------------------------------------------------------------------------*/
1775
1776 $this->start_controls_section(
1777 'btn_section',
1778 array(
1779 'label' => __('Read More', 'auxin-elements' ),
1780 'tab' => Controls_Manager::TAB_STYLE,
1781 )
1782 );
1783
1784 $this->start_controls_tabs( 'btn_bg_tab' );
1785
1786 $this->start_controls_tab(
1787 'btn_bg_normal',
1788 array(
1789 'label' => __( 'Normal' , 'auxin-elements' )
1790 )
1791 );
1792
1793 $this->add_group_control(
1794 Group_Control_Background::get_type(),
1795 array(
1796 'name' => 'btn',
1797 'label' => __( 'Background', 'auxin-elements' ),
1798 'types' => array( 'classic', 'gradient' ),
1799 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more',
1800 )
1801 );
1802
1803 $this->add_group_control(
1804 Group_Control_Box_Shadow::get_type(),
1805 array(
1806 'name' => 'btn_shadow',
1807 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more'
1808 )
1809 );
1810
1811 $this->add_control(
1812 'btn_text_color',
1813 array(
1814 'label' => __( 'Color', 'auxin-elements' ),
1815 'type' => Controls_Manager::COLOR,
1816 'selectors' => array(
1817 '{{WRAPPER}} .entry-meta .aux-read-more' => 'color: {{VALUE}};',
1818 )
1819 )
1820 );
1821
1822 $this->add_group_control(
1823 Group_Control_Text_Shadow::get_type(),
1824 array(
1825 'name' => 'btn_text_shadow',
1826 'label' => __( 'Text Shadow', 'auxin-elements' ),
1827 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more',
1828 )
1829 );
1830
1831 $this->add_group_control(
1832 Group_Control_Typography::get_type(),
1833 array(
1834 'name' => 'btn_text_typography',
1835 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1836 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more'
1837 )
1838 );
1839
1840 $this->end_controls_tab();
1841
1842 $this->start_controls_tab(
1843 'btn_bg_hover',
1844 array(
1845 'label' => __( 'Hover' , 'auxin-elements' )
1846 )
1847 );
1848
1849 $this->add_group_control(
1850 Group_Control_Background::get_type(),
1851 array(
1852 'name' => 'btn_bg_hover',
1853 'label' => __( 'Background', 'auxin-elements' ),
1854 'types' => array( 'classic', 'gradient' ),
1855 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover',
1856 )
1857 );
1858
1859 $this->add_group_control(
1860 Group_Control_Box_Shadow::get_type(),
1861 array(
1862 'name' => 'btn_shadow_hover',
1863 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover'
1864 )
1865 );
1866
1867 $this->add_control(
1868 'btn_text_color_hover',
1869 array(
1870 'label' => __( 'Color', 'auxin-elements' ),
1871 'type' => Controls_Manager::COLOR,
1872 'selectors' => array(
1873 '{{WRAPPER}} .entry-meta .aux-read-more:hover' => 'color: {{VALUE}};',
1874 )
1875 )
1876 );
1877
1878 $this->add_group_control(
1879 Group_Control_Text_Shadow::get_type(),
1880 array(
1881 'name' => 'btn_text_shadow_hover',
1882 'label' => __( 'Text Shadow', 'auxin-elements' ),
1883 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover',
1884 )
1885 );
1886
1887 $this->add_group_control(
1888 Group_Control_Typography::get_type(),
1889 array(
1890 'name' => 'btn_text_typography_hover',
1891 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1892 'selector' => '{{WRAPPER}} .entry-meta .aux-read-more:hover'
1893 )
1894 );
1895
1896 $this->end_controls_tab();
1897
1898 $this->end_controls_tabs();
1899
1900 $this->add_responsive_control(
1901 'btn_padding',
1902 array(
1903 'label' => __( 'Button Padding', 'auxin-elements' ),
1904 'type' => Controls_Manager::DIMENSIONS,
1905 'size_units' => array( 'px', '%' ),
1906 'selectors' => array(
1907 '{{WRAPPER}} .entry-meta .aux-read-more' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1908 ),
1909 )
1910 );
1911
1912 $this->end_controls_section();
1913
1914 }
1915
1916 /**
1917 * Render image box widget output on the frontend.
1918 *
1919 * Written in PHP and used to generate the final HTML.
1920 *
1921 * @since 1.0.0
1922 * @access protected
1923 */
1924 protected function render() {
1925
1926 $settings = $this->get_settings_for_display();
1927
1928 $args = array(
1929 // Display section
1930 'show_media' => $settings['show_media'],
1931 'ignore_formats' => $settings['ignore_formats'],
1932 'preloadable' => $settings['preloadable'],
1933 'preload_preview' => $settings['preload_preview'],
1934 'preload_bgcolor' => $settings['preload_bgcolor'],
1935 'display_title' => $settings['display_title'],
1936 'words_num' => $settings['words_num'],
1937 'show_info' => $settings['show_info'],
1938 'show_format_icon' => $settings['show_format_icon'],
1939 'post_info_position' => $settings['post_info_position'],
1940 'meta_info_position' => $settings['meta_info_position'],
1941 'display_comments' => $settings['display_comments'],
1942 'display_like' => $settings['display_like'],
1943 'show_content' => $settings['show_content'],
1944 'display_categories' => $settings['display_categories'],
1945 'show_badge' => $settings['show_badge'],
1946 'show_date' => $settings['show_date'],
1947 'show_excerpt' => $settings['show_excerpt'],
1948 'excerpt_len' => $settings['excerpt_len'],
1949 'author_or_readmore' => $settings['author_or_readmore'],
1950 'display_author_header' => $settings['display_author_header'],
1951 'display_author_footer' => $settings['display_author_footer'],
1952
1953 // Content Section
1954 'desktop_cnum' => $settings['columns'],
1955 'tablet_cnum' => $settings['columns_tablet'],
1956 'phone_cnum' => $settings['columns_mobile'],
1957 'preview_mode' => $settings['preview_mode'],
1958 'content_layout' => $settings['content_layout'],
1959 'grid_table_hover' => $settings['grid_table_hover'],
1960 'carousel_space' => $settings['carousel_space'],
1961 'carousel_navigation' => $settings['carousel_navigation'],
1962 'carousel_navigation_control' => $settings['carousel_navigation_control'],
1963 'carousel_nav_control_pos' => $settings['carousel_nav_control_pos'],
1964 'carousel_nav_control_skin' => $settings['carousel_nav_control_skin'],
1965 'carousel_loop' => $settings['carousel_loop'],
1966 'carousel_autoplay' => $settings['carousel_autoplay'],
1967 'carousel_autoplay_delay' => $settings['carousel_autoplay_delay'],
1968
1969 // Query Section
1970 'cat' => $settings['cat'],
1971 'num' => $settings['num'],
1972 'exclude_without_media' => $settings['exclude_without_media'],
1973 'exclude_custom_post_formats' => $settings['exclude_custom_post_formats'],
1974 'include_post_formats_in' => $settings['include_post_formats_in'],
1975 'exclude_quote_link' => $settings['exclude_quote_link'],
1976 'order_by' => $settings['order_by'],
1977 'order' => $settings['order'],
1978 'only_posts__in' => $settings['only_posts__in'],
1979 'include' => $settings['include'],
1980 'exclude' => $settings['exclude'],
1981 'offset' => $settings['offset'],
1982
1983 // Paginate Section
1984 'loadmore_type' => $settings['loadmore_type'],
1985
1986 // Style Section
1987 'image_aspect_ratio' => $settings['image_aspect_ratio'] === 'custom' ? $settings['image_aspect_ratio_custom']['size'] : $settings['image_aspect_ratio'],
1988 );
1989
1990 if( auxin_is_true( $settings['use_wp_query'] ) ){
1991 $args['use_wp_query'] = true;
1992 $args['reset_query'] = false;
1993 $args['request_from'] = 'archive';
1994 $args['paged'] = max( 1, get_query_var('paged'), get_query_var('page') );
1995 }
1996
1997 // get the shortcode base blog page
1998 echo auxin_widget_recent_posts_callback( $args );
1999
2000 }
2001
2002 }
2003