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