PluginProbe ʕ •ᴥ•ʔ
Shortcodes and extra features for Phlox theme / 2.5.8
Shortcodes and extra features for Phlox theme v2.5.8
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 years ago accordion.php 6 years ago audio.php 6 years ago before-after.php 6 years ago button.php 6 years ago carousel-navigation.php 6 years ago contact-box.php 6 years ago contact-form.php 6 years ago custom-list.php 6 years ago divider.php 6 years ago gallery.php 6 years ago gmap.php 6 years ago heading-modern.php 6 years ago icon.php 6 years ago image.php 6 years ago mailchimp.php 6 years ago modern-button.php 6 years ago quote.php 6 years ago recent-comments.php 6 years ago recent-posts-grid-carousel.php 6 years ago recent-posts-land-style.php 6 years ago recent-posts-masonry.php 6 years ago recent-posts-tiles-carousel.php 6 years ago recent-posts-tiles.php 6 years ago recent-posts-timeline.php 6 years ago recent-products.php 6 years ago search.php 6 years ago staff.php 6 years ago svg.php 6 years ago tabs.php 6 years ago testimonial.php 6 years ago text.php 6 years ago touch-slider.php 6 years ago video.php 6 years ago
recent-posts-masonry.php
1406 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\Scheme_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 'show_date',
301 array(
302 'label' => __('Display Date','auxin-elements' ),
303 'type' => Controls_Manager::SWITCHER,
304 'label_on' => __( 'On', 'auxin-elements' ),
305 'label_off' => __( 'Off', 'auxin-elements' ),
306 'return_value' => 'yes',
307 'default' => 'yes',
308 'condition' => array(
309 'show_info' => 'yes',
310 )
311 )
312 );
313
314 $this->add_control(
315 'show_content',
316 array(
317 'label' => __('Display post content','auxin-elements' ),
318 'type' => Controls_Manager::SWITCHER,
319 'label_on' => __( 'On', 'auxin-elements' ),
320 'label_off' => __( 'Off', 'auxin-elements' ),
321 'return_value' => 'yes',
322 'default' => 'yes'
323 )
324 );
325
326 $this->add_control(
327 'display_like',
328 array(
329 'label' => __('Display like button', 'auxin-elements' ),
330 'type' => Controls_Manager::SWITCHER,
331 'label_on' => __( 'On', 'auxin-elements' ),
332 'label_off' => __( 'Off', 'auxin-elements' ),
333 'return_value' => 'yes',
334 'default' => 'yes'
335 )
336 );
337
338 $this->add_control(
339 'display_comments',
340 array(
341 'label' => __('Display Comment Number', 'auxin-elements' ),
342 'type' => Controls_Manager::SWITCHER,
343 'label_on' => __( 'On', 'auxin-elements' ),
344 'label_off' => __( 'Off', 'auxin-elements' ),
345 'return_value' => 'yes',
346 'default' => 'yes'
347 )
348 );
349
350 $this->add_control(
351 'show_excerpt',
352 array(
353 'label' => __('Display excerpt','auxin-elements' ),
354 'description' => __('Enable it to display post summary instead of full content.','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 'excerpt_len',
365 array(
366 'label' => __('Excerpt length','auxin-elements' ),
367 'description' => __('Specify summary content in character.','auxin-elements' ),
368 'type' => Controls_Manager::NUMBER,
369 'default' => '160',
370 'condition' => array(
371 'show_excerpt' => 'yes',
372 )
373 )
374 );
375
376 $this->add_control(
377 'author_or_readmore',
378 array(
379 'label' => __('Display author or read more', 'auxin-elements'),
380 'label_block' => true,
381 'description' => __('Specifies whether to show author or read more on each post.', 'auxin-elements'),
382 'type' => Controls_Manager::SELECT,
383 'default' => 'readmore',
384 'options' => array(
385 'readmore' => __('Read More', 'auxin-elements'),
386 'author' => __('Author Name', 'auxin-elements'),
387 'none' => __('None', 'auxin-elements'),
388 ),
389 'label_block' => true
390 )
391 );
392
393 $this->add_control(
394 'display_author_header',
395 array(
396 'label' => __('Display Author in Header','auxin-elements' ),
397 'description' => __('Enable it to display author name in header','auxin-elements' ),
398 'type' => Controls_Manager::SWITCHER,
399 'label_on' => __( 'On', 'auxin-elements' ),
400 'label_off' => __( 'Off', 'auxin-elements' ),
401 'return_value' => 'yes',
402 'default' => 'yes',
403 'condition' => array(
404 'author_or_readmore' => 'author',
405 )
406 )
407 );
408
409 $this->add_control(
410 'display_author_footer',
411 array(
412 'label' => __('Display Author in Footer','auxin-elements' ),
413 'description' => __('Enable it to display author name in footer','auxin-elements' ),
414 'type' => Controls_Manager::SWITCHER,
415 'label_on' => __( 'On', 'auxin-elements' ),
416 'label_off' => __( 'Off', 'auxin-elements' ),
417 'return_value' => 'yes',
418 'default' => 'no',
419 'condition' => array(
420 'author_or_readmore' => 'author',
421 )
422 )
423 );
424
425 $this->end_controls_section();
426
427 /*-----------------------------------------------------------------------------------*/
428 /* query_section
429 /*-----------------------------------------------------------------------------------*/
430
431 $this->start_controls_section(
432 'query_section',
433 array(
434 'label' => __('Query', 'auxin-elements' ),
435 )
436 );
437
438 $this->add_control(
439 'cat',
440 array(
441 'label' => __('Categories', 'auxin-elements'),
442 'description' => __('Specifies a category that you want to show posts from it.', 'auxin-elements' ),
443 'type' => Controls_Manager::SELECT2,
444 'multiple' => true,
445 'options' => $this->get_terms(),
446 'default' => array( ' ' ),
447 )
448 );
449
450 $this->add_control(
451 'num',
452 array(
453 'label' => __('Number of posts to show', 'auxin-elements'),
454 'label_block' => true,
455 'type' => Controls_Manager::NUMBER,
456 'default' => '8',
457 'min' => 1,
458 'step' => 1
459 )
460 );
461
462 $this->add_control(
463 'exclude_without_media',
464 array(
465 'label' => __('Exclude posts without media','auxin-elements' ),
466 'type' => Controls_Manager::SWITCHER,
467 'label_on' => __( 'On', 'auxin-elements' ),
468 'label_off' => __( 'Off', 'auxin-elements' ),
469 'return_value' => 'yes',
470 'default' => 'no'
471 )
472 );
473
474 $this->add_control(
475 'exclude_custom_post_formats',
476 array(
477 'label' => __('Exclude custom post formats','auxin-elements' ),
478 'type' => Controls_Manager::SWITCHER,
479 'label_on' => __( 'On', 'auxin-elements' ),
480 'label_off' => __( 'Off', 'auxin-elements' ),
481 'return_value' => 'yes',
482 'default' => 'no',
483 )
484 );
485
486 $this->add_control(
487 'exclude_quote_link',
488 array(
489 'label' => __('Exclude quote and link post formats','auxin-elements' ),
490 'type' => Controls_Manager::SWITCHER,
491 'label_on' => __( 'On', 'auxin-elements' ),
492 'label_off' => __( 'Off', 'auxin-elements' ),
493 'return_value' => 'yes',
494 'default' => 'no',
495 'condition' => array(
496 'exclude_custom_post_formats' => 'yes',
497 )
498 )
499 );
500
501 $this->add_control(
502 'order_by',
503 array(
504 'label' => __('Order by', 'auxin-elements'),
505 'type' => Controls_Manager::SELECT,
506 'default' => 'date',
507 'options' => array(
508 'date' => __('Date', 'auxin-elements'),
509 'menu_order date' => __('Menu Order', 'auxin-elements'),
510 'title' => __('Title', 'auxin-elements'),
511 'ID' => __('ID', 'auxin-elements'),
512 'rand' => __('Random', 'auxin-elements'),
513 'comment_count' => __('Comments', 'auxin-elements'),
514 'modified' => __('Date Modified', 'auxin-elements'),
515 'author' => __('Author', 'auxin-elements'),
516 'post__in' => __('Inserted Post IDs', 'auxin-elements')
517 ),
518 )
519 );
520
521 $this->add_control(
522 'order',
523 array(
524 'label' => __('Order', 'auxin-elements'),
525 'type' => Controls_Manager::SELECT,
526 'default' => 'DESC',
527 'options' => array(
528 'DESC' => __('Descending', 'auxin-elements'),
529 'ASC' => __('Ascending', 'auxin-elements'),
530 ),
531 )
532 );
533
534 $this->add_control(
535 'only_posts__in',
536 array(
537 'label' => __('Only posts','auxin-elements' ),
538 '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' ),
539 'type' => Controls_Manager::TEXT
540 )
541 );
542
543 $this->add_control(
544 'include',
545 array(
546 'label' => __('Include posts','auxin-elements' ),
547 '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' ),
548 'type' => Controls_Manager::TEXT
549 )
550 );
551
552 $this->add_control(
553 'exclude',
554 array(
555 'label' => __('Exclude posts','auxin-elements' ),
556 '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' ),
557 'type' => Controls_Manager::TEXT
558 )
559 );
560
561 $this->add_control(
562 'offset',
563 array(
564 'label' => __('Start offset','auxin-elements' ),
565 'description' => __('Number of post to displace or pass over.', 'auxin-elements' ),
566 'type' => Controls_Manager::NUMBER
567 )
568 );
569
570 $this->end_controls_section();
571
572 /*-----------------------------------------------------------------------------------*/
573 /* paginate_section
574 /*-----------------------------------------------------------------------------------*/
575
576 $this->start_controls_section(
577 'paginate_section',
578 array(
579 'label' => __('Paginate', 'auxin-elements' ),
580 )
581 );
582
583 $this->add_control(
584 'loadmore_type',
585 array(
586 'label' => __('Load More Type','auxin-elements' ),
587 'type' => 'aux-visual-select',
588 'options' => array(
589 '' => array(
590 'label' => __('None', 'auxin-elements' ),
591 'image' => AUXIN_URL . 'images/visual-select/load-more-none.svg'
592 ),
593 'scroll' => array(
594 'label' => __('Infinite Scroll', 'auxin-elements' ),
595 'image' => AUXIN_URL . 'images/visual-select/load-more-infinite.svg'
596 ),
597 'next' => array(
598 'label' => __('Next Button', 'auxin-elements' ),
599 'image' => AUXIN_URL . 'images/visual-select/load-more-button.svg'
600 ),
601 'next-prev' => array(
602 'label' => __('Next Prev', 'auxin-elements' ),
603 'image' => AUXIN_URL . 'images/visual-select/load-more-next-prev.svg'
604 )
605 ),
606 'default' => ''
607 )
608 );
609
610 $this->end_controls_section();
611
612 /*-----------------------------------------------------------------------------------*/
613 /* image_style_section
614 /*-----------------------------------------------------------------------------------*/
615
616 $this->start_controls_section(
617 'image_style_section',
618 array(
619 'label' => __( 'Image', 'auxin-elements' ),
620 'tab' => Controls_Manager::TAB_STYLE,
621 'condition' => array(
622 'show_media' => 'yes',
623 ),
624 )
625 );
626
627 $this->add_control(
628 'img_border_radius',
629 array(
630 'label' => __( 'Border Radius', 'auxin-elements' ),
631 'type' => Controls_Manager::DIMENSIONS,
632 'size_units' => array( 'px', '%' ),
633 'selectors' => array(
634 '{{WRAPPER}} .entry-media img' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}} !important;',
635 ),
636 'condition' => array(
637 'show_media' => 'yes',
638 ),
639 )
640
641 );
642 $this->start_controls_tabs( 'img_tabs' );
643
644 $this->start_controls_tab(
645 'image_tab_normal',
646 array(
647 'label' => __( 'Normal' , 'auxin-elements' ),
648 'condition' => array(
649 'show_media' => 'yes',
650 ),
651 )
652 );
653
654 $this->add_group_control(
655 Group_Control_Box_Shadow::get_type(),
656 array(
657 'name' => 'img_normal_box_shadow',
658 'selector' => '{{WRAPPER}} .aux-media-image',
659 'condition' => array(
660 'show_media' => 'yes',
661 ),
662 )
663 );
664
665 $this->end_controls_tab();
666
667 $this->start_controls_tab(
668 'image_tab_hover',
669 array(
670 'label' => __( 'Hover' , 'auxin-elements' ),
671 'condition' => array(
672 'show_media' => 'yes',
673 ),
674 )
675 );
676
677 $this->add_group_control(
678 Group_Control_Box_Shadow::get_type(),
679 array(
680 'name' => 'img_hover_box_shadow',
681 'selector' => '{{WRAPPER}} .post:hover .aux-media-image',
682 'condition' => array(
683 'show_media' => 'yes',
684 ),
685 )
686 );
687
688 $this->end_controls_tab();
689
690 $this->end_controls_tabs();
691
692 $this->end_controls_section();
693
694 /*-----------------------------------------------------------------------------------*/
695 /* title_style_section
696 /*-----------------------------------------------------------------------------------*/
697
698 $this->start_controls_section(
699 'title_style_section',
700 array(
701 'label' => __( 'Title', 'auxin-elements' ),
702 'tab' => Controls_Manager::TAB_STYLE,
703 'condition' => array(
704 'display_title' => 'yes',
705 ),
706 )
707 );
708
709 $this->start_controls_tabs( 'title_colors' );
710
711 $this->start_controls_tab(
712 'title_color_normal',
713 array(
714 'label' => __( 'Normal' , 'auxin-elements' ),
715 'condition' => array(
716 'display_title' => 'yes',
717 ),
718 )
719 );
720
721 $this->add_control(
722 'title_color',
723 array(
724 'label' => __( 'Color', 'auxin-elements' ),
725 'type' => Controls_Manager::COLOR,
726 'selectors' => array(
727 '{{WRAPPER}} .entry-title a' => 'color: {{VALUE}};',
728 ),
729 'condition' => array(
730 'display_title' => 'yes',
731 ),
732 )
733 );
734
735 $this->end_controls_tab();
736
737 $this->start_controls_tab(
738 'title_color_hover',
739 array(
740 'label' => __( 'Hover' , 'auxin-elements' ),
741 'condition' => array(
742 'display_title' => 'yes',
743 ),
744 )
745 );
746
747 $this->add_control(
748 'title_hover_color',
749 array(
750 'label' => __( 'Color', 'auxin-elements' ),
751 'type' => Controls_Manager::COLOR,
752 'selectors' => array(
753 '{{WRAPPER}} .entry-title a:hover' => 'color: {{VALUE}};',
754 ),
755 'condition' => array(
756 'display_title' => 'yes',
757 ),
758 )
759 );
760
761 $this->end_controls_tab();
762
763 $this->end_controls_tabs();
764
765 $this->add_group_control(
766 Group_Control_Typography::get_type(),
767 array(
768 'name' => 'title_typography',
769 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
770 'selector' => '{{WRAPPER}} .entry-title',
771 'condition' => array(
772 'display_title' => 'yes',
773 ),
774 )
775 );
776
777 $this->add_responsive_control(
778 'title_margin_bottom',
779 array(
780 'label' => __( 'Bottom space', 'auxin-elements' ),
781 'type' => Controls_Manager::SLIDER,
782 'range' => array(
783 'px' => array(
784 'max' => 100,
785 ),
786 ),
787 'selectors' => array(
788 '{{WRAPPER}} .entry-title' => 'margin-bottom: {{SIZE}}{{UNIT}};',
789 ),
790 'condition' => array(
791 'display_title' => 'yes',
792 ),
793 )
794 );
795
796 $this->end_controls_section();
797
798 /*-----------------------------------------------------------------------------------*/
799 /* info_style_section
800 /*-----------------------------------------------------------------------------------*/
801
802 $this->start_controls_section(
803 'info_style_section',
804 array(
805 'label' => __( 'Post Info', 'auxin-elements' ),
806 'tab' => Controls_Manager::TAB_STYLE,
807 'condition' => array(
808 'show_info' => 'yes',
809 ),
810 )
811 );
812
813 $this->start_controls_tabs( 'info_colors' );
814
815 $this->start_controls_tab(
816 'info_color_normal',
817 array(
818 'label' => __( 'Normal' , 'auxin-elements' ),
819 'condition' => array(
820 'show_info' => 'yes',
821 ),
822 )
823 );
824
825 $this->add_control(
826 'info_color',
827 array(
828 'label' => __( 'Color', 'auxin-elements' ),
829 'type' => Controls_Manager::COLOR,
830 'selectors' => array(
831 '{{WRAPPER}} .entry-info a, {{WRAPPER}} .entry-info' => 'color: {{VALUE}};',
832 ),
833 'condition' => array(
834 'show_info' => 'yes',
835 ),
836 )
837 );
838
839 $this->end_controls_tab();
840
841 $this->start_controls_tab(
842 'info_color_hover',
843 array(
844 'label' => __( 'Hover' , 'auxin-elements' ),
845 'condition' => array(
846 'show_info' => 'yes',
847 ),
848 )
849 );
850
851 $this->add_control(
852 'info_hover_color',
853 array(
854 'label' => __( 'Color', 'auxin-elements' ),
855 'type' => Controls_Manager::COLOR,
856 'selectors' => array(
857 '{{WRAPPER}} .entry-info a:hover' => 'color: {{VALUE}};',
858 ),
859 'condition' => array(
860 'show_info' => 'yes',
861 ),
862 )
863 );
864
865 $this->end_controls_tab();
866
867 $this->end_controls_tabs();
868
869 $this->add_group_control(
870 Group_Control_Typography::get_type(),
871 array(
872 'name' => 'info_typography',
873 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
874 'selector' => '{{WRAPPER}} .entry-info, {{WRAPPER}} .entry-info a',
875 'condition' => array(
876 'show_info' => 'yes',
877 ),
878 )
879 );
880
881 $this->add_responsive_control(
882 'info_margin_bottom',
883 array(
884 'label' => __( 'Bottom space', 'auxin-elements' ),
885 'type' => Controls_Manager::SLIDER,
886 'range' => array(
887 'px' => array(
888 'max' => 100
889 )
890 ),
891 'selectors' => array(
892 '{{WRAPPER}} .entry-info' => 'margin-bottom: {{SIZE}}{{UNIT}};'
893 ),
894 'condition' => array(
895 'show_info' => 'yes'
896 )
897 )
898 );
899
900 $this->add_responsive_control(
901 'info_spacing_between',
902 array(
903 'label' => __( 'Space between metas', 'auxin-elements' ),
904 'type' => Controls_Manager::SLIDER,
905 'range' => array(
906 'px' => array(
907 'max' => 30
908 )
909 ),
910 'selectors' => array(
911 '{{WRAPPER}} .entry-info [class^="entry-"] + [class^="entry-"]:before, {{WRAPPER}} .entry-info .entry-tax a:after' =>
912 'margin-right: {{SIZE}}{{UNIT}}; margin-left: {{SIZE}}{{UNIT}};'
913 ),
914 'condition' => array(
915 'show_info' => 'yes'
916 )
917 )
918 );
919
920 $this->end_controls_section();
921
922 /*-----------------------------------------------------------------------------------*/
923 /* content_style_section
924 /*-----------------------------------------------------------------------------------*/
925
926 $this->start_controls_section(
927 'content_style_section',
928 array(
929 'label' => __( 'Excerpt', 'auxin-elements' ),
930 'tab' => Controls_Manager::TAB_STYLE,
931 'condition' => array(
932 'show_excerpt' => 'yes',
933 )
934 )
935 );
936
937 $this->add_control(
938 'content_color',
939 array(
940 'label' => __( 'Color', 'auxin-elements' ),
941 'type' => Controls_Manager::COLOR,
942 'selectors' => array(
943 '{{WRAPPER}} .entry-content' => 'color: {{VALUE}};',
944 ),
945 'condition' => array(
946 'show_excerpt' => 'yes',
947 ),
948 )
949 );
950
951 $this->add_group_control(
952 Group_Control_Typography::get_type(),
953 array(
954 'name' => 'content_typography',
955 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
956 'selector' => '{{WRAPPER}} .entry-content',
957 'condition' => array(
958 'show_excerpt' => 'yes',
959 ),
960 )
961 );
962
963 $this->add_responsive_control(
964 'content_margin_bottom',
965 array(
966 'label' => __( 'Bottom space', 'auxin-elements' ),
967 'type' => Controls_Manager::SLIDER,
968 'range' => array(
969 'px' => array(
970 'max' => 100,
971 ),
972 ),
973 'selectors' => array(
974 '{{WRAPPER}} .entry-content' => 'margin-bottom: {{SIZE}}{{UNIT}};',
975 ),
976 'condition' => array(
977 'show_excerpt' => 'yes',
978 ),
979 )
980 );
981
982 $this->end_controls_section();
983
984 /*-----------------------------------------------------------------------------------*/
985 /* meta_style_section
986 /*-----------------------------------------------------------------------------------*/
987
988 $this->start_controls_section(
989 'meta_style_section',
990 array(
991 'label' => __( 'Meta', 'auxin-elements' ),
992 'tab' => Controls_Manager::TAB_STYLE
993 )
994 );
995
996 $this->start_controls_tabs( 'meta_colors' );
997
998 $this->start_controls_tab(
999 'meta_color_normal',
1000 array(
1001 'label' => __( 'Normal' , 'auxin-elements' ),
1002 )
1003 );
1004
1005 $this->add_control(
1006 'meta_color',
1007 array(
1008 'label' => __( 'Color', 'auxin-elements' ),
1009 'type' => Controls_Manager::COLOR,
1010 'selectors' => array(
1011 '{{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta span' => 'color: {{VALUE}};',
1012 )
1013 )
1014 );
1015
1016 $this->end_controls_tab();
1017
1018 $this->start_controls_tab(
1019 'meta_color_hover',
1020 array(
1021 'label' => __( 'Hover' , 'auxin-elements' )
1022 )
1023 );
1024
1025 $this->add_control(
1026 'meta_hover_color',
1027 array(
1028 'label' => __( 'Color', 'auxin-elements' ),
1029 'type' => Controls_Manager::COLOR,
1030 'selectors' => array(
1031 '{{WRAPPER}} .entry-meta a:hover, {{WRAPPER}} .entry-meta span:hover' => 'color: {{VALUE}};',
1032 )
1033 )
1034 );
1035
1036 $this->end_controls_tab();
1037
1038 $this->end_controls_tabs();
1039
1040 $this->add_group_control(
1041 Group_Control_Typography::get_type(),
1042 array(
1043 'name' => 'meta_typography',
1044 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1045 'selector' => '{{WRAPPER}} .entry-meta, {{WRAPPER}} .entry-meta a, {{WRAPPER}} .entry-meta span'
1046 )
1047 );
1048
1049 $this->add_responsive_control(
1050 'meta_margin_bottom',
1051 array(
1052 'label' => __( 'Bottom space', 'auxin-elements' ),
1053 'type' => Controls_Manager::SLIDER,
1054 'range' => array(
1055 'px' => array(
1056 'max' => 100,
1057 ),
1058 ),
1059 'selectors' => array(
1060 '{{WRAPPER}} .entry-meta' => 'margin-bottom: {{SIZE}}{{UNIT}};',
1061 )
1062 )
1063 );
1064
1065 $this->end_controls_section();
1066
1067 /* wrapper_style_section
1068 /*-------------------------------------*/
1069
1070 $this->start_controls_section(
1071 'wrapper_style_section',
1072 array(
1073 'label' => __( 'Wrapper', 'auxin-elements' ),
1074 'tab' => Controls_Manager::TAB_STYLE
1075 )
1076 );
1077
1078 $this->start_controls_tabs( 'button_background' );
1079
1080 $this->start_controls_tab(
1081 'button_bg_normal',
1082 array(
1083 'label' => __( 'Normal' , 'auxin-elements' )
1084 )
1085 );
1086
1087 $this->add_group_control(
1088 Group_Control_Background::get_type(),
1089 array(
1090 'name' => 'background',
1091 'label' => __( 'Background', 'auxin-elements' ),
1092 'types' => array( 'classic', 'gradient' ),
1093 'selector' => '{{WRAPPER}} .aux-col .column-entry',
1094 )
1095 );
1096
1097 $this->add_group_control(
1098 Group_Control_Box_Shadow::get_type(),
1099 array(
1100 'name' => 'box_shadow',
1101 'selector' => '{{WRAPPER}} .aux-col .column-entry'
1102 )
1103 );
1104
1105 $this->end_controls_tab();
1106
1107 $this->start_controls_tab(
1108 'button_bg_hover',
1109 array(
1110 'label' => __( 'Hover' , 'auxin-elements' )
1111 )
1112 );
1113
1114 $this->add_control(
1115 'general_hover_text_color',
1116 array(
1117 'label' => __( 'Text Color', 'auxin-elements' ),
1118 'type' => Controls_Manager::COLOR,
1119 'selectors' => array(
1120 '{{WRAPPER}} .aux-col:hover .entry-main a, {{WRAPPER}} .aux-col:hover .entry-main *' => 'transition:all 150ms ease; color:{{VALUE}};'
1121 )
1122 )
1123 );
1124
1125 $this->add_group_control(
1126 Group_Control_Background::get_type(),
1127 array(
1128 'name' => 'hover_background',
1129 'label' => __( 'Background', 'auxin-elements' ),
1130 'types' => array( 'classic', 'gradient' ),
1131 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry',
1132 )
1133 );
1134
1135 $this->add_group_control(
1136 Group_Control_Box_Shadow::get_type(),
1137 array(
1138 'name' => 'hover_box_shadow',
1139 'selector' => '{{WRAPPER}} .aux-col:hover .column-entry'
1140 )
1141 );
1142
1143 $this->end_controls_tab();
1144
1145 $this->end_controls_tabs();
1146
1147 $this->add_responsive_control(
1148 'align',
1149 array(
1150 'label' => __('Align','auxin-elements'),
1151 'type' => Controls_Manager::CHOOSE,
1152 'devices' => array( 'desktop', 'mobile' ),
1153 'options' => array(
1154 'left' => array(
1155 'title' => __( 'Left', 'auxin-elements' ),
1156 'icon' => 'fa fa-align-left',
1157 ),
1158 'center' => array(
1159 'title' => __( 'Center', 'auxin-elements' ),
1160 'icon' => 'fa fa-align-center',
1161 ),
1162 'right' => array(
1163 'title' => __( 'Right', 'auxin-elements' ),
1164 'icon' => 'fa fa-align-right',
1165 ),
1166 ),
1167 'default' => 'left',
1168 'toggle' => true,
1169 'selectors' => array(
1170 '{{WRAPPER}}' => 'text-align: {{VALUE}}',
1171 )
1172 )
1173 );
1174
1175 $this->add_responsive_control(
1176 'wrapper_main_padding',
1177 array(
1178 'label' => __( 'Padding for main wrapper', 'auxin-elements' ),
1179 'type' => Controls_Manager::DIMENSIONS,
1180 'size_units' => array( 'px', '%' ),
1181 'selectors' => array(
1182 '{{WRAPPER}} .column-entry' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1183 )
1184 )
1185 );
1186
1187 $this->add_responsive_control(
1188 'wrapper_content_padding',
1189 array(
1190 'label' => __( 'Padding for content wrapper', 'auxin-elements' ),
1191 'type' => Controls_Manager::DIMENSIONS,
1192 'size_units' => array( 'px', '%' ),
1193 'selectors' => array(
1194 '{{WRAPPER}} .type-post .entry-main' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1195 )
1196 )
1197 );
1198
1199 $this->end_controls_section();
1200
1201 /*-----------------------------------------------------------------------------------*/
1202 /* ReadMore Button
1203 /*-----------------------------------------------------------------------------------*/
1204
1205 $this->start_controls_section(
1206 'btn_section',
1207 array(
1208 'label' => __('Read More', 'auxin-elements' ),
1209 'tab' => Controls_Manager::TAB_STYLE,
1210 )
1211 );
1212
1213 $this->start_controls_tabs( 'btn_bg_tab' );
1214
1215 $this->start_controls_tab(
1216 'btn_bg_normal',
1217 array(
1218 'label' => __( 'Normal' , 'auxin-elements' )
1219 )
1220 );
1221
1222 $this->add_group_control(
1223 Group_Control_Background::get_type(),
1224 array(
1225 'name' => 'btn',
1226 'label' => __( 'Background', 'auxin-elements' ),
1227 'types' => array( 'classic', 'gradient' ),
1228 'selector' => '{{WRAPPER}} .aux-read-more',
1229 )
1230 );
1231
1232 $this->add_group_control(
1233 Group_Control_Box_Shadow::get_type(),
1234 array(
1235 'name' => 'btn_shadow',
1236 'selector' => '{{WRAPPER}} .aux-read-more'
1237 )
1238 );
1239
1240 $this->add_control(
1241 'btn_text_color',
1242 array(
1243 'label' => __( 'Color', 'auxin-elements' ),
1244 'type' => Controls_Manager::COLOR,
1245 'selectors' => array(
1246 '{{WRAPPER}} .aux-read-more' => 'color: {{VALUE}};',
1247 )
1248 )
1249 );
1250
1251 $this->add_group_control(
1252 Group_Control_Text_Shadow::get_type(),
1253 array(
1254 'name' => 'btn_text_shadow',
1255 'label' => __( 'Text Shadow', 'auxin-elements' ),
1256 'selector' => '{{WRAPPER}} .aux-read-more',
1257 )
1258 );
1259
1260 $this->add_group_control(
1261 Group_Control_Typography::get_type(),
1262 array(
1263 'name' => 'btn_text_typography',
1264 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1265 'selector' => '{{WRAPPER}} .aux-read-more'
1266 )
1267 );
1268
1269 $this->end_controls_tab();
1270
1271 $this->start_controls_tab(
1272 'btn_bg_hover',
1273 array(
1274 'label' => __( 'Hover' , 'auxin-elements' )
1275 )
1276 );
1277
1278 $this->add_group_control(
1279 Group_Control_Background::get_type(),
1280 array(
1281 'name' => 'btn_bg_hover',
1282 'label' => __( 'Background', 'auxin-elements' ),
1283 'types' => array( 'classic', 'gradient' ),
1284 'selector' => '{{WRAPPER}} .aux-read-more:hover',
1285 )
1286 );
1287
1288 $this->add_group_control(
1289 Group_Control_Box_Shadow::get_type(),
1290 array(
1291 'name' => 'btn_shadow_hover',
1292 'selector' => '{{WRAPPER}} .aux-read-more:hover'
1293 )
1294 );
1295
1296 $this->add_control(
1297 'btn_text_color_hover',
1298 array(
1299 'label' => __( 'Color', 'auxin-elements' ),
1300 'type' => Controls_Manager::COLOR,
1301 'selectors' => array(
1302 '{{WRAPPER}} .aux-read-more' => 'color: {{VALUE}};',
1303 )
1304 )
1305 );
1306
1307 $this->add_group_control(
1308 Group_Control_Text_Shadow::get_type(),
1309 array(
1310 'name' => 'btn_text_shadow_hover',
1311 'label' => __( 'Text Shadow', 'auxin-elements' ),
1312 'selector' => '{{WRAPPER}} .aux-read-more',
1313 )
1314 );
1315
1316 $this->add_group_control(
1317 Group_Control_Typography::get_type(),
1318 array(
1319 'name' => 'btn_text_typography_hover',
1320 'scheme' => Scheme_Typography::TYPOGRAPHY_1,
1321 'selector' => '{{WRAPPER}} .aux-read-more'
1322 )
1323 );
1324
1325 $this->end_controls_tab();
1326
1327 $this->end_controls_tabs();
1328
1329 $this->add_responsive_control(
1330 'btn_padding',
1331 array(
1332 'label' => __( 'Button Padding', 'auxin-elements' ),
1333 'type' => Controls_Manager::DIMENSIONS,
1334 'size_units' => array( 'px', '%' ),
1335 'selectors' => array(
1336 '{{WRAPPER}} .aux-read-more' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
1337 ),
1338 )
1339 );
1340
1341 $this->end_controls_section();
1342
1343 }
1344
1345 /**
1346 * Render image box widget output on the frontend.
1347 *
1348 * Written in PHP and used to generate the final HTML.
1349 *
1350 * @since 1.0.0
1351 * @access protected
1352 */
1353 protected function render() {
1354
1355 $settings = $this->get_settings_for_display();
1356
1357 $args = array(
1358 // Display Section
1359 'show_media' => $settings['show_media'],
1360 'crop' => $settings['crop'],
1361 'preloadable' => $settings['preloadable'],
1362 'preload_preview' => $settings['preload_preview'],
1363 'preload_bgcolor' => $settings['preload_bgcolor'],
1364 'display_title' => $settings['display_title'],
1365 'show_info' => $settings['show_info'],
1366 'post_info_position' => $settings['post_info_position'],
1367 'display_like' => $settings['display_like'],
1368 'show_content' => $settings['show_content'],
1369 'display_categories' => $settings['display_categories'],
1370 'show_date' => $settings['show_date'],
1371 'show_excerpt' => $settings['show_excerpt'],
1372 'excerpt_len' => $settings['excerpt_len'],
1373 'author_or_readmore' => $settings['author_or_readmore'],
1374 'display_author_header' => $settings['display_author_header'],
1375 'display_author_footer' => $settings['display_author_footer'],
1376 'display_comments' => $settings['display_comments'],
1377 'content_layout' => $settings['content_layout'],
1378
1379 // Layout Section
1380 'desktop_cnum' => $settings['columns'],
1381 'tablet_cnum' => $settings['columns_tablet'],
1382 'phone_cnum' => $settings['columns_mobile'],
1383
1384 // Query Section
1385 'cat' => $settings['cat'],
1386 'num' => $settings['num'],
1387 'exclude_without_media' => $settings['exclude_without_media'],
1388 'exclude_custom_post_formats' => $settings['exclude_custom_post_formats'],
1389 'exclude_quote_link' => $settings['exclude_quote_link'],
1390 'order_by' => $settings['order_by'],
1391 'order' => $settings['order'],
1392 'only_posts__in' => $settings['only_posts__in'],
1393 'include' => $settings['include'],
1394 'exclude' => $settings['exclude'],
1395 'offset' => $settings['offset'],
1396
1397 // Loadmore Section
1398 'loadmore_type' => $settings['loadmore_type']
1399 );
1400
1401 // get the shortcode base blog page
1402 echo auxin_widget_recent_posts_masonry_callback( $args );
1403 }
1404
1405 }
1406