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