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-masonry.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-masonry.php
1437 lines
1 <?php
2 namespace Auxin\Plugin\CoreElements\Elementor\Elements;
3
4 use Elementor\Plugin;
5 use Elementor\Widget_Base;
6 use Elementor\Controls_Manager;
7 use Elementor\Group_Control_Typography;
8 use Elementor\Core\Kits\Documents\Tabs\Global_Typography;
9 use Elementor\Group_Control_Background;
10 use Elementor\Group_Control_Box_Shadow;
11 use Elementor\Group_Control_Text_Shadow;
12
13
14 if ( ! defined( 'ABSPATH' ) ) {
15 exit; // Exit if accessed directly.
16 }
17
18 /**
19 * Elementor 'RecentPostsMasonry' widget.
20 *
21 * Elementor widget that displays an 'RecentPostsMasonry' with lightbox.
22 *
23 * @since 1.0.0
24 */
25 class RecentPostsMasonry extends Widget_Base {
26
27 /**
28 * Get widget name.
29 *
30 * Retrieve 'RecentPostsMasonry' widget name.
31 *
32 * @since 1.0.0
33 * @access public
34 *
35 * @return string Widget name.
36 */
37 public function get_name() {
38 return 'aux_recent_posts_masonry';
39 }
40
41 /**
42 * Get widget title.
43 *
44 * Retrieve 'RecentPostsMasonry' widget title.
45 *
46 * @since 1.0.0
47 * @access public
48 *
49 * @return string Widget title.
50 */
51 public function get_title() {
52 return __('Masonry Posts', 'auxin-elements' );
53 }
54
55 /**
56 * Get widget icon.
57 *
58 * Retrieve 'RecentPostsMasonry' widget icon.
59 *
60 * @since 1.0.0
61 * @access public
62 *
63 * @return string Widget icon.
64 */
65 public function get_icon() {
66 return 'eicon-posts-masonry auxin-badge';
67 }
68
69 /**
70 * Get widget categories.
71 *
72 * Retrieve 'RecentPostsMasonry' widget icon.
73 *
74 * @since 1.0.0
75 * @access public
76 *
77 * @return string Widget icon.
78 */
79 public function get_categories() {
80 return array( 'auxin-dynamic' );
81 }
82
83 /**
84 * Retrieve the terms in a given taxonomy or list of taxonomies.
85 *
86 * Retrieve 'RecentPostsMasonry' widget icon.
87 *
88 * @since 1.0.0
89 * @access public
90 *
91 * @return string Widget icon.
92 */
93 public function get_terms() {
94 $terms = get_terms([
95 'taxonomy' => 'category',
96 'orderby' => 'count',
97 'hide_empty' => false,
98 ]);
99
100 $list = array( ' ' => __('All Categories', 'auxin-elements' ) ) ;
101 foreach ( $terms as $key => $value ) {
102 $list[$value->term_id] = $value->name;
103 }
104
105 return $list;
106 }
107
108 /**
109 * Register 'RecentPostsMasonry' widget controls.
110 *
111 * Adds different input fields to allow the user to change and customize the widget settings.
112 *
113 * @since 1.0.0
114 * @access protected
115 */
116 protected function register_controls() {
117
118 /*-----------------------------------------------------------------------------------*/
119 /* layout_section
120 /*-----------------------------------------------------------------------------------*/
121
122 $this->start_controls_section(
123 'layout_section',
124 array(
125 'label' => __('Layout', 'auxin-elements' ),
126 'tab' => Controls_Manager::TAB_LAYOUT
127 )
128 );
129
130 $this->add_responsive_control(
131 'columns',
132 array(
133 'label' => __( 'Columns', 'auxin-elements' ),
134 'type' => Controls_Manager::SELECT,
135 'default' => '4',
136 'tablet_default' => 'inherit',
137 'mobile_default' => '1',
138 'options' => array(
139 'inherit' => __( 'Inherited from larger', 'auxin-elements' ),
140 '1' => '1',
141 '2' => '2',
142 '3' => '3',
143 '4' => '4',
144 '5' => '5',
145 '6' => '6'
146 ),
147 'frontend_available' => true,
148 )
149 );
150
151 $this->add_control(
152 'content_layout',
153 array(
154 'label' => __('Content layout', 'auxin-elements'),
155 'type' => Controls_Manager::SELECT,
156 'default' => 'default',
157 'options' => array(
158 'default' => __('Full Content', 'auxin-elements'),
159 'entry-boxed' => __('Boxed Content', 'auxin-elements')
160 ),
161 )
162 );
163
164 $this->end_controls_section();
165
166 /*-----------------------------------------------------------------------------------*/
167 /* display_section
168 /*-----------------------------------------------------------------------------------*/
169
170 $this->start_controls_section(
171 'display_section',
172 array(
173 'label' => __('Display', 'auxin-elements' ),
174 'tab' => Controls_Manager::TAB_LAYOUT
175 )
176 );
177
178 $this->add_control(
179 'show_media',
180 array(
181 'label' => __('Display post media (image, video, etc)','auxin-elements' ),
182 'label_block' => true,
183 'type' => Controls_Manager::SWITCHER,
184 'label_on' => __( 'On', 'auxin-elements' ),
185 'label_off' => __( 'Off', 'auxin-elements' ),
186 'return_value' => 'yes',
187 'default' => 'yes',
188 'label_block' => true
189 )
190 );
191
192 $this->add_control(
193 'crop',
194 array(
195 'label' => __('Crop image','auxin-elements' ),
196 'type' => Controls_Manager::SWITCHER,
197 'label_on' => __( 'On', 'auxin-elements' ),
198 'label_off' => __( 'Off', 'auxin-elements' ),
199 'return_value' => 'yes',
200 'default' => 'no',
201 'condition' => array(
202 'show_media' => 'yes',
203 )
204 )
205 );
206
207 $this->add_control(
208 'preloadable',
209 array(
210 'label' => __('Preload image','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' => 'no',
216 'condition' => array(
217 'show_media' => 'yes',
218 )
219 )
220 );
221
222 $this->add_control(
223 'preload_preview',
224 array(
225 'label' => __('While loading image display','auxin-elements' ),
226 'label_block' => true,
227 'type' => Controls_Manager::SELECT,
228 'options' => auxin_get_preloadable_previews(),
229 'return_value' => 'yes',
230 'default' => 'yes',
231 'condition' => array(
232 'preloadable' => 'yes'
233 )
234 )
235 );
236
237 $this->add_control(
238 'preload_bgcolor',
239 array(
240 'label' => __( 'Placeholder color while loading image', 'auxin-elements' ),
241 'type' => Controls_Manager::COLOR,
242 'condition' => array(
243 'preloadable' => 'yes',
244 'preload_preview' => array('simple-spinner', 'simple-spinner-light', 'simple-spinner-dark')
245 )
246 )
247 );
248
249 $this->add_control(
250 'display_title',
251 array(
252 'label' => __('Display post title', 'auxin-elements' ),
253 'type' => Controls_Manager::SWITCHER,
254 'label_on' => __( 'On', 'auxin-elements' ),
255 'label_off' => __( 'Off', 'auxin-elements' ),
256 'return_value' => 'yes',
257 'default' => 'yes'
258 )
259 );
260
261 $this->add_control(
262 'show_info',
263 array(
264 'label' => __('Display post info','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 'post_info_position',
275 array(
276 'label' => __('Post info position', 'auxin-elements' ),
277 'type' => Controls_Manager::SELECT,
278 'default' => 'after-title',
279 'options' => array(
280 'after-title' => __('After Title' , 'auxin-elements' ),
281 'before-title' => __('Before Title', 'auxin-elements' )
282 ),
283 'condition' => array(
284 'show_info' => 'yes',
285 )
286 )
287 );
288
289 $this->add_control(
290 'display_categories',
291 array(
292 'label' => __('Display Categories','auxin-elements' ),
293 'type' => Controls_Manager::SWITCHER,
294 'label_on' => __( 'On', 'auxin-elements' ),
295 'label_off' => __( 'Off', 'auxin-elements' ),
296 'return_value' => 'yes',
297 'default' => 'yes',
298 'condition' => array(
299 'show_info' => 'yes',
300 )
301 )
302 );
303
304 $this->add_control(
305 'max_taxonomy_num',
306 array(
307 'label' => __('Number of Categories Limit','auxin-elements' ),
308 'type' => Controls_Manager::NUMBER,
309 'default' => '1',
310 'condition' => array(
311 'show_info' => 'yes',
312 'display_categories' => 'yes'
313 )
314 )
315 );
316
317 $this->add_control(
318 'show_date',
319 array(
320 'label' => __('Display Date','auxin-elements' ),
321 'type' => Controls_Manager::SWITCHER,
322 'label_on' => __( 'On', 'auxin-elements' ),
323 'label_off' => __( 'Off', 'auxin-elements' ),
324 'return_value' => 'yes',
325 'default' => 'yes',
326 'condition' => array(
327 'show_info' => 'yes',
328 )
329 )
330 );
331
332 $this->add_control(
333 'show_content',
334 array(
335 'label' => __('Display post content','auxin-elements' ),
336 'type' => Controls_Manager::SWITCHER,
337 'label_on' => __( 'On', 'auxin-elements' ),
338 'label_off' => __( 'Off', 'auxin-elements' ),
339 'return_value' => 'yes',
340 'default' => 'yes'
341 )
342 );
343
344 $this->add_control(
345 'display_like',
346 array(
347 'label' => __('Display like button', 'auxin-elements' ),
348 'type' => Controls_Manager::SWITCHER,
349 'label_on' => __( 'On', 'auxin-elements' ),
350 'label_off' => __( 'Off', 'auxin-elements' ),
351 'return_value' => 'yes',
352 'default' => 'yes'
353 )
354 );
355
356 $this->add_control(
357 'display_comments',
358 array(
359 'label' => __('Display Comment Number', 'auxin-elements' ),
360 'type' => Controls_Manager::SWITCHER,
361 'label_on' => __( 'On', 'auxin-elements' ),
362 'label_off' => __( 'Off', 'auxin-elements' ),
363 'return_value' => 'yes',
364 'default' => 'yes'
365 )
366 );
367
368 $this->add_control(
369 'show_excerpt',
370 array(
371 'label' => __('Display excerpt','auxin-elements' ),
372 'description' => __('Enable it to display post summary instead of full content.','auxin-elements' ),
373 'type' => Controls_Manager::SWITCHER,
374 'label_on' => __( 'On', 'auxin-elements' ),
375 'label_off' => __( 'Off', 'auxin-elements' ),
376 'return_value' => 'yes',
377 'default' => 'yes'
378 )
379 );
380
381 $this->add_control(
382 'excerpt_len',
383 array(
384 'label' => __('Excerpt length','auxin-elements' ),
385 'description' => __('Specify summary content in character.','auxin-elements' ),
386 'type' => Controls_Manager::NUMBER,
387 'default' => '160',
388 'condition' => array(
389 'show_excerpt' => 'yes',
390 )
391 )
392 );
393
394 $this->add_control(
395 'author_or_readmore',
396 array(
397 'label' => __('Display author or read more', 'auxin-elements'),
398 'label_block' => true,
399 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
400 'type' => Controls_Manager::SELECT,
401 'default' => 'readmore',
402 'options' => array(
403 'readmore' => __('Read More', 'auxin-elements'),
404 'author' => __('Author Name', 'auxin-elements'),
405 'none' => __('None', 'auxin-elements'),
406 ),
407 'label_block' => true
408 )
409 );
410
411 $this->add_control(
412 'display_author_header',
413 array(
414 'label' => __('Display Author in Header','auxin-elements' ),
415 'description' => __('Enable it to display author name in header','auxin-elements' ),
416 'type' => Controls_Manager::SWITCHER,
417 'label_on' => __( 'On', 'auxin-elements' ),
418 'label_off' => __( 'Off', 'auxin-elements' ),
419 'return_value' => 'yes',
420 'default' => 'yes',
421 'condition' => array(
422 'author_or_readmore' => 'author',
423 )
424 )
425 );
426
427 $this->add_control(
428 'display_author_footer',
429 array(
430 'label' => __('Display Author in Footer','auxin-elements' ),
431 'description' => __('Enable it to display author name in footer','auxin-elements' ),
432 'type' => Controls_Manager::SWITCHER,
433 'label_on' => __( 'On', 'auxin-elements' ),
434 'label_off' => __( 'Off', 'auxin-elements' ),
435 'return_value' => 'yes',
436 'default' => 'no',
437 'condition' => array(
438 'author_or_readmore' => 'author',
439 )
440 )
441 );
442
443 $this->end_controls_section();
444
445 /*-----------------------------------------------------------------------------------*/
446 /* query_section
447 /*-----------------------------------------------------------------------------------*/
448
449 $this->start_controls_section(
450 'query_section',
451 array(
452 'label' => __('Query', 'auxin-elements' ),
453 )
454 );
455
456 $this->add_control(
457 'cat',
458 array(
459 'label' => __('Categories', 'auxin-elements'),
460 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
461 'type' => Controls_Manager::SELECT2,
462 'multiple' => true,
463 'options' => $this->get_terms(),
464 'default' => array( ' ' ),
465 )
466 );
467
468 $this->add_control(
469 'num',
470 array(
471 'label' => __('Number of posts to show', 'auxin-elements'),
472 'label_block' => true,
473 'type' => Controls_Manager::NUMBER,
474 'default' => '8',
475 'min' => 1,
476 'step' => 1
477 )
478 );
479
480 $this->add_control(
481 'exclude_without_media',
482 array(
483 'label' => __('Exclude posts without media','auxin-elements' ),
484 'type' => Controls_Manager::SWITCHER,
485 'label_on' => __( 'On', 'auxin-elements' ),
486 'label_off' => __( 'Off', 'auxin-elements' ),
487 'return_value' => 'yes',
488 'default' => 'no'
489 )
490 );
491
492 $this->add_control(
493 'exclude_custom_post_formats',
494 array(
495 'label' => __('Exclude custom post formats','auxin-elements' ),
496 'type' => Controls_Manager::SWITCHER,
497 'label_on' => __( 'On', 'auxin-elements' ),
498 'label_off' => __( 'Off', 'auxin-elements' ),
499 'return_value' => 'yes',
500 'default' => 'no',
501 )
502 );
503
504 $this->add_control(
505 'exclude_quote_link',
506 array(
507 'label' => __('Exclude quote and link post formats','auxin-elements' ),
508 'type' => Controls_Manager::SWITCHER,
509 'label_on' => __( 'On', 'auxin-elements' ),
510 'label_off' => __( 'Off', 'auxin-elements' ),
511 'return_value' => 'yes',
512 'default' => 'no',
513 'condition' => array(
514 'exclude_custom_post_formats' => 'yes',
515 )
516 )
517 );
518
519 $this->add_control(
520 'order_by',
521 array(
522 'label' => __('Order by', 'auxin-elements'),
523 'type' => Controls_Manager::SELECT,
524 'default' => 'date',
525 'options' => array(
526 'date' => __('Date', 'auxin-elements'),
527 'menu_order date' => __('Menu Order', 'auxin-elements'),
528 'title' => __('Title', 'auxin-elements'),
529 'ID' => __('ID', 'auxin-elements'),
530 'rand' => __('Random', 'auxin-elements'),
531 'comment_count' => __('Comments', 'auxin-elements'),
532 'modified' => __('Date Modified', 'auxin-elements'),
533 'author' => __('Author', 'auxin-elements'),
534 'post__in' => __('Inserted Post IDs', 'auxin-elements')
535 ),
536 )
537 );
538
539 $this->add_control(
540 'order',
541 array(
542 'label' => __('Order', 'auxin-elements'),
543 'type' => Controls_Manager::SELECT,
544 'default' => 'DESC',
545 'options' => array(
546 'DESC' => __('Descending', 'auxin-elements'),
547 'ASC' => __('Ascending', 'auxin-elements'),
548 ),
549 )
550 );
551
552 $this->add_control(
553 'only_posts__in',
554 array(
555 'label' => __('Only posts','auxin-elements' ),
556 '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' ),
557 'type' => Controls_Manager::TEXT
558 )
559 );
560
561 $this->add_control(
562 'include',
563 array(
564 'label' => __('Include posts','auxin-elements' ),
565 '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' ),
566 'type' => Controls_Manager::TEXT
567 )
568 );
569
570 $this->add_control(
571 'exclude',
572 array(
573 'label' => __('Exclude posts','auxin-elements' ),
574 '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' ),
575 'type' => Controls_Manager::TEXT
576 )
577 );
578
579 $this->add_control(
580 'offset',
581 array(
582 'label' => __('Start offset','auxin-elements' ),
583 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
584 'type' => Controls_Manager::NUMBER
585 )
586 );
587
588 $this->end_controls_section();
589
590 /*-----------------------------------------------------------------------------------*/
591 /* paginate_section
592 /*-----------------------------------------------------------------------------------*/
593
594 $this->start_controls_section(
595 'paginate_section',
596 array(
597 'label' => __('Paginate', 'auxin-elements' ),
598 )
599 );
600
601 $this->add_control(
602 'loadmore_type',
603 array(
604 'label' => __('Load More Type','auxin-elements' ),
605 'type' => 'aux-visual-select',
606 'options' => array(
607 '' => array(
608 'label' => __('None', 'auxin-elements' ),
609 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
610 ),
611 'scroll' => array(
612 'label' => __('Infinite Scroll', 'auxin-elements' ),
613 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
614 ),
615 'next' => array(
616 'label' => __('Next Button', 'auxin-elements' ),
617 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
618 ),
619 'next-prev' => array(
620 'label' => __('Next Prev', 'auxin-elements' ),
621 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
622 )
623 ),
624 'default' => ''
625 )
626 );
627
628 $this->end_controls_section();
629
630 /*-----------------------------------------------------------------------------------*/
631 /* image_style_section
632 /*-----------------------------------------------------------------------------------*/
633
634 $this->start_controls_section(
635 'image_style_section',
636 array(
637 'label' => __( 'Image', 'auxin-elements' ),
638 'tab' => Controls_Manager::TAB_STYLE,
639 'condition' => array(
640 'show_media' => 'yes',
641 ),
642 )
643 );
644
645 $this->add_control(
646 'img_border_radius',
647 array(
648 'label' => __( 'Border Radius', 'auxin-elements' ),
649 'type' => Controls_Manager::DIMENSIONS,
650 'size_units' => array( 'px', '%' ),
651 'selectors' => array(
652 '{{WRAPPER}} .entry-media img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
653 ),
654 'condition' => array(
655 'show_media' => 'yes',
656 ),
657 )
658
659 );
660 $this->start_controls_tabs( 'img_tabs' );
661
662 $this->start_controls_tab(
663 'image_tab_normal',
664 array(
665 'label' => __( 'Normal' , 'auxin-elements' ),
666 'condition' => array(
667 'show_media' => 'yes',
668 ),
669 )
670 );
671
672 $this->add_group_control(
673 Group_Control_Box_Shadow::get_type(),
674 array(
675 'name' => 'img_normal_box_shadow',
676 'selector' => '{{WRAPPER}} .aux-media-image',
677 'condition' => array(
678 'show_media' => 'yes',
679 ),
680 )
681 );
682
683 $this->end_controls_tab();
684
685 $this->start_controls_tab(
686 'image_tab_hover',
687 array(
688 'label' => __( 'Hover' , 'auxin-elements' ),
689 'condition' => array(
690 'show_media' => 'yes',
691 ),
692 )
693 );
694
695 $this->add_group_control(
696 Group_Control_Box_Shadow::get_type(),
697 array(
698 'name' => 'img_hover_box_shadow',
699 'selector' => '{{WRAPPER}} .post:hover .aux-media-image',
700 'condition' => array(
701 'show_media' => 'yes',
702 ),
703 )
704 );
705
706 $this->end_controls_tab();
707
708 $this->end_controls_tabs();
709
710 $this->end_controls_section();
711
712 /*-----------------------------------------------------------------------------------*/
713 /* title_style_section
714 /*-----------------------------------------------------------------------------------*/
715
716 $this->start_controls_section(
717 'title_style_section',
718 array(
719 'label' => __( 'Title', 'auxin-elements' ),
720 'tab' => Controls_Manager::TAB_STYLE,
721 'condition' => array(
722 'display_title' => 'yes',
723 ),
724 )
725 );
726
727 $this->start_controls_tabs( 'title_colors' );
728
729 $this->start_controls_tab(
730 'title_color_normal',
731 array(
732 'label' => __( 'Normal' , 'auxin-elements' ),
733 'condition' => array(
734 'display_title' => 'yes',
735 ),
736 )
737 );
738
739 $this->add_control(
740 'title_color',
741 array(
742 'label' => __( 'Color', 'auxin-elements' ),
743 'type' => Controls_Manager::COLOR,
744 'selectors' => array(
745 '{{WRAPPER}} .entry-title a' => 'color: {{VALUE}};',
746 ),
747 'condition' => array(
748 'display_title' => 'yes',
749 ),
750 )
751 );
752
753 $this->end_controls_tab();
754
755 $this->start_controls_tab(
756 'title_color_hover',
757 array(
758 'label' => __( 'Hover' , 'auxin-elements' ),
759 'condition' => array(
760 'display_title' => 'yes',
761 ),
762 )
763 );
764
765 $this->add_control(
766 'title_hover_color',
767 array(
768 'label' => __( 'Color', 'auxin-elements' ),
769 'type' => Controls_Manager::COLOR,
770 'selectors' => array(
771 '{{WRAPPER}} .entry-title a:hover' => 'color: {{VALUE}};',
772 ),
773 'condition' => array(
774 'display_title' => 'yes',
775 ),
776 )
777 );
778
779 $this->end_controls_tab();
780
781 $this->end_controls_tabs();
782
783 $this->add_group_control(
784 Group_Control_Typography::get_type(),
785 array(
786 'name' => 'title_typography',
787 'global' => [
788 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
789 ],
790 'selector' => '{{WRAPPER}} .entry-title',
791 'condition' => array(
792 'display_title' => 'yes',
793 ),
794 )
795 );
796
797 $this->add_responsive_control(
798 'title_margin_bottom',
799 array(
800 'label' => __( 'Bottom space', 'auxin-elements' ),
801 'type' => Controls_Manager::SLIDER,
802 'range' => array(
803 'px' => array(
804 'max' => 100,
805 ),
806 ),
807 'selectors' => array(
808 '{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
809 ),
810 'condition' => array(
811 'display_title' => 'yes',
812 ),
813 )
814 );
815
816 $this->end_controls_section();
817
818 /*-----------------------------------------------------------------------------------*/
819 /* info_style_section
820 /*-----------------------------------------------------------------------------------*/
821
822 $this->start_controls_section(
823 'info_style_section',
824 array(
825 'label' => __( 'Post Info', 'auxin-elements' ),
826 'tab' => Controls_Manager::TAB_STYLE,
827 'condition' => array(
828 'show_info' => 'yes',
829 ),
830 )
831 );
832
833 $this->start_controls_tabs( 'info_colors' );
834
835 $this->start_controls_tab(
836 'info_color_normal',
837 array(
838 'label' => __( 'Normal' , 'auxin-elements' ),
839 'condition' => array(
840 'show_info' => 'yes',
841 ),
842 )
843 );
844
845 $this->add_control(
846 'info_color',
847 array(
848 'label' => __( 'Color', 'auxin-elements' ),
849 'type' => Controls_Manager::COLOR,
850 'selectors' => array(
851 '{{WRAPPER}} .entry-info a, {{WRAPPER}} .entry-info' => 'color: {{VALUE}};',
852 ),
853 'condition' => array(
854 'show_info' => 'yes',
855 ),
856 )
857 );
858
859 $this->end_controls_tab();
860
861 $this->start_controls_tab(
862 'info_color_hover',
863 array(
864 'label' => __( 'Hover' , 'auxin-elements' ),
865 'condition' => array(
866 'show_info' => 'yes',
867 ),
868 )
869 );
870
871 $this->add_control(
872 'info_hover_color',
873 array(
874 'label' => __( 'Color', 'auxin-elements' ),
875 'type' => Controls_Manager::COLOR,
876 'selectors' => array(
877 '{{WRAPPER}} .entry-info a:hover' => 'color: {{VALUE}};',
878 ),
879 'condition' => array(
880 'show_info' => 'yes',
881 ),
882 )
883 );
884
885 $this->end_controls_tab();
886
887 $this->end_controls_tabs();
888
889 $this->add_group_control(
890 Group_Control_Typography::get_type(),
891 array(
892 'name' => 'info_typography',
893 'global' => [
894 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
895 ],
896 'selector' => '{{WRAPPER}} .entry-info, {{WRAPPER}} .entry-info a',
897 'condition' => array(
898 'show_info' => 'yes',
899 ),
900 )
901 );
902
903 $this->add_responsive_control(
904 'info_margin_bottom',
905 array(
906 'label' => __( 'Bottom space', 'auxin-elements' ),
907 'type' => Controls_Manager::SLIDER,
908 'range' => array(
909 'px' => array(
910 'max' => 100
911 )
912 ),
913 'selectors' => array(
914 '{{WRAPPER}} .entry-info' => 'margin-bottom: {{SIZE}}{{UNIT}};'
915 ),
916 'condition' => array(
917 'show_info' => 'yes'
918 )
919 )
920 );
921
922 $this->add_responsive_control(
923 'info_spacing_between',
924 array(
925 'label' => __( 'Space between metas', 'auxin-elements' ),
926 'type' => Controls_Manager::SLIDER,
927 'range' => array(
928 'px' => array(
929 'max' => 30
930 )
931 ),
932 'selectors' => array(
933 '{{WRAPPER}} .entry-info [class^="entry-"] + [class^="entry-"]:before, {{WRAPPER}} .entry-info .entry-tax a:after' =>
934 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};'
935 ),
936 'condition' => array(
937 'show_info' => 'yes'
938 )
939 )
940 );
941
942 $this->end_controls_section();
943
944 /*-----------------------------------------------------------------------------------*/
945 /* content_style_section
946 /*-----------------------------------------------------------------------------------*/
947
948 $this->start_controls_section(
949 'content_style_section',
950 array(
951 'label' => __( 'Excerpt', 'auxin-elements' ),
952 'tab' => Controls_Manager::TAB_STYLE,
953 'condition' => array(
954 'show_excerpt' => 'yes',
955 )
956 )
957 );
958
959 $this->add_control(
960 'content_color',
961 array(
962 'label' => __( 'Color', 'auxin-elements' ),
963 'type' => Controls_Manager::COLOR,
964 'selectors' => array(
965 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}};',
966 ),
967 'condition' => array(
968 'show_excerpt' => 'yes',
969 ),
970 )
971 );
972
973 $this->add_group_control(
974 Group_Control_Typography::get_type(),
975 array(
976 'name' => 'content_typography',
977 'global' => [
978 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
979 ],
980 'selector' => '{{WRAPPER}} .entry-content',
981 'condition' => array(
982 'show_excerpt' => 'yes',
983 ),
984 )
985 );
986
987 $this->add_responsive_control(
988 'content_margin_bottom',
989 array(
990 'label' => __( 'Bottom space', 'auxin-elements' ),
991 'type' => Controls_Manager::SLIDER,
992 'range' => array(
993 'px' => array(
994 'max' => 100,
995 ),
996 ),
997 'selectors' => array(
998 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
999 ),
1000 'condition' => array(
1001 'show_excerpt' => 'yes',
1002 ),
1003 )
1004 );
1005
1006 $this->end_controls_section();
1007
1008 /*-----------------------------------------------------------------------------------*/
1009 /* meta_style_section
1010 /*-----------------------------------------------------------------------------------*/
1011
1012 $this->start_controls_section(
1013 'meta_style_section',
1014 array(
1015 'label' => __( 'Meta', 'auxin-elements' ),
1016 'tab' => Controls_Manager::TAB_STYLE
1017 )
1018 );
1019
1020 $this->start_controls_tabs( 'meta_colors' );
1021
1022 $this->start_controls_tab(
1023 'meta_color_normal',
1024 array(
1025 'label' => __( 'Normal' , 'auxin-elements' ),
1026 )
1027 );
1028
1029 $this->add_control(
1030 'meta_color',
1031 array(
1032 'label' => __( 'Color', 'auxin-elements' ),
1033 'type' => Controls_Manager::COLOR,
1034 'selectors' => array(
1035 '{{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta span' => 'color: {{VALUE}};',
1036 )
1037 )
1038 );
1039
1040 $this->end_controls_tab();
1041
1042 $this->start_controls_tab(
1043 'meta_color_hover',
1044 array(
1045 'label' => __( 'Hover' , 'auxin-elements' )
1046 )
1047 );
1048
1049 $this->add_control(
1050 'meta_hover_color',
1051 array(
1052 'label' => __( 'Color', 'auxin-elements' ),
1053 'type' => Controls_Manager::COLOR,
1054 'selectors' => array(
1055 '{{WRAPPER}} .entry-meta a:hover, {{WRAPPER}} .entry-meta span:hover' => 'color: {{VALUE}};',
1056 )
1057 )
1058 );
1059
1060 $this->end_controls_tab();
1061
1062 $this->end_controls_tabs();
1063
1064 $this->add_group_control(
1065 Group_Control_Typography::get_type(),
1066 array(
1067 'name' => 'meta_typography',
1068 'global' => [
1069 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1070 ],
1071 'selector' => '{{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta span'
1072 )
1073 );
1074
1075 $this->add_responsive_control(
1076 'meta_margin_bottom',
1077 array(
1078 'label' => __( 'Bottom space', 'auxin-elements' ),
1079 'type' => Controls_Manager::SLIDER,
1080 'range' => array(
1081 'px' => array(
1082 'max' => 100,
1083 ),
1084 ),
1085 'selectors' => array(
1086 '{{WRAPPER}} .entry-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1087 )
1088 )
1089 );
1090
1091 $this->end_controls_section();
1092
1093 /* wrapper_style_section
1094 /*-------------------------------------*/
1095
1096 $this->start_controls_section(
1097 'wrapper_style_section',
1098 array(
1099 'label' => __( 'Wrapper', 'auxin-elements' ),
1100 'tab' => Controls_Manager::TAB_STYLE
1101 )
1102 );
1103
1104 $this->start_controls_tabs( 'button_background' );
1105
1106 $this->start_controls_tab(
1107 'button_bg_normal',
1108 array(
1109 'label' => __( 'Normal' , 'auxin-elements' )
1110 )
1111 );
1112
1113 $this->add_group_control(
1114 Group_Control_Background::get_type(),
1115 array(
1116 'name' => 'background',
1117 'label' => __( 'Background', 'auxin-elements' ),
1118 'types' => array( 'classic', 'gradient' ),
1119 'selector' => '{{WRAPPER}} .aux-col .column-entry',
1120 )
1121 );
1122
1123 $this->add_group_control(
1124 Group_Control_Box_Shadow::get_type(),
1125 array(
1126 'name' => 'box_shadow',
1127 'selector' => '{{WRAPPER}} .aux-col .column-entry'
1128 )
1129 );
1130
1131 $this->end_controls_tab();
1132
1133 $this->start_controls_tab(
1134 'button_bg_hover',
1135 array(
1136 'label' => __( 'Hover' , 'auxin-elements' )
1137 )
1138 );
1139
1140 $this->add_control(
1141 'general_hover_text_color',
1142 array(
1143 'label' => __( 'Text Color', 'auxin-elements' ),
1144 'type' => Controls_Manager::COLOR,
1145 'selectors' => array(
1146 '{{WRAPPER}} .aux-col:hover .entry-main a, {{WRAPPER}} .aux-col:hover .entry-main *' => 'transition:all 150ms ease; color:{{VALUE}};'
1147 )
1148 )
1149 );
1150
1151 $this->add_group_control(
1152 Group_Control_Background::get_type(),
1153 array(
1154 'name' => 'hover_background',
1155 'label' => __( 'Background', 'auxin-elements' ),
1156 'types' => array( 'classic', 'gradient' ),
1157 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry',
1158 )
1159 );
1160
1161 $this->add_group_control(
1162 Group_Control_Box_Shadow::get_type(),
1163 array(
1164 'name' => 'hover_box_shadow',
1165 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry'
1166 )
1167 );
1168
1169 $this->end_controls_tab();
1170
1171 $this->end_controls_tabs();
1172
1173 $this->add_responsive_control(
1174 'align',
1175 array(
1176 'label' => __('Align','auxin-elements'),
1177 'type' => Controls_Manager::CHOOSE,
1178 'devices' => array( 'desktop', 'mobile' ),
1179 'options' => array(
1180 'left' => array(
1181 'title' => __( 'Left', 'auxin-elements' ),
1182 'icon' => 'eicon-text-align-left',
1183 ),
1184 'center' => array(
1185 'title' => __( 'Center', 'auxin-elements' ),
1186 'icon' => 'eicon-text-align-center',
1187 ),
1188 'right' => array(
1189 'title' => __( 'Right', 'auxin-elements' ),
1190 'icon' => 'eicon-text-align-right',
1191 ),
1192 ),
1193 'default' => 'left',
1194 'toggle' => true,
1195 'selectors' => array(
1196 '{{WRAPPER}}' => 'text-align: {{VALUE}}',
1197 )
1198 )
1199 );
1200
1201 $this->add_responsive_control(
1202 'wrapper_main_padding',
1203 array(
1204 'label' => __( 'Padding for main wrapper', 'auxin-elements' ),
1205 'type' => Controls_Manager::DIMENSIONS,
1206 'size_units' => array( 'px', '%' ),
1207 'selectors' => array(
1208 '{{WRAPPER}} .column-entry' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1209 )
1210 )
1211 );
1212
1213 $this->add_responsive_control(
1214 'wrapper_content_padding',
1215 array(
1216 'label' => __( 'Padding for content wrapper', 'auxin-elements' ),
1217 'type' => Controls_Manager::DIMENSIONS,
1218 'size_units' => array( 'px', '%' ),
1219 'selectors' => array(
1220 '{{WRAPPER}} .type-post .entry-main' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1221 )
1222 )
1223 );
1224
1225 $this->end_controls_section();
1226
1227 /*-----------------------------------------------------------------------------------*/
1228 /* ReadMore Button
1229 /*-----------------------------------------------------------------------------------*/
1230
1231 $this->start_controls_section(
1232 'btn_section',
1233 array(
1234 'label' => __('Read More', 'auxin-elements' ),
1235 'tab' => Controls_Manager::TAB_STYLE,
1236 )
1237 );
1238
1239 $this->start_controls_tabs( 'btn_bg_tab' );
1240
1241 $this->start_controls_tab(
1242 'btn_bg_normal',
1243 array(
1244 'label' => __( 'Normal' , 'auxin-elements' )
1245 )
1246 );
1247
1248 $this->add_group_control(
1249 Group_Control_Background::get_type(),
1250 array(
1251 'name' => 'btn',
1252 'label' => __( 'Background', 'auxin-elements' ),
1253 'types' => array( 'classic', 'gradient' ),
1254 'selector' => '{{WRAPPER}} .aux-read-more',
1255 )
1256 );
1257
1258 $this->add_group_control(
1259 Group_Control_Box_Shadow::get_type(),
1260 array(
1261 'name' => 'btn_shadow',
1262 'selector' => '{{WRAPPER}} .aux-read-more'
1263 )
1264 );
1265
1266 $this->add_control(
1267 'btn_text_color',
1268 array(
1269 'label' => __( 'Color', 'auxin-elements' ),
1270 'type' => Controls_Manager::COLOR,
1271 'selectors' => array(
1272 '{{WRAPPER}} .aux-read-more' => 'color: {{VALUE}};',
1273 )
1274 )
1275 );
1276
1277 $this->add_group_control(
1278 Group_Control_Text_Shadow::get_type(),
1279 array(
1280 'name' => 'btn_text_shadow',
1281 'label' => __( 'Text Shadow', 'auxin-elements' ),
1282 'selector' => '{{WRAPPER}} .aux-read-more',
1283 )
1284 );
1285
1286 $this->add_group_control(
1287 Group_Control_Typography::get_type(),
1288 array(
1289 'name' => 'btn_text_typography',
1290 'global' => [
1291 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1292 ],
1293 'selector' => '{{WRAPPER}} .aux-read-more'
1294 )
1295 );
1296
1297 $this->end_controls_tab();
1298
1299 $this->start_controls_tab(
1300 'btn_bg_hover',
1301 array(
1302 'label' => __( 'Hover' , 'auxin-elements' )
1303 )
1304 );
1305
1306 $this->add_group_control(
1307 Group_Control_Background::get_type(),
1308 array(
1309 'name' => 'btn_bg_hover',
1310 'label' => __( 'Background', 'auxin-elements' ),
1311 'types' => array( 'classic', 'gradient' ),
1312 'selector' => '{{WRAPPER}} .aux-read-more:hover',
1313 )
1314 );
1315
1316 $this->add_group_control(
1317 Group_Control_Box_Shadow::get_type(),
1318 array(
1319 'name' => 'btn_shadow_hover',
1320 'selector' => '{{WRAPPER}} .aux-read-more:hover'
1321 )
1322 );
1323
1324 $this->add_control(
1325 'btn_text_color_hover',
1326 array(
1327 'label' => __( 'Color', 'auxin-elements' ),
1328 'type' => Controls_Manager::COLOR,
1329 'selectors' => array(
1330 '{{WRAPPER}} .aux-read-more' => 'color: {{VALUE}};',
1331 )
1332 )
1333 );
1334
1335 $this->add_group_control(
1336 Group_Control_Text_Shadow::get_type(),
1337 array(
1338 'name' => 'btn_text_shadow_hover',
1339 'label' => __( 'Text Shadow', 'auxin-elements' ),
1340 'selector' => '{{WRAPPER}} .aux-read-more',
1341 )
1342 );
1343
1344 $this->add_group_control(
1345 Group_Control_Typography::get_type(),
1346 array(
1347 'name' => 'btn_text_typography_hover',
1348 'global' => [
1349 'default' => Global_Typography::TYPOGRAPHY_PRIMARY,
1350 ],
1351 'selector' => '{{WRAPPER}} .aux-read-more'
1352 )
1353 );
1354
1355 $this->end_controls_tab();
1356
1357 $this->end_controls_tabs();
1358
1359 $this->add_responsive_control(
1360 'btn_padding',
1361 array(
1362 'label' => __( 'Button Padding', 'auxin-elements' ),
1363 'type' => Controls_Manager::DIMENSIONS,
1364 'size_units' => array( 'px', '%' ),
1365 'selectors' => array(
1366 '{{WRAPPER}} .aux-read-more' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1367 ),
1368 )
1369 );
1370
1371 $this->end_controls_section();
1372
1373 }
1374
1375 /**
1376 * Render image box widget output on the frontend.
1377 *
1378 * Written in PHP and used to generate the final HTML.
1379 *
1380 * @since 1.0.0
1381 * @access protected
1382 */
1383 protected function render() {
1384
1385 $settings = $this->get_settings_for_display();
1386
1387 $args = array(
1388 // Display Section
1389 'show_media' => $settings['show_media'],
1390 'crop' => $settings['crop'],
1391 'preloadable' => $settings['preloadable'],
1392 'preload_preview' => $settings['preload_preview'],
1393 'preload_bgcolor' => $settings['preload_bgcolor'],
1394 'display_title' => $settings['display_title'],
1395 'show_info' => $settings['show_info'],
1396 'post_info_position' => $settings['post_info_position'],
1397 'display_like' => $settings['display_like'],
1398 'show_content' => $settings['show_content'],
1399 'display_categories' => $settings['display_categories'],
1400 'max_taxonomy_num' => $settings['max_taxonomy_num'],
1401 'show_date' => $settings['show_date'],
1402 'show_excerpt' => $settings['show_excerpt'],
1403 'excerpt_len' => $settings['excerpt_len'],
1404 'author_or_readmore' => $settings['author_or_readmore'],
1405 'display_author_header' => $settings['display_author_header'],
1406 'display_author_footer' => $settings['display_author_footer'],
1407 'display_comments' => $settings['display_comments'],
1408 'content_layout' => $settings['content_layout'],
1409
1410 // Layout Section
1411 'desktop_cnum' => $settings['columns'],
1412 'tablet_cnum' => $settings['columns_tablet'],
1413 'phone_cnum' => $settings['columns_mobile'],
1414
1415 // Query Section
1416 'cat' => $settings['cat'],
1417 'num' => $settings['num'],
1418 'exclude_without_media' => $settings['exclude_without_media'],
1419 'exclude_custom_post_formats' => $settings['exclude_custom_post_formats'],
1420 'exclude_quote_link' => $settings['exclude_quote_link'],
1421 'order_by' => $settings['order_by'],
1422 'order' => $settings['order'],
1423 'only_posts__in' => $settings['only_posts__in'],
1424 'include' => $settings['include'],
1425 'exclude' => $settings['exclude'],
1426 'offset' => $settings['offset'],
1427
1428 // Loadmore Section
1429 'loadmore_type' => $settings['loadmore_type']
1430 );
1431
1432 // get the shortcode base blog page
1433 echo auxin_widget_recent_posts_masonry_callback( $args );
1434 }
1435
1436 }
1437