PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.5.8
Shortcodes and extra features for Phlox theme v2.5.8
2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / recent-posts-land-style.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 6 years ago accordion.php 6 years ago audio.php 6 years ago before-after.php 6 years ago button.php 6 years ago carousel-navigation.php 6 years ago contact-box.php 6 years ago contact-form.php 6 years ago custom-list.php 6 years ago divider.php 6 years ago gallery.php 6 years ago gmap.php 6 years ago heading-modern.php 6 years ago icon.php 6 years ago image.php 6 years ago mailchimp.php 6 years ago modern-button.php 6 years ago quote.php 6 years ago recent-comments.php 6 years ago recent-posts-grid-carousel.php 6 years ago recent-posts-land-style.php 6 years ago recent-posts-masonry.php 6 years ago recent-posts-tiles-carousel.php 6 years ago recent-posts-tiles.php 6 years ago recent-posts-timeline.php 6 years ago recent-products.php 6 years ago search.php 6 years ago staff.php 6 years ago svg.php 6 years ago tabs.php 6 years ago testimonial.php 6 years ago text.php 6 years ago touch-slider.php 6 years ago video.php 6 years ago
recent-posts-land-style.php
996 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
10 if ( ! defined( 'ABSPATH' ) ) {
11 exit; // Exit if accessed directly.
12 }
13
14 /**
15 * Elementor 'RecentPostsLand' widget.
16 *
17 * Elementor widget that displays an 'RecentPostsLand' with lightbox.
18 *
19 * @since 1.0.0
20 */
21 class RecentPostsLand extends Widget_Base {
22
23 /**
24 * Get widget name.
25 *
26 * Retrieve 'RecentPostsLand' widget name.
27 *
28 * @since 1.0.0
29 * @access public
30 *
31 * @return string Widget name.
32 */
33 public function get_name() {
34 return 'aux_recent_posts_land_style';
35 }
36
37 /**
38 * Get widget title.
39 *
40 * Retrieve 'RecentPostsLand' widget title.
41 *
42 * @since 1.0.0
43 * @access public
44 *
45 * @return string Widget title.
46 */
47 public function get_title() {
48 return __('Land Style Posts', 'auxin-elements' );
49 }
50
51 /**
52 * Get widget icon.
53 *
54 * Retrieve 'RecentPostsLand' widget icon.
55 *
56 * @since 1.0.0
57 * @access public
58 *
59 * @return string Widget icon.
60 */
61 public function get_icon() {
62 return 'eicon-post-list auxin-badge';
63 }
64
65 /**
66 * Get widget categories.
67 *
68 * Retrieve 'RecentPostsLand' widget icon.
69 *
70 * @since 1.0.0
71 * @access public
72 *
73 * @return string Widget icon.
74 */
75 public function get_categories() {
76 return array( 'auxin-dynamic' );
77 }
78
79 /**
80 * Retrieve the terms in a given taxonomy or list of taxonomies.
81 *
82 * Retrieve 'RecentPostsLand' widget icon.
83 *
84 * @since 1.0.0
85 * @access public
86 *
87 * @return string Widget icon.
88 */
89 public function get_terms() {
90 $terms = get_terms( 'category', 'orderby=count&hide_empty=0' );
91 $list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
92 foreach ( $terms as $key => $value ) {
93 $list[$value->term_id] = $value->name;
94 }
95
96 return $list;
97 }
98
99 /**
100 * Register 'RecentPostsLand' widget controls.
101 *
102 * Adds different input fields to allow the user to change and customize the widget settings.
103 *
104 * @since 1.0.0
105 * @access protected
106 */
107 protected function _register_controls() {
108
109 /*-----------------------------------------------------------------------------------*/
110 /* layout_section
111 /*-----------------------------------------------------------------------------------*/
112
113 $this->start_controls_section(
114 'display_section',
115 array(
116 'label' => __('Display', 'auxin-elements' ),
117 'tab' => Controls_Manager::TAB_LAYOUT
118 )
119 );
120
121 $this->add_control(
122 'show_media',
123 array(
124 'label' => __('Display post media (image, video, etc)','auxin-elements' ),
125 'label_block' => true,
126 'type' => Controls_Manager::SWITCHER,
127 'label_on' => __( 'On', 'auxin-elements' ),
128 'label_off' => __( 'Off', 'auxin-elements' ),
129 'return_value' => 'yes',
130 'default' => 'yes'
131 )
132 );
133
134 $this->add_control(
135 'preloadable',
136 array(
137 'label' => __('Preload image','auxin-elements' ),
138 'type' => Controls_Manager::SWITCHER,
139 'label_on' => __( 'On', 'auxin-elements' ),
140 'label_off' => __( 'Off', 'auxin-elements' ),
141 'return_value' => 'yes',
142 'default' => 'no',
143 'condition' => array(
144 'show_media' => 'yes',
145 )
146 )
147 );
148
149 $this->add_control(
150 'preload_preview',
151 array(
152 'label' => __('While loading image display','auxin-elements' ),
153 'label_block' => true,
154 'type' => Controls_Manager::SELECT,
155 'options' => auxin_get_preloadable_previews(),
156 'return_value' => 'yes',
157 'default' => 'yes',
158 'condition' => array(
159 'preloadable' => 'yes'
160 )
161 )
162 );
163
164 $this->add_control(
165 'preload_bgcolor',
166 array(
167 'label' => __( 'Placeholder color while loading image', 'auxin-elements' ),
168 'type' => Controls_Manager::COLOR,
169 'condition' => array(
170 'preloadable' => 'yes',
171 'preload_preview' => array('simple-spinner', 'simple-spinner-light', 'simple-spinner-dark')
172 )
173 )
174 );
175
176 $this->add_control(
177 'display_title',
178 array(
179 'label' => __('Display post title', 'auxin-elements' ),
180 'type' => Controls_Manager::SWITCHER,
181 'label_on' => __( 'On', 'auxin-elements' ),
182 'label_off' => __( 'Off', 'auxin-elements' ),
183 'return_value' => 'yes',
184 'default' => 'yes'
185 )
186 );
187
188 $this->add_control(
189 'show_info',
190 array(
191 'label' => __('Display post info', 'auxin-elements' ),
192 'type' => Controls_Manager::SWITCHER,
193 'label_on' => __( 'On', 'auxin-elements' ),
194 'label_off' => __( 'Off', 'auxin-elements' ),
195 'return_value' => 'yes',
196 'default' => 'yes'
197 )
198 );
199
200
201 $this->add_control(
202 'display_categories',
203 array(
204 'label' => __('Display Categories','auxin-elements' ),
205 'type' => Controls_Manager::SWITCHER,
206 'label_on' => __( 'On', 'auxin-elements' ),
207 'label_off' => __( 'Off', 'auxin-elements' ),
208 'return_value' => 'yes',
209 'default' => 'yes',
210 'condition' => array(
211 'show_info' => 'yes',
212 )
213 )
214 );
215
216 $this->add_control(
217 'show_date',
218 array(
219 'label' => __('Display Date','auxin-elements' ),
220 'type' => Controls_Manager::SWITCHER,
221 'label_on' => __( 'On', 'auxin-elements' ),
222 'label_off' => __( 'Off', 'auxin-elements' ),
223 'return_value' => 'yes',
224 'default' => 'yes',
225 'condition' => array(
226 'show_info' => 'yes',
227 )
228 )
229 );
230
231 $this->add_control(
232 'display_comments',
233 array(
234 'label' => __('Display Comments Number', 'auxin-elements' ),
235 'type' => Controls_Manager::SWITCHER,
236 'label_on' => __( 'On', 'auxin-elements' ),
237 'label_off' => __( 'Off', 'auxin-elements' ),
238 'return_value' => 'yes',
239 'default' => 'yes'
240 )
241 );
242
243 $this->add_control(
244 'display_like',
245 array(
246 'label' => __('Display like button', 'auxin-elements' ),
247 'type' => Controls_Manager::SWITCHER,
248 'label_on' => __( 'On', 'auxin-elements' ),
249 'label_off' => __( 'Off', 'auxin-elements' ),
250 'return_value' => 'yes',
251 'default' => 'yes'
252 )
253 );
254
255 $this->add_control(
256 'show_excerpt',
257 array(
258 'label' => __('Display excerpt','auxin-elements' ),
259 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
260 'type' => Controls_Manager::SWITCHER,
261 'label_on' => __( 'On', 'auxin-elements' ),
262 'label_off' => __( 'Off', 'auxin-elements' ),
263 'return_value' => 'yes',
264 'default' => 'yes'
265 )
266 );
267
268 $this->add_control(
269 'excerpt_len',
270 array(
271 'label' => __('Excerpt length','auxin-elements' ),
272 'description' => __('Specify summary content in character.','auxin-elements' ),
273 'type' => Controls_Manager::NUMBER,
274 'default' => '160',
275 'condition' => array(
276 'show_excerpt' => 'yes',
277 )
278 )
279 );
280
281 $this->add_control(
282 'author_or_readmore',
283 array(
284 'label' => __('Display author or read more', 'auxin-elements'),
285 'label_block' => true,
286 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
287 'type' => Controls_Manager::SELECT,
288 'default' => 'readmore',
289 'options' => array(
290 'readmore' => __('Read More', 'auxin-elements'),
291 'author' => __('Author Name', 'auxin-elements'),
292 'none' => __('None', 'auxin-elements'),
293 )
294 )
295 );
296
297 $this->add_control(
298 'display_author_header',
299 array(
300 'label' => __('Display Author in Header','auxin-elements' ),
301 'description' => __('Enable it to display author name in header','auxin-elements' ),
302 'type' => Controls_Manager::SWITCHER,
303 'label_on' => __( 'On', 'auxin-elements' ),
304 'label_off' => __( 'Off', 'auxin-elements' ),
305 'return_value' => 'yes',
306 'default' => 'yes',
307 'condition' => array(
308 'author_or_readmore' => 'author',
309 )
310 )
311 );
312
313 $this->add_control(
314 'display_author_footer',
315 array(
316 'label' => __('Display Author in Footer','auxin-elements' ),
317 'description' => __('Enable it to display author name in footer','auxin-elements' ),
318 'type' => Controls_Manager::SWITCHER,
319 'label_on' => __( 'On', 'auxin-elements' ),
320 'label_off' => __( 'Off', 'auxin-elements' ),
321 'return_value' => 'yes',
322 'default' => 'no',
323 'condition' => array(
324 'author_or_readmore' => 'author',
325 )
326 )
327 );
328
329 $this->end_controls_section();
330
331 /*-----------------------------------------------------------------------------------*/
332 /* query_section
333 /*-----------------------------------------------------------------------------------*/
334
335 $this->start_controls_section(
336 'query_section',
337 array(
338 'label' => __('Query', 'auxin-elements' ),
339 )
340 );
341
342 $this->add_control(
343 'cat',
344 array(
345 'label' => __('Categories', 'auxin-elements'),
346 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
347 'type' => Controls_Manager::SELECT2,
348 'multiple' => true,
349 'options' => $this->get_terms(),
350 'default' => array( ' ' ),
351 )
352 );
353
354 $this->add_control(
355 'num',
356 array(
357 'label' => __('Number of posts to show', 'auxin-elements'),
358 'label_block' => true,
359 'type' => Controls_Manager::NUMBER,
360 'default' => '8',
361 'min' => 1,
362 'step' => 1
363 )
364 );
365
366 $this->add_control(
367 'exclude_without_media',
368 array(
369 'label' => __('Exclude posts without media','auxin-elements' ),
370 'type' => Controls_Manager::SWITCHER,
371 'label_on' => __( 'On', 'auxin-elements' ),
372 'label_off' => __( 'Off', 'auxin-elements' ),
373 'return_value' => 'yes',
374 'default' => 'no'
375 )
376 );
377
378 $this->add_control(
379 'exclude_custom_post_formats',
380 array(
381 'label' => __('Exclude custom post formats','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 )
388 );
389
390 $this->add_control(
391 'exclude_quote_link',
392 array(
393 'label' => __('Exclude quote and link post formats','auxin-elements' ),
394 'type' => Controls_Manager::SWITCHER,
395 'label_on' => __( 'On', 'auxin-elements' ),
396 'label_off' => __( 'Off', 'auxin-elements' ),
397 'return_value' => 'yes',
398 'default' => 'no',
399 'condition' => array(
400 'exclude_custom_post_formats' => 'yes',
401 )
402 )
403 );
404
405 $this->add_control(
406 'order_by',
407 array(
408 'label' => __('Order by', 'auxin-elements'),
409 'type' => Controls_Manager::SELECT,
410 'default' => 'date',
411 'options' => array(
412 'date' => __('Date', 'auxin-elements'),
413 'menu_order date' => __('Menu Order', 'auxin-elements'),
414 'title' => __('Title', 'auxin-elements'),
415 'ID' => __('ID', 'auxin-elements'),
416 'rand' => __('Random', 'auxin-elements'),
417 'comment_count' => __('Comments', 'auxin-elements'),
418 'modified' => __('Date Modified', 'auxin-elements'),
419 'author' => __('Author', 'auxin-elements'),
420 'post__in' => __('Inserted Post IDs', 'auxin-elements')
421 ),
422 )
423 );
424
425 $this->add_control(
426 'order',
427 array(
428 'label' => __('Order', 'auxin-elements'),
429 'type' => Controls_Manager::SELECT,
430 'default' => 'DESC',
431 'options' => array(
432 'DESC' => __('Descending', 'auxin-elements'),
433 'ASC' => __('Ascending', 'auxin-elements'),
434 ),
435 )
436 );
437
438 $this->add_control(
439 'only_posts__in',
440 array(
441 'label' => __('Only posts','auxin-elements' ),
442 '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' ),
443 'type' => Controls_Manager::TEXT
444 )
445 );
446
447 $this->add_control(
448 'include',
449 array(
450 'label' => __('Include posts','auxin-elements' ),
451 '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' ),
452 'type' => Controls_Manager::TEXT
453 )
454 );
455
456 $this->add_control(
457 'exclude',
458 array(
459 'label' => __('Exclude posts','auxin-elements' ),
460 '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' ),
461 'type' => Controls_Manager::TEXT
462 )
463 );
464
465 $this->add_control(
466 'offset',
467 array(
468 'label' => __('Start offset','auxin-elements' ),
469 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
470 'type' => Controls_Manager::NUMBER
471 )
472 );
473
474 $this->end_controls_section();
475
476 /*-----------------------------------------------------------------------------------*/
477 /* paginate_section
478 /*-----------------------------------------------------------------------------------*/
479
480 $this->start_controls_section(
481 'paginate_section',
482 array(
483 'label' => __('Paginate', 'auxin-elements' )
484 )
485 );
486
487 $this->add_control(
488 'loadmore_type',
489 array(
490 'label' => __('Load More Type','auxin-elements' ),
491 'type' => 'aux-visual-select',
492 'options' => array(
493 '' => array(
494 'label' => __('None', 'auxin-elements' ),
495 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
496 ),
497 'scroll' => array(
498 'label' => __('Infinite Scroll', 'auxin-elements' ),
499 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
500 ),
501 'next' => array(
502 'label' => __('Next Button', 'auxin-elements' ),
503 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
504 ),
505 'next-prev' => array(
506 'label' => __('Next Prev', 'auxin-elements' ),
507 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
508 )
509 ),
510 'default' => ''
511 )
512 );
513
514 $this->end_controls_section();
515
516 /*-----------------------------------------------------------------------------------*/
517 /* image_style_section
518 /*-----------------------------------------------------------------------------------*/
519
520 $this->start_controls_section(
521 'image_style_section',
522 array(
523 'label' => __( 'Image', 'auxin-elements' ),
524 'tab' => Controls_Manager::TAB_STYLE,
525 'condition' => array(
526 'show_media' => 'yes',
527 ),
528 )
529 );
530
531 $this->add_control(
532 'image_aspect_ratio',
533 array(
534 'label' => __('Image aspect ratio', 'auxin-elements'),
535 'type' => Controls_Manager::SELECT,
536 'default' => '0.75',
537 'options' => array(
538 '0.75' => __('Horizontal 4:3' , 'auxin-elements'),
539 '0.56' => __('Horizontal 16:9', 'auxin-elements'),
540 '1.00' => __('Square 1:1' , 'auxin-elements'),
541 '1.33' => __('Vertical 3:4' , 'auxin-elements')
542 ),
543 'condition' => array(
544 'show_media' => 'yes',
545 ),
546 )
547 );
548
549 $this->add_control(
550 'img_border_radius',
551 array(
552 'label' => __( 'Border Radius', 'auxin-elements' ),
553 'type' => Controls_Manager::DIMENSIONS,
554 'size_units' => array( 'px', '%' ),
555 'selectors' => array(
556 '{{WRAPPER}} .entry-media img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
557 ),
558 'condition' => array(
559 'show_media' => 'yes',
560 ),
561 )
562 );
563
564 $this->end_controls_section();
565
566 /*-----------------------------------------------------------------------------------*/
567 /* title_style_section
568 /*-----------------------------------------------------------------------------------*/
569
570 $this->start_controls_section(
571 'title_style_section',
572 array(
573 'label' => __( 'Title', 'auxin-elements' ),
574 'tab' => Controls_Manager::TAB_STYLE,
575 'condition' => array(
576 'display_title' => 'yes',
577 ),
578 )
579 );
580
581 $this->start_controls_tabs( 'title_colors' );
582
583 $this->start_controls_tab(
584 'title_color_normal',
585 array(
586 'label' => __( 'Normal' , 'auxin-elements' ),
587 'condition' => array(
588 'display_title' => 'yes',
589 ),
590 )
591 );
592
593 $this->add_control(
594 'title_color',
595 array(
596 'label' => __( 'Color', 'auxin-elements' ),
597 'type' => Controls_Manager::COLOR,
598 'selectors' => array(
599 '{{WRAPPER}} .entry-title a' => 'color: {{VALUE}};',
600 ),
601 'condition' => array(
602 'display_title' => 'yes',
603 ),
604 )
605 );
606
607 $this->end_controls_tab();
608
609 $this->start_controls_tab(
610 'title_color_hover',
611 array(
612 'label' => __( 'Hover' , 'auxin-elements' ),
613 'condition' => array(
614 'display_title' => 'yes',
615 ),
616 )
617 );
618
619 $this->add_control(
620 'title_hover_color',
621 array(
622 'label' => __( 'Color', 'auxin-elements' ),
623 'type' => Controls_Manager::COLOR,
624 'selectors' => array(
625 '{{WRAPPER}} .entry-title a:hover' => 'color: {{VALUE}};',
626 ),
627 'condition' => array(
628 'display_title' => 'yes',
629 ),
630 )
631 );
632
633 $this->end_controls_tab();
634
635 $this->end_controls_tabs();
636
637 $this->add_group_control(
638 Group_Control_Typography::get_type(),
639 array(
640 'name' => 'title_typography',
641 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
642 'selector' => '{{WRAPPER}} .entry-title',
643 'condition' => array(
644 'display_title' => 'yes',
645 ),
646 )
647 );
648
649 $this->add_responsive_control(
650 'title_margin_bottom',
651 array(
652 'label' => __( 'Bottom space', 'auxin-elements' ),
653 'type' => Controls_Manager::SLIDER,
654 'range' => array(
655 'px' => array(
656 'max' => 100,
657 ),
658 ),
659 'selectors' => array(
660 '{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
661 ),
662 'condition' => array(
663 'display_title' => 'yes',
664 ),
665 )
666 );
667
668 $this->end_controls_section();
669
670 /*-----------------------------------------------------------------------------------*/
671 /* info_style_section
672 /*-----------------------------------------------------------------------------------*/
673
674 $this->start_controls_section(
675 'info_style_section',
676 array(
677 'label' => __( 'Post Info', 'auxin-elements' ),
678 'tab' => Controls_Manager::TAB_STYLE,
679 'condition' => array(
680 'show_info' => 'yes',
681 ),
682 )
683 );
684
685 $this->start_controls_tabs( 'info_colors' );
686
687 $this->start_controls_tab(
688 'info_color_normal',
689 array(
690 'label' => __( 'Normal' , 'auxin-elements' ),
691 'condition' => array(
692 'show_info' => 'yes',
693 ),
694 )
695 );
696
697 $this->add_control(
698 'info_color',
699 array(
700 'label' => __( 'Color', 'auxin-elements' ),
701 'type' => Controls_Manager::COLOR,
702 'selectors' => array(
703 '{{WRAPPER}} .entry-info a, {{WRAPPER}} .entry-info' => 'color: {{VALUE}};',
704 ),
705 'condition' => array(
706 'show_info' => 'yes',
707 ),
708 )
709 );
710
711 $this->end_controls_tab();
712
713 $this->start_controls_tab(
714 'info_color_hover',
715 array(
716 'label' => __( 'Hover' , 'auxin-elements' ),
717 'condition' => array(
718 'show_info' => 'yes',
719 ),
720 )
721 );
722
723 $this->add_control(
724 'info_hover_color',
725 array(
726 'label' => __( 'Color', 'auxin-elements' ),
727 'type' => Controls_Manager::COLOR,
728 'selectors' => array(
729 '{{WRAPPER}} .entry-info a:hover' => 'color: {{VALUE}};',
730 ),
731 'condition' => array(
732 'show_info' => 'yes',
733 ),
734 )
735 );
736
737 $this->end_controls_tab();
738
739 $this->end_controls_tabs();
740
741 $this->add_group_control(
742 Group_Control_Typography::get_type(),
743 array(
744 'name' => 'info_typography',
745 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
746 'selector' => '{{WRAPPER}} .entry-info, {{WRAPPER}} .entry-info a',
747 'condition' => array(
748 'show_info' => 'yes',
749 ),
750 )
751 );
752
753 $this->add_responsive_control(
754 'info_margin_bottom',
755 array(
756 'label' => __( 'Bottom space', 'auxin-elements' ),
757 'type' => Controls_Manager::SLIDER,
758 'range' => array(
759 'px' => array(
760 'max' => 100
761 )
762 ),
763 'selectors' => array(
764 '{{WRAPPER}} .entry-info' => 'margin-bottom: {{SIZE}}{{UNIT}};'
765 ),
766 'condition' => array(
767 'show_info' => 'yes'
768 )
769 )
770 );
771
772 $this->add_responsive_control(
773 'info_spacing_between',
774 array(
775 'label' => __( 'Space between metas', 'auxin-elements' ),
776 'type' => Controls_Manager::SLIDER,
777 'range' => array(
778 'px' => array(
779 'max' => 30
780 )
781 ),
782 'selectors' => array(
783 '{{WRAPPER}} .entry-info [class^="entry-"] + [class^="entry-"]:before, {{WRAPPER}} .entry-info .entry-tax a:after' =>
784 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};'
785 ),
786 'condition' => array(
787 'show_info' => 'yes'
788 )
789 )
790 );
791
792 $this->end_controls_section();
793
794 /*-----------------------------------------------------------------------------------*/
795 /* content_style_section
796 /*-----------------------------------------------------------------------------------*/
797
798 $this->start_controls_section(
799 'content_style_section',
800 array(
801 'label' => __( 'Excerpt', 'auxin-elements' ),
802 'tab' => Controls_Manager::TAB_STYLE,
803 'condition' => array(
804 'show_excerpt' => 'yes',
805 )
806 )
807 );
808
809 $this->add_control(
810 'content_color',
811 array(
812 'label' => __( 'Color', 'auxin-elements' ),
813 'type' => Controls_Manager::COLOR,
814 'selectors' => array(
815 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}};',
816 ),
817 'condition' => array(
818 'show_excerpt' => 'yes',
819 ),
820 )
821 );
822
823 $this->add_group_control(
824 Group_Control_Typography::get_type(),
825 array(
826 'name' => 'content_typography',
827 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
828 'selector' => '{{WRAPPER}} .entry-content',
829 'condition' => array(
830 'show_excerpt' => 'yes',
831 ),
832 )
833 );
834
835 $this->add_responsive_control(
836 'content_margin_bottom',
837 array(
838 'label' => __( 'Bottom space', 'auxin-elements' ),
839 'type' => Controls_Manager::SLIDER,
840 'range' => array(
841 'px' => array(
842 'max' => 100,
843 ),
844 ),
845 'selectors' => array(
846 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
847 ),
848 'condition' => array(
849 'show_excerpt' => 'yes',
850 ),
851 )
852 );
853
854 $this->end_controls_section();
855
856 /*-----------------------------------------------------------------------------------*/
857 /* meta_style_section
858 /*-----------------------------------------------------------------------------------*/
859
860 $this->start_controls_section(
861 'meta_style_section',
862 array(
863 'label' => __( 'Meta', 'auxin-elements' ),
864 'tab' => Controls_Manager::TAB_STYLE
865 )
866 );
867
868 $this->start_controls_tabs( 'meta_colors' );
869
870 $this->start_controls_tab(
871 'meta_color_normal',
872 array(
873 'label' => __( 'Normal' , 'auxin-elements' ),
874 )
875 );
876
877 $this->add_control(
878 'meta_color',
879 array(
880 'label' => __( 'Color', 'auxin-elements' ),
881 'type' => Controls_Manager::COLOR,
882 'selectors' => array(
883 '{{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta span' => 'color: {{VALUE}}; border-color: {{VALUE}};',
884 )
885 )
886 );
887
888 $this->end_controls_tab();
889
890 $this->start_controls_tab(
891 'meta_color_hover',
892 array(
893 'label' => __( 'Hover' , 'auxin-elements' )
894 )
895 );
896
897 $this->add_control(
898 'meta_hover_color',
899 array(
900 'label' => __( 'Color', 'auxin-elements' ),
901 'type' => Controls_Manager::COLOR,
902 'selectors' => array(
903 '{{WRAPPER}} .entry-meta a:hover, {{WRAPPER}} .entry-meta span:hover' => 'color: {{VALUE}}; border-color: {{VALUE}};',
904 )
905 )
906 );
907
908 $this->end_controls_tab();
909
910 $this->end_controls_tabs();
911
912 $this->add_group_control(
913 Group_Control_Typography::get_type(),
914 array(
915 'name' => 'meta_typography',
916 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
917 'selector' => '{{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta span'
918 )
919 );
920
921 $this->add_responsive_control(
922 'meta_margin_bottom',
923 array(
924 'label' => __( 'Bottom space', 'auxin-elements' ),
925 'type' => Controls_Manager::SLIDER,
926 'range' => array(
927 'px' => array(
928 'max' => 100,
929 ),
930 ),
931 'selectors' => array(
932 '{{WRAPPER}} .entry-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
933 )
934 )
935 );
936
937 $this->end_controls_section();
938 }
939
940 /**
941 * Render image box widget output on the frontend.
942 *
943 * Written in PHP and used to generate the final HTML.
944 *
945 * @since 1.0.0
946 * @access protected
947 */
948 protected function render() {
949
950 $settings = $this->get_settings_for_display();
951
952 $args = array(
953 // Layout Section
954 'show_media' => $settings['show_media'],
955 'preloadable' => $settings['preloadable'],
956 'preload_preview' => $settings['preload_preview'],
957 'preload_bgcolor' => $settings['preload_bgcolor'],
958 'display_title' => $settings['display_title'],
959 'show_info' => $settings['show_info'],
960 'display_categories' => $settings['display_categories'],
961 'show_date' => $settings['show_date'],
962 'display_comments' => $settings['display_comments'],
963 'display_like' => $settings['display_like'],
964 'show_excerpt' => $settings['show_excerpt'],
965 'excerpt_len' => $settings['excerpt_len'],
966 'author_or_readmore' => $settings['author_or_readmore'],
967 'display_author_footer' => $settings['display_author_footer'],
968 'display_author_header' => $settings['display_author_header'],
969
970 // Query Section
971 'cat' => $settings['cat'],
972 'num' => $settings['num'],
973 'exclude_without_media' => $settings['exclude_without_media'],
974 'exclude_custom_post_formats' => $settings['exclude_custom_post_formats'],
975 'exclude_quote_link' => $settings['exclude_quote_link'],
976 'order_by' => $settings['order_by'],
977 'order' => $settings['order'],
978 'only_posts__in' => $settings['only_posts__in'],
979 'include' => $settings['include'],
980 'exclude' => $settings['exclude'],
981 'offset' => $settings['offset'],
982
983 // Paginate Section
984 'loadmore_type' => $settings['loadmore_type'],
985
986 // Style section
987 'image_aspect_ratio' => $settings['image_aspect_ratio']
988 );
989
990 // get the shortcode base blog page
991 echo auxin_widget_recent_posts_land_style_callback( $args );
992
993 }
994
995 }
996