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