PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.8.7
Shortcodes and extra features for Phlox theme v2.8.7
2.17.22 2.17.21 2.17.20 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.0.6 1.0.9 1.1.0 1.3.0 1.3.1 1.3.10 1.3.14 1.3.2 1.3.3 1.3.6 1.4.0 1.4.1 1.4.2 1.5.0 1.5.2 1.6.0 1.6.2 1.6.4 1.7.0 1.7.2 2.10.0 2.10.1 2.10.3 2.10.5 2.10.7 2.10.8 2.10.9 2.11.0 2.11.1 2.11.2 2.12.0 2.14.0 2.15.0 2.15.2 2.15.4 2.15.5 2.15.6 2.15.7 2.15.8 2.15.9 2.16.0 2.16.1 2.16.2 2.16.3 2.16.4 2.17.0 2.17.1 2.17.12 2.17.13 2.17.14 2.17.15 2.17.16 2.17.2 2.17.3 2.17.4 2.17.5 2.17.6 2.17.8 2.17.9 2.4.12 2.4.13 2.4.14 2.4.16 2.4.18 2.4.19 2.4.9 2.5.0 2.5.1 2.5.10 2.5.11 2.5.12 2.5.13 2.5.14 2.5.15 2.5.16 2.5.17 2.5.19 2.5.2 2.5.20 2.5.3 2.5.7 2.5.8 2.5.9 2.6.0 2.6.1 2.6.10 2.6.12 2.6.13 2.6.14 2.6.15 2.6.16 2.6.17 2.6.19 2.6.2 2.6.20 2.6.4 2.6.5 2.6.7 2.7.0 2.7.1 2.7.10 2.7.11 2.7.12 2.7.13 2.7.14 2.7.2 2.7.3 2.7.4 2.7.5 2.7.6 2.7.7 2.7.8 2.7.9 2.8.0 2.8.1 2.8.2 2.8.3 2.8.4 2.8.5 2.8.6 2.8.7 2.8.9 2.9.0 2.9.12 2.9.14 2.9.15 2.9.16 2.9.17 2.9.18 2.9.19 2.9.2 2.9.20 2.9.21 2.9.22 2.9.3 2.9.4 2.9.5 2.9.6 2.9.7 2.9.8
auxin-elements / includes / elementor / widgets / recent-posts-land-style.php
auxin-elements / includes / elementor / widgets Last commit date
theme-elements 5 years ago accordion.php 5 years ago audio.php 6 years ago before-after.php 6 years ago button.php 5 years ago carousel-navigation.php 5 years ago contact-box.php 6 years ago contact-form.php 5 years ago custom-list.php 5 years ago divider.php 6 years ago gallery.php 4 years ago gmap.php 6 years ago heading-modern.php 5 years ago icon.php 5 years ago image.php 4 years ago mailchimp.php 5 years ago modern-button.php 5 years ago quote.php 5 years ago recent-comments.php 5 years ago recent-posts-grid-carousel.php 4 years ago recent-posts-land-style.php 5 years ago recent-posts-masonry.php 5 years ago recent-posts-tiles-carousel.php 5 years ago recent-posts-tiles.php 5 years ago recent-posts-timeline.php 5 years ago recent-products.php 5 years ago responsive-table.php 5 years ago search.php 6 years ago staff.php 5 years ago svg.php 6 years ago tabs.php 5 years ago testimonial.php 5 years ago text.php 5 years ago touch-slider.php 5 years ago video.php 6 years ago
recent-posts-land-style.php
1008 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 'show_date',
234 array(
235 'label' => __('Display Date','auxin-elements' ),
236 'type' => Controls_Manager::SWITCHER,
237 'label_on' => __( 'On', 'auxin-elements' ),
238 'label_off' => __( 'Off', 'auxin-elements' ),
239 'return_value' => 'yes',
240 'default' => 'yes',
241 'condition' => array(
242 'show_info' => 'yes',
243 )
244 )
245 );
246
247 $this->add_control(
248 'display_comments',
249 array(
250 'label' => __('Display Comments Number', 'auxin-elements' ),
251 'type' => Controls_Manager::SWITCHER,
252 'label_on' => __( 'On', 'auxin-elements' ),
253 'label_off' => __( 'Off', 'auxin-elements' ),
254 'return_value' => 'yes',
255 'default' => 'yes'
256 )
257 );
258
259 $this->add_control(
260 'display_like',
261 array(
262 'label' => __('Display like button', 'auxin-elements' ),
263 'type' => Controls_Manager::SWITCHER,
264 'label_on' => __( 'On', 'auxin-elements' ),
265 'label_off' => __( 'Off', 'auxin-elements' ),
266 'return_value' => 'yes',
267 'default' => 'yes'
268 )
269 );
270
271 $this->add_control(
272 'show_excerpt',
273 array(
274 'label' => __('Display excerpt','auxin-elements' ),
275 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
276 'type' => Controls_Manager::SWITCHER,
277 'label_on' => __( 'On', 'auxin-elements' ),
278 'label_off' => __( 'Off', 'auxin-elements' ),
279 'return_value' => 'yes',
280 'default' => 'yes'
281 )
282 );
283
284 $this->add_control(
285 'excerpt_len',
286 array(
287 'label' => __('Excerpt length','auxin-elements' ),
288 'description' => __('Specify summary content in character.','auxin-elements' ),
289 'type' => Controls_Manager::NUMBER,
290 'default' => '160',
291 'condition' => array(
292 'show_excerpt' => 'yes',
293 )
294 )
295 );
296
297 $this->add_control(
298 'author_or_readmore',
299 array(
300 'label' => __('Display author or read more', 'auxin-elements'),
301 'label_block' => true,
302 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
303 'type' => Controls_Manager::SELECT,
304 'default' => 'readmore',
305 'options' => array(
306 'readmore' => __('Read More', 'auxin-elements'),
307 'author' => __('Author Name', 'auxin-elements'),
308 'none' => __('None', 'auxin-elements'),
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->add_group_control(
565 Group_Control_Box_Shadow::get_type(),
566 array(
567 'name' => 'img_boxshadow_normal',
568 'label' => __( 'Box Shadow', 'auxin-elements' ),
569 'selector' => '{{WRAPPER}} .aux-media-frame',
570 'condition' => array(
571 'show_media' => 'yes'
572 )
573 )
574 );
575
576 $this->end_controls_section();
577
578 /*-----------------------------------------------------------------------------------*/
579 /* title_style_section
580 /*-----------------------------------------------------------------------------------*/
581
582 $this->start_controls_section(
583 'title_style_section',
584 array(
585 'label' => __( 'Title', 'auxin-elements' ),
586 'tab' => Controls_Manager::TAB_STYLE,
587 'condition' => array(
588 'display_title' => 'yes',
589 ),
590 )
591 );
592
593 $this->start_controls_tabs( 'title_colors' );
594
595 $this->start_controls_tab(
596 'title_color_normal',
597 array(
598 'label' => __( 'Normal' , 'auxin-elements' ),
599 'condition' => array(
600 'display_title' => 'yes',
601 ),
602 )
603 );
604
605 $this->add_control(
606 'title_color',
607 array(
608 'label' => __( 'Color', 'auxin-elements' ),
609 'type' => Controls_Manager::COLOR,
610 'selectors' => array(
611 '{{WRAPPER}} .entry-title a' => 'color: {{VALUE}};',
612 ),
613 'condition' => array(
614 'display_title' => 'yes',
615 ),
616 )
617 );
618
619 $this->end_controls_tab();
620
621 $this->start_controls_tab(
622 'title_color_hover',
623 array(
624 'label' => __( 'Hover' , 'auxin-elements' ),
625 'condition' => array(
626 'display_title' => 'yes',
627 ),
628 )
629 );
630
631 $this->add_control(
632 'title_hover_color',
633 array(
634 'label' => __( 'Color', 'auxin-elements' ),
635 'type' => Controls_Manager::COLOR,
636 'selectors' => array(
637 '{{WRAPPER}} .entry-title a:hover' => 'color: {{VALUE}};',
638 ),
639 'condition' => array(
640 'display_title' => 'yes',
641 ),
642 )
643 );
644
645 $this->end_controls_tab();
646
647 $this->end_controls_tabs();
648
649 $this->add_group_control(
650 Group_Control_Typography::get_type(),
651 array(
652 'name' => 'title_typography',
653 'scheme' => Typography::TYPOGRAPHY_1,
654 'selector' => '{{WRAPPER}} .entry-title',
655 'condition' => array(
656 'display_title' => 'yes',
657 ),
658 )
659 );
660
661 $this->add_responsive_control(
662 'title_margin_bottom',
663 array(
664 'label' => __( 'Bottom space', 'auxin-elements' ),
665 'type' => Controls_Manager::SLIDER,
666 'range' => array(
667 'px' => array(
668 'max' => 100,
669 ),
670 ),
671 'selectors' => array(
672 '{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
673 ),
674 'condition' => array(
675 'display_title' => 'yes',
676 ),
677 )
678 );
679
680 $this->end_controls_section();
681
682 /*-----------------------------------------------------------------------------------*/
683 /* info_style_section
684 /*-----------------------------------------------------------------------------------*/
685
686 $this->start_controls_section(
687 'info_style_section',
688 array(
689 'label' => __( 'Post Info', 'auxin-elements' ),
690 'tab' => Controls_Manager::TAB_STYLE,
691 'condition' => array(
692 'show_info' => 'yes',
693 ),
694 )
695 );
696
697 $this->start_controls_tabs( 'info_colors' );
698
699 $this->start_controls_tab(
700 'info_color_normal',
701 array(
702 'label' => __( 'Normal' , 'auxin-elements' ),
703 'condition' => array(
704 'show_info' => 'yes',
705 ),
706 )
707 );
708
709 $this->add_control(
710 'info_color',
711 array(
712 'label' => __( 'Color', 'auxin-elements' ),
713 'type' => Controls_Manager::COLOR,
714 'selectors' => array(
715 '{{WRAPPER}} .entry-info a, {{WRAPPER}} .entry-info' => 'color: {{VALUE}};',
716 ),
717 'condition' => array(
718 'show_info' => 'yes',
719 ),
720 )
721 );
722
723 $this->end_controls_tab();
724
725 $this->start_controls_tab(
726 'info_color_hover',
727 array(
728 'label' => __( 'Hover' , 'auxin-elements' ),
729 'condition' => array(
730 'show_info' => 'yes',
731 ),
732 )
733 );
734
735 $this->add_control(
736 'info_hover_color',
737 array(
738 'label' => __( 'Color', 'auxin-elements' ),
739 'type' => Controls_Manager::COLOR,
740 'selectors' => array(
741 '{{WRAPPER}} .entry-info a:hover' => 'color: {{VALUE}};',
742 ),
743 'condition' => array(
744 'show_info' => 'yes',
745 ),
746 )
747 );
748
749 $this->end_controls_tab();
750
751 $this->end_controls_tabs();
752
753 $this->add_group_control(
754 Group_Control_Typography::get_type(),
755 array(
756 'name' => 'info_typography',
757 'scheme' => Typography::TYPOGRAPHY_1,
758 'selector' => '{{WRAPPER}} .entry-info, {{WRAPPER}} .entry-info a',
759 'condition' => array(
760 'show_info' => 'yes',
761 ),
762 )
763 );
764
765 $this->add_responsive_control(
766 'info_margin_bottom',
767 array(
768 'label' => __( 'Bottom space', 'auxin-elements' ),
769 'type' => Controls_Manager::SLIDER,
770 'range' => array(
771 'px' => array(
772 'max' => 100
773 )
774 ),
775 'selectors' => array(
776 '{{WRAPPER}} .entry-info' => 'margin-bottom: {{SIZE}}{{UNIT}};'
777 ),
778 'condition' => array(
779 'show_info' => 'yes'
780 )
781 )
782 );
783
784 $this->add_responsive_control(
785 'info_spacing_between',
786 array(
787 'label' => __( 'Space between metas', 'auxin-elements' ),
788 'type' => Controls_Manager::SLIDER,
789 'range' => array(
790 'px' => array(
791 'max' => 30
792 )
793 ),
794 'selectors' => array(
795 '{{WRAPPER}} .entry-info [class^="entry-"] + [class^="entry-"]:before, {{WRAPPER}} .entry-info .entry-tax a:after' =>
796 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};'
797 ),
798 'condition' => array(
799 'show_info' => 'yes'
800 )
801 )
802 );
803
804 $this->end_controls_section();
805
806 /*-----------------------------------------------------------------------------------*/
807 /* content_style_section
808 /*-----------------------------------------------------------------------------------*/
809
810 $this->start_controls_section(
811 'content_style_section',
812 array(
813 'label' => __( 'Excerpt', 'auxin-elements' ),
814 'tab' => Controls_Manager::TAB_STYLE,
815 'condition' => array(
816 'show_excerpt' => 'yes',
817 )
818 )
819 );
820
821 $this->add_control(
822 'content_color',
823 array(
824 'label' => __( 'Color', 'auxin-elements' ),
825 'type' => Controls_Manager::COLOR,
826 'selectors' => array(
827 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}};',
828 ),
829 'condition' => array(
830 'show_excerpt' => 'yes',
831 ),
832 )
833 );
834
835 $this->add_group_control(
836 Group_Control_Typography::get_type(),
837 array(
838 'name' => 'content_typography',
839 'scheme' => Typography::TYPOGRAPHY_1,
840 'selector' => '{{WRAPPER}} .entry-content',
841 'condition' => array(
842 'show_excerpt' => 'yes',
843 ),
844 )
845 );
846
847 $this->add_responsive_control(
848 'content_margin_bottom',
849 array(
850 'label' => __( 'Bottom space', 'auxin-elements' ),
851 'type' => Controls_Manager::SLIDER,
852 'range' => array(
853 'px' => array(
854 'max' => 100,
855 ),
856 ),
857 'selectors' => array(
858 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
859 ),
860 'condition' => array(
861 'show_excerpt' => 'yes',
862 ),
863 )
864 );
865
866 $this->end_controls_section();
867
868 /*-----------------------------------------------------------------------------------*/
869 /* meta_style_section
870 /*-----------------------------------------------------------------------------------*/
871
872 $this->start_controls_section(
873 'meta_style_section',
874 array(
875 'label' => __( 'Meta', 'auxin-elements' ),
876 'tab' => Controls_Manager::TAB_STYLE
877 )
878 );
879
880 $this->start_controls_tabs( 'meta_colors' );
881
882 $this->start_controls_tab(
883 'meta_color_normal',
884 array(
885 'label' => __( 'Normal' , 'auxin-elements' ),
886 )
887 );
888
889 $this->add_control(
890 'meta_color',
891 array(
892 'label' => __( 'Color', 'auxin-elements' ),
893 'type' => Controls_Manager::COLOR,
894 'selectors' => array(
895 '{{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta span' => 'color: {{VALUE}}; border-color: {{VALUE}};',
896 )
897 )
898 );
899
900 $this->end_controls_tab();
901
902 $this->start_controls_tab(
903 'meta_color_hover',
904 array(
905 'label' => __( 'Hover' , 'auxin-elements' )
906 )
907 );
908
909 $this->add_control(
910 'meta_hover_color',
911 array(
912 'label' => __( 'Color', 'auxin-elements' ),
913 'type' => Controls_Manager::COLOR,
914 'selectors' => array(
915 '{{WRAPPER}} .entry-meta a:hover, {{WRAPPER}} .entry-meta span:hover' => 'color: {{VALUE}}; border-color: {{VALUE}};',
916 )
917 )
918 );
919
920 $this->end_controls_tab();
921
922 $this->end_controls_tabs();
923
924 $this->add_group_control(
925 Group_Control_Typography::get_type(),
926 array(
927 'name' => 'meta_typography',
928 'scheme' => Typography::TYPOGRAPHY_1,
929 'selector' => '{{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta span'
930 )
931 );
932
933 $this->add_responsive_control(
934 'meta_margin_bottom',
935 array(
936 'label' => __( 'Bottom space', 'auxin-elements' ),
937 'type' => Controls_Manager::SLIDER,
938 'range' => array(
939 'px' => array(
940 'max' => 100,
941 ),
942 ),
943 'selectors' => array(
944 '{{WRAPPER}} .entry-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
945 )
946 )
947 );
948
949 $this->end_controls_section();
950 }
951
952 /**
953 * Render image box widget output on the frontend.
954 *
955 * Written in PHP and used to generate the final HTML.
956 *
957 * @since 1.0.0
958 * @access protected
959 */
960 protected function render() {
961
962 $settings = $this->get_settings_for_display();
963
964 $args = array(
965 // Layout Section
966 'show_media' => $settings['show_media'],
967 'preloadable' => $settings['preloadable'],
968 'preload_preview' => $settings['preload_preview'],
969 'preload_bgcolor' => $settings['preload_bgcolor'],
970 'display_title' => $settings['display_title'],
971 'show_info' => $settings['show_info'],
972 'display_categories' => $settings['display_categories'],
973 'show_date' => $settings['show_date'],
974 'display_comments' => $settings['display_comments'],
975 'display_like' => $settings['display_like'],
976 'show_excerpt' => $settings['show_excerpt'],
977 'excerpt_len' => $settings['excerpt_len'],
978 'author_or_readmore' => $settings['author_or_readmore'],
979 'display_author_footer' => $settings['display_author_footer'],
980 'display_author_header' => $settings['display_author_header'],
981
982 // Query Section
983 'cat' => $settings['cat'],
984 'num' => $settings['num'],
985 'exclude_without_media' => $settings['exclude_without_media'],
986 'exclude_custom_post_formats' => $settings['exclude_custom_post_formats'],
987 'exclude_quote_link' => $settings['exclude_quote_link'],
988 'order_by' => $settings['order_by'],
989 'order' => $settings['order'],
990 'only_posts__in' => $settings['only_posts__in'],
991 'include' => $settings['include'],
992 'exclude' => $settings['exclude'],
993 'offset' => $settings['offset'],
994
995 // Paginate Section
996 'loadmore_type' => $settings['loadmore_type'],
997
998 // Style section
999 'image_aspect_ratio' => $settings['image_aspect_ratio']
1000 );
1001
1002 // get the shortcode base blog page
1003 echo auxin_widget_recent_posts_land_style_callback( $args );
1004
1005 }
1006
1007 }
1008