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