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