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