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