PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.1.13
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.1.13
4.5.6 4.5.5 4.5.4 4.2.1 4.2.2 4.2.3 4.5.0 4.5.2 4.5.3 4.2.0 4.1.18 4.1.17 4.1.16 4.1.15 4.1.14 4.1.13 4.1.12 4.1.11 4.1.10 4.1.9 4.1.8 4.0.9 4.1.0 4.1.1 4.1.2 All 148 releases
ultimate-post-kit / modules / fanel-list / widgets / fanel-list.php

fanel-list.php in Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets 4.1.13, at modules/fanel-list/widgets/fanel-list.php

1,386 lines 38.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace UltimatePostKit\Modules\FanelList\Widgets;
4
5 use Elementor\Controls_Manager;
6 use Elementor\Group_Control_Border;
7 use Elementor\Group_Control_Box_Shadow;
8 use Elementor\Group_Control_Typography;
9 use Elementor\Group_Control_Text_Shadow;
10 use Elementor\Group_Control_Image_Size;
11 use Elementor\Group_Control_Background;
12 use UltimatePostKit\Utils;
13
14 use UltimatePostKit\Traits\Global_Widget_Controls;
15 use UltimatePostKit\Traits\Global_Widget_Functions;
16 use UltimatePostKit\Includes\Controls\GroupQuery\Group_Control_Query;
17 use WP_Query;
18
19 if (!defined('ABSPATH')) {
20 exit;
21 } // Exit if accessed directly
22
23 class Fanel_List extends Group_Control_Query {
24
25 use Global_Widget_Controls;
26 use Global_Widget_Functions;
27
28 private $_query = null;
29
30 public function get_name() {
31 return 'upk-fanel-list';
32 }
33
34 public function get_title() {
35 return BDTUPK . esc_html__('Fanel List', 'ultimate-post-kit');
36 }
37
38 public function get_icon() {
39 return 'upk-widget-icon upk-icon-fanel-list';
40 }
41
42 public function get_categories() {
43 return ['ultimate-post-kit'];
44 }
45
46 public function get_keywords() {
47 return ['post', 'grid', 'blog', 'recent', 'news', 'fanel', 'list'];
48 }
49
50 public function get_style_depends() {
51 if ($this->upk_is_edit_mode()) {
52 return ['upk-all-styles'];
53 } else {
54 return ['upk-font', 'upk-fanel-list'];
55 }
56 }
57
58 public function get_script_depends() {
59 if ($this->upk_is_edit_mode()) {
60 return ['upk-all-scripts'];
61 } else {
62 return ['upk-ajax-loadmore'];
63 }
64 }
65
66 public function get_custom_help_url() {
67 return 'https://youtu.be/nGAoLOoNYk4';
68 }
69
70 public function get_query() {
71 return $this->_query;
72 }
73
74 public function has_widget_inner_wrapper(): bool {
75 return ! \Elementor\Plugin::$instance->experiments->is_feature_active( 'e_optimized_markup' );
76 }
77
78
79 protected function register_controls() {
80 $this->start_controls_section(
81 'section_content_layout',
82 [
83 'label' => esc_html__('Layout', 'ultimate-post-kit'),
84 ]
85 );
86
87 $this->add_responsive_control(
88 'columns',
89 [
90 'label' => __('Columns', 'ultimate-post-kit'),
91 'type' => Controls_Manager::SELECT,
92 'default' => '2',
93 'tablet_default' => '1',
94 'mobile_default' => '1',
95 'options' => [
96 '1' => '1',
97 '2' => '2',
98 ],
99 'selectors' => [
100 '{{WRAPPER}} .upk-fanel-list' => 'grid-template-columns: repeat({{SIZE}}, 1fr);',
101 ],
102 ]
103 );
104
105 $this->add_responsive_control(
106 'row_gap',
107 [
108 'label' => esc_html__('Row Gap', 'ultimate-post-kit'),
109 'type' => Controls_Manager::SLIDER,
110 'default' => [
111 'size' => 20,
112 ],
113 'selectors' => [
114 '{{WRAPPER}} .upk-fanel-list' => 'grid-row-gap: {{SIZE}}{{UNIT}};',
115 ],
116 ]
117 );
118
119 $this->add_responsive_control(
120 'column_gap',
121 [
122 'label' => esc_html__('Column Gap', 'ultimate-post-kit'),
123 'type' => Controls_Manager::SLIDER,
124 'default' => [
125 'size' => 20,
126 ],
127 'selectors' => [
128 '{{WRAPPER}} .upk-fanel-list' => 'grid-column-gap: {{SIZE}}{{UNIT}};',
129 ],
130 ]
131 );
132
133 $this->add_group_control(
134 Group_Control_Image_Size::get_type(),
135 [
136 'name' => 'primary_thumbnail',
137 'exclude' => ['custom'],
138 'default' => 'medium',
139 ]
140 );
141
142 $this->end_controls_section();
143
144 // Query Settings
145 $this->start_controls_section(
146 'section_post_query_builder',
147 [
148 'label' => __('Query', 'ultimate-post-kit'),
149 'tab' => Controls_Manager::TAB_CONTENT,
150 ]
151 );
152
153 $this->add_control(
154 'item_limit',
155 [
156 'label' => esc_html__('Item Limit', 'ultimate-post-kit'),
157 'type' => Controls_Manager::SLIDER,
158 'range' => [
159 'px' => [
160 'min' => 1,
161 'max' => 20,
162 ],
163 ],
164 'default' => [
165 'size' => 6,
166 ],
167 'condition' => [
168 'posts_source!' => 'current_query',
169 ]
170 ]
171 );
172
173 $this->register_query_builder_controls();
174
175 $this->end_controls_section();
176
177 $this->start_controls_section(
178 'section_content_additional',
179 [
180 'label' => esc_html__('Additional Options', 'ultimate-post-kit'),
181 ]
182 );
183
184 //Global Title Controls
185 $this->register_title_controls();
186
187 $this->add_control(
188 'show_category',
189 [
190 'label' => esc_html__('Show Category', 'ultimate-post-kit'),
191 'type' => Controls_Manager::SWITCHER,
192 'default' => 'yes',
193 ]
194 );
195
196 $this->add_control(
197 'show_date',
198 [
199 'label' => esc_html__('Show Date', 'ultimate-post-kit'),
200 'type' => Controls_Manager::SWITCHER,
201 'default' => 'yes',
202 ]
203 );
204
205 $this->add_control(
206 'show_readmore',
207 [
208 'label' => esc_html__('Show Readmore', 'ultimate-post-kit'),
209 'type' => Controls_Manager::SWITCHER,
210 ]
211 );
212
213 $this->register_text_controls();
214
215 $this->add_control(
216 'show_author',
217 [
218 'label' => esc_html__('Show Author', 'ultimate-post-kit'),
219 'type' => Controls_Manager::SWITCHER,
220 'separator' => 'before'
221 ]
222 );
223
224 $this->add_control(
225 'show_comments',
226 [
227 'label' => esc_html__('Show Comments', 'ultimate-post-kit'),
228 'type' => Controls_Manager::SWITCHER,
229 ]
230 );
231
232 $this->add_control(
233 'meta_separator',
234 [
235 'label' => __('Separator', 'ultimate-post-kit'),
236 'type' => Controls_Manager::TEXT,
237 'default' => '//',
238 'label_block' => false,
239 ]
240 );
241
242 //Global Reading Time Controls
243 $this->register_reading_time_controls();
244
245 $this->add_control(
246 'show_pagination',
247 [
248 'label' => esc_html__('Show Pagination', 'ultimate-post-kit'),
249 'type' => Controls_Manager::SWITCHER,
250 'separator' => 'before'
251 ]
252 );
253
254 //Global Ajax Controls
255 $this->register_ajax_loadmore_controls();
256
257 $this->add_control(
258 'global_link',
259 [
260 'label' => __('Item Wrapper Link', 'ultimate-post-kit'),
261 'type' => Controls_Manager::SWITCHER,
262 'prefix_class' => 'upk-global-link-',
263 'description' => __('Be aware! When Item Wrapper Link activated then title link and read more link will not work', 'ultimate-post-kit'),
264 ]
265 );
266
267 $this->end_controls_section();
268
269 $this->start_controls_section(
270 'upk_section_style',
271 [
272 'label' => esc_html__('Items', 'ultimate-post-kit'),
273 'tab' => Controls_Manager::TAB_STYLE,
274 ]
275 );
276
277 $this->add_responsive_control(
278 'content_padding',
279 [
280 'label' => __('Content Padding', 'ultimate-post-kit'),
281 'type' => Controls_Manager::DIMENSIONS,
282 'size_units' => ['px', 'em', '%'],
283 'selectors' => [
284 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-content' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
285 ],
286 ]
287 );
288
289 $this->start_controls_tabs('tabs_item_style');
290
291 $this->start_controls_tab(
292 'tab_item_normal',
293 [
294 'label' => esc_html__('Normal', 'ultimate-post-kit'),
295 ]
296 );
297
298 $this->add_group_control(
299 Group_Control_Background::get_type(),
300 [
301 'name' => 'item_background',
302 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item',
303 ]
304 );
305
306 $this->add_group_control(
307 Group_Control_Border::get_type(),
308 [
309 'name' => 'item_border',
310 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item',
311 ]
312 );
313
314 $this->add_responsive_control(
315 'item_border_radius',
316 [
317 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
318 'type' => Controls_Manager::DIMENSIONS,
319 'size_units' => ['px', '%'],
320 'selectors' => [
321 '{{WRAPPER}} .upk-fanel-list .upk-item' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
322 ],
323 ]
324 );
325
326 $this->add_responsive_control(
327 'item_padding',
328 [
329 'label' => __('Padding', 'ultimate-post-kit'),
330 'type' => Controls_Manager::DIMENSIONS,
331 'size_units' => ['px', 'em', '%'],
332 'selectors' => [
333 '{{WRAPPER}} .upk-fanel-list .upk-item' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
334 ],
335 ]
336 );
337
338 $this->add_group_control(
339 Group_Control_Box_Shadow::get_type(),
340 [
341 'name' => 'item_box_shadow',
342 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item',
343 ]
344 );
345
346 $this->end_controls_tab();
347
348 $this->start_controls_tab(
349 'tab_item_hover',
350 [
351 'label' => esc_html__('Hover', 'ultimate-post-kit'),
352 ]
353 );
354
355 $this->add_group_control(
356 Group_Control_Background::get_type(),
357 [
358 'name' => 'item_hover_background',
359 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item:hover',
360 ]
361 );
362
363 $this->add_control(
364 'item_hover_border_color',
365 [
366 'label' => esc_html__('Border Color', 'ultimate-post-kit'),
367 'type' => Controls_Manager::COLOR,
368 'condition' => [
369 'item_border_border!' => '',
370 ],
371 'selectors' => [
372 '{{WRAPPER}} .upk-fanel-list .upk-item:hover' => 'border-color: {{VALUE}};',
373 ],
374 ]
375 );
376
377 $this->add_group_control(
378 Group_Control_Box_Shadow::get_type(),
379 [
380 'name' => 'item_hover_box_shadow',
381 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item:hover',
382 ]
383 );
384
385 $this->end_controls_tab();
386
387 $this->end_controls_tabs();
388
389 $this->end_controls_section();
390
391 $this->start_controls_section(
392 'section_style_image',
393 [
394 'label' => esc_html__('Image', 'ultimate-post-kit'),
395 'tab' => Controls_Manager::TAB_STYLE,
396 ]
397 );
398
399 $this->add_group_control(
400 Group_Control_Border::get_type(),
401 [
402 'name' => 'item_image_border',
403 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-image-wrap',
404 ]
405 );
406
407 $this->add_responsive_control(
408 'item_image_border_radius',
409 [
410 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
411 'type' => Controls_Manager::DIMENSIONS,
412 'size_units' => ['px', '%'],
413 'selectors' => [
414 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-image-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
415 ],
416 ]
417 );
418
419 // $this->add_responsive_control(
420 // 'item_image_size',
421 // [
422 // 'label' => esc_html__( 'Size(px)', 'ultimate-post-kit' ),
423 // 'type' => Controls_Manager::SLIDER,
424 // 'range' => [
425 // 'px' => [
426 // 'min' => 100,
427 // 'max' => 500,
428 // ],
429 // ],
430 // 'selectors' => [
431 // '{{WRAPPER}} .upk-fanel-list .upk-item .upk-item-box .upk-fanel-list-image' => 'max-width: {{SIZE}}{{UNIT}}; min-width: {{SIZE}}{{UNIT}};',
432 // ],
433 // ]
434 // );
435
436 $this->end_controls_section();
437
438 $this->start_controls_section(
439 'section_style_title',
440 [
441 'label' => esc_html__('Title', 'ultimate-post-kit'),
442 'tab' => Controls_Manager::TAB_STYLE,
443 'condition' => [
444 'show_title' => 'yes',
445 ],
446 ]
447 );
448
449 $this->add_control(
450 'title_style',
451 [
452 'label' => esc_html__('Style', 'ultimate-post-kit'),
453 'type' => Controls_Manager::SELECT,
454 'default' => 'underline',
455 'options' => [
456 'underline' => esc_html__('Underline', 'ultimate-post-kit'),
457 'middle-underline' => esc_html__('Middle Underline', 'ultimate-post-kit'),
458 'overline' => esc_html__('Overline', 'ultimate-post-kit'),
459 'middle-overline' => esc_html__('Middle Overline', 'ultimate-post-kit'),
460 ],
461 ]
462 );
463
464 $this->add_control(
465 'title_color',
466 [
467 'label' => esc_html__('Color', 'ultimate-post-kit'),
468 'type' => Controls_Manager::COLOR,
469 'selectors' => [
470 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-title a' => 'color: {{VALUE}};',
471 ],
472 ]
473 );
474
475 $this->add_control(
476 'title_hover_color',
477 [
478 'label' => esc_html__('Hover Color', 'ultimate-post-kit'),
479 'type' => Controls_Manager::COLOR,
480 'selectors' => [
481 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-title a:hover' => 'color: {{VALUE}};',
482 ],
483 ]
484 );
485
486 $this->add_group_control(
487 Group_Control_Typography::get_type(),
488 [
489 'name' => 'title_typography',
490 'label' => esc_html__('Typography', 'ultimate-post-kit'),
491 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-title',
492 ]
493 );
494
495 $this->add_group_control(
496 Group_Control_Text_Shadow::get_type(),
497 [
498 'name' => 'title_text_shadow',
499 'label' => __('Text Shadow', 'ultimate-post-kit'),
500 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-title',
501 ]
502 );
503
504 $this->end_controls_section();
505
506 $this->start_controls_section(
507 'section_style_text',
508 [
509 'label' => esc_html__('Text', 'ultimate-post-kit'),
510 'tab' => Controls_Manager::TAB_STYLE,
511 'condition' => [
512 'show_excerpt' => 'yes',
513 ],
514 ]
515 );
516
517 $this->add_control(
518 'text_color',
519 [
520 'label' => esc_html__('Color', 'ultimate-post-kit'),
521 'type' => Controls_Manager::COLOR,
522 'selectors' => [
523 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-text' => 'color: {{VALUE}};',
524 ],
525 ]
526 );
527
528 $this->add_group_control(
529 Group_Control_Typography::get_type(),
530 [
531 'name' => 'text_typography',
532 'label' => esc_html__('Typography', 'ultimate-post-kit'),
533 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-text',
534 ]
535 );
536
537 $this->add_responsive_control(
538 'text_margin',
539 [
540 'label' => __('Margin', 'ultimate-post-kit'),
541 'type' => Controls_Manager::DIMENSIONS,
542 'size_units' => ['px', 'em', '%'],
543 'selectors' => [
544 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-text' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
545 ]
546 ]
547 );
548
549 $this->add_responsive_control(
550 'text_spacing',
551 [
552 'label' => esc_html__('Spacing', 'ultimate-post-kit'),
553 'type' => Controls_Manager::SLIDER,
554 'range' => [
555 'px' => [
556 'min' => 0,
557 'max' => 50,
558 ],
559 ],
560 'selectors' => [
561 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-text' => 'padding-top: {{SIZE}}{{UNIT}};',
562 ],
563 ]
564 );
565
566 $this->end_controls_section();
567
568 $this->start_controls_section(
569 'section_style_date',
570 [
571 'label' => esc_html__('Date', 'ultimate-post-kit'),
572 'tab' => Controls_Manager::TAB_STYLE,
573 'condition' => [
574 'show_date' => 'yes',
575 ],
576 ]
577 );
578 $this->add_responsive_control(
579 'date_position',
580 [
581 'label' => esc_html__('Position', 'ultimate-post-kit'),
582 'type' => Controls_Manager::SELECT,
583 'default' => 'bottom-right',
584 'options' => [
585 'top-left' => esc_html__('Top Left', 'ultimate-post-kit'),
586 'top-right' => esc_html__('Top Right', 'ultimate-post-kit'),
587 'bottom-left' => esc_html__('Bottom Left', 'ultimate-post-kit'),
588 'bottom-right' => esc_html__('Bottom Right', 'ultimate-post-kit'),
589 ],
590 'selectors_dictionary' => [
591 'top-left' => 'top: 0; left: 0; bottom: auto; right: auto;',
592 'top-right' => 'top: 0; left: auto; bottom: auto; right: 0;',
593 'bottom-left' => 'top: auto; left: 0; bottom: 0; right: auto;',
594 'bottom-right' => 'top: auto; left: auto; bottom: 0; right: 0;',
595 ],
596 'selectors' => [
597 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap' => '{{VALUE}};',
598 ],
599 ]
600 );
601
602 $this->add_group_control(
603 Group_Control_Background::get_type(),
604 [
605 'name' => 'date_background',
606 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap',
607 'separator' => 'before'
608 ]
609 );
610
611 $this->add_group_control(
612 Group_Control_Border::get_type(),
613 [
614 'name' => 'date_border',
615 'label' => esc_html__('Border', 'ultimate-post-kit'),
616 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap',
617 ]
618 );
619
620 $this->add_responsive_control(
621 'date_border_radius',
622 [
623 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
624 'type' => Controls_Manager::DIMENSIONS,
625 'size_units' => ['px', '%'],
626 'selectors' => [
627 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
628 ],
629 ]
630 );
631
632 $this->add_responsive_control(
633 'date_padding',
634 [
635 'label' => esc_html__('Padding', 'ultimate-post-kit'),
636 'type' => Controls_Manager::DIMENSIONS,
637 'size_units' => ['px', '%'],
638 'selectors' => [
639 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
640 ]
641 ]
642 );
643
644 $this->add_responsive_control(
645 'date_margin',
646 [
647 'label' => __('Margin', 'ultimate-post-kit'),
648 'type' => Controls_Manager::DIMENSIONS,
649 'size_units' => ['px', 'em', '%'],
650 'selectors' => [
651 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
652 ]
653 ]
654 );
655
656 $this->add_control(
657 'date_day_heading',
658 [
659 'label' => esc_html__('Day', 'ultimate-post-kit'),
660 'type' => Controls_Manager::HEADING,
661 'separator' => 'before'
662 ]
663 );
664
665 $this->add_control(
666 'date_day_color',
667 [
668 'label' => esc_html__('Color', 'ultimate-post-kit'),
669 'type' => Controls_Manager::COLOR,
670 'selectors' => [
671 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap .upk-fanel-date' => 'color: {{VALUE}};',
672 ],
673 ]
674 );
675
676 $this->add_group_control(
677 Group_Control_Typography::get_type(),
678 [
679 'name' => 'date_day_typography',
680 'label' => esc_html__('Typography', 'ultimate-post-kit'),
681 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap .upk-fanel-date',
682 ]
683 );
684
685 $this->add_control(
686 'date_month_heading',
687 [
688 'label' => esc_html__('Month', 'ultimate-post-kit'),
689 'type' => Controls_Manager::HEADING,
690 'separator' => 'before'
691 ]
692 );
693
694 $this->add_control(
695 'date_month_color',
696 [
697 'label' => esc_html__('Color', 'ultimate-post-kit'),
698 'type' => Controls_Manager::COLOR,
699 'selectors' => [
700 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap .upk-fanel-month' => 'color: {{VALUE}};',
701 ],
702 ]
703 );
704
705 $this->add_group_control(
706 Group_Control_Typography::get_type(),
707 [
708 'name' => 'date_month_typography',
709 'label' => esc_html__('Typography', 'ultimate-post-kit'),
710 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-date-wrap .upk-fanel-month',
711 ]
712 );
713
714 $this->end_controls_section();
715
716 $this->start_controls_section(
717 'section_style_readmore',
718 [
719 'label' => esc_html__('Read More', 'ultimate-post-kit'),
720 'tab' => Controls_Manager::TAB_STYLE,
721 'condition' => [
722 'show_readmore' => 'yes',
723 ],
724 ]
725 );
726
727 $this->start_controls_tabs('tabs_readmore_style');
728
729 $this->start_controls_tab(
730 'tab_readmore_normal',
731 [
732 'label' => esc_html__('Normal', 'ultimate-post-kit'),
733 ]
734 );
735
736 $this->add_control(
737 'readmore_color',
738 [
739 'label' => esc_html__('Color', 'ultimate-post-kit'),
740 'type' => Controls_Manager::COLOR,
741 'selectors' => [
742 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more' => 'color: {{VALUE}};',
743 ],
744 ]
745 );
746
747 $this->add_group_control(
748 Group_Control_Background::get_type(),
749 [
750 'name' => 'readmore_background',
751 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more',
752 ]
753 );
754
755 $this->add_group_control(
756 Group_Control_Border::get_type(),
757 [
758 'name' => 'readmore_border',
759 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more',
760 ]
761 );
762
763 $this->add_responsive_control(
764 'readmore_border_radius',
765 [
766 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
767 'type' => Controls_Manager::DIMENSIONS,
768 'size_units' => ['px', '%'],
769 'selectors' => [
770 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
771 ],
772 ]
773 );
774 $this->add_responsive_control(
775 'readmore_margin',
776 [
777 'label' => __('Margin', 'ultimate-post-kit'),
778 'type' => Controls_Manager::DIMENSIONS,
779 'size_units' => ['px', 'em', '%'],
780 'selectors' => [
781 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more' => 'margin: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
782 ]
783 ]
784 );
785
786 $this->add_responsive_control(
787 'readmore_size',
788 [
789 'label' => esc_html__('Icon Size', 'ultimate-post-kit'),
790 'type' => Controls_Manager::SLIDER,
791 'range' => [
792 'px' => [
793 'min' => 0,
794 'max' => 50,
795 ],
796 ],
797 'selectors' => [
798 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more' => 'font-size: {{SIZE}}{{UNIT}};',
799 ],
800 ]
801 );
802
803 $this->add_responsive_control(
804 'readmore_button_height',
805 [
806 'label' => esc_html__('Button Height', 'ultimate-post-kit'),
807 'type' => Controls_Manager::SLIDER,
808 'selectors' => [
809 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more' => 'height: {{SIZE}}{{UNIT}}; line-height: {{SIZE}}{{UNIT}};',
810 ],
811 ]
812 );
813
814 $this->add_responsive_control(
815 'readmore_button_width',
816 [
817 'label' => esc_html__('Button Width', 'ultimate-post-kit'),
818 'type' => Controls_Manager::SLIDER,
819 'selectors' => [
820 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more' => 'width: {{SIZE}}{{UNIT}};',
821 ],
822 ]
823 );
824
825 $this->end_controls_tab();
826
827 $this->start_controls_tab(
828 'tab_readmore_hover',
829 [
830 'label' => esc_html__('Hover', 'ultimate-post-kit'),
831 ]
832 );
833
834 $this->add_control(
835 'readmore_color_hover',
836 [
837 'label' => esc_html__('Color', 'ultimate-post-kit'),
838 'type' => Controls_Manager::COLOR,
839 'selectors' => [
840 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more:hover' => 'color: {{VALUE}};',
841 ],
842 ]
843 );
844
845 $this->add_group_control(
846 Group_Control_Background::get_type(),
847 [
848 'name' => 'readmore_background_hover',
849 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more:hover',
850 ]
851 );
852
853 $this->add_control(
854 'readmore_hover_border_color',
855 [
856 'label' => esc_html__('Border Color', 'ultimate-post-kit'),
857 'type' => Controls_Manager::COLOR,
858 'condition' => [
859 'readmore_border_border!' => '',
860 ],
861 'selectors' => [
862 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-read-more:hover' => 'border-color: {{VALUE}};',
863 ],
864 ]
865 );
866
867 $this->end_controls_tab();
868
869 $this->end_controls_tabs();
870
871 $this->end_controls_section();
872
873 $this->start_controls_section(
874 'section_style_category',
875 [
876 'label' => esc_html__('Category', 'ultimate-post-kit'),
877 'tab' => Controls_Manager::TAB_STYLE,
878 'condition' => [
879 'show_category' => 'yes',
880 ],
881 ]
882 );
883
884 $this->add_responsive_control(
885 'category_bottom_spacing',
886 [
887 'label' => esc_html__('Spacing', 'ultimate-post-kit'),
888 'type' => Controls_Manager::SLIDER,
889 'range' => [
890 'px' => [
891 'min' => 0,
892 'max' => 50,
893 ],
894 ],
895 'selectors' => [
896 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category' => 'margin-bottom: {{SIZE}}{{UNIT}};',
897 ],
898 ]
899 );
900
901 $this->start_controls_tabs('tabs_category_style');
902
903 $this->start_controls_tab(
904 'tab_category_normal',
905 [
906 'label' => esc_html__('Normal', 'ultimate-post-kit'),
907 ]
908 );
909
910 $this->add_control(
911 'category_color',
912 [
913 'label' => esc_html__('Color', 'ultimate-post-kit'),
914 'type' => Controls_Manager::COLOR,
915 'selectors' => [
916 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a' => 'color: {{VALUE}};',
917 ],
918 ]
919 );
920
921 $this->add_group_control(
922 Group_Control_Background::get_type(),
923 [
924 'name' => 'category_background',
925 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a',
926 ]
927 );
928
929 $this->add_group_control(
930 Group_Control_Border::get_type(),
931 [
932 'name' => 'category_border',
933 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a',
934 ]
935 );
936
937 $this->add_responsive_control(
938 'category_border_radius',
939 [
940 'label' => esc_html__('Border Radius', 'ultimate-post-kit'),
941 'type' => Controls_Manager::DIMENSIONS,
942 'size_units' => ['px', '%'],
943 'selectors' => [
944 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a' => 'border-radius: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
945 ],
946 ]
947 );
948
949 $this->add_responsive_control(
950 'category_padding',
951 [
952 'label' => esc_html__('Padding', 'ultimate-post-kit'),
953 'type' => Controls_Manager::DIMENSIONS,
954 'size_units' => ['px', 'em', '%'],
955 'selectors' => [
956 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a' => 'padding: {{TOP}}{{UNIT}} {{RIGHT}}{{UNIT}} {{BOTTOM}}{{UNIT}} {{LEFT}}{{UNIT}};',
957 ],
958 ]
959 );
960
961 $this->add_responsive_control(
962 'category_spacing',
963 [
964 'label' => esc_html__('Space Between', 'ultimate-post-kit'),
965 'type' => Controls_Manager::SLIDER,
966 'range' => [
967 'px' => [
968 'min' => 0,
969 'max' => 50,
970 'step' => 2,
971 ],
972 ],
973 'selectors' => [
974 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a+a' => 'margin-left: {{SIZE}}{{UNIT}};',
975 ],
976 ]
977 );
978
979
980 $this->add_group_control(
981 Group_Control_Box_Shadow::get_type(),
982 [
983 'name' => 'category_shadow',
984 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a',
985 ]
986 );
987
988 $this->add_group_control(
989 Group_Control_Typography::get_type(),
990 [
991 'name' => 'category_typography',
992 'label' => esc_html__('Typography', 'ultimate-post-kit'),
993 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a',
994 ]
995 );
996
997 $this->end_controls_tab();
998
999 $this->start_controls_tab(
1000 'tab_category_hover',
1001 [
1002 'label' => esc_html__('Hover', 'ultimate-post-kit'),
1003 ]
1004 );
1005
1006 $this->add_control(
1007 'category_hover_color',
1008 [
1009 'label' => esc_html__('Color', 'ultimate-post-kit'),
1010 'type' => Controls_Manager::COLOR,
1011 'selectors' => [
1012 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a:hover' => 'color: {{VALUE}};',
1013 ],
1014 ]
1015 );
1016
1017 $this->add_group_control(
1018 Group_Control_Background::get_type(),
1019 [
1020 'name' => 'category_hover_background',
1021 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a:hover',
1022 ]
1023 );
1024
1025 $this->add_control(
1026 'category_hover_border_color',
1027 [
1028 'label' => esc_html__('Border Color', 'ultimate-post-kit'),
1029 'type' => Controls_Manager::COLOR,
1030 'condition' => [
1031 'category_border_border!' => '',
1032 ],
1033 'selectors' => [
1034 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-category a:hover' => 'border-color: {{VALUE}};',
1035 ],
1036 ]
1037 );
1038
1039 $this->end_controls_tab();
1040
1041 $this->end_controls_tabs();
1042
1043 $this->end_controls_section();
1044
1045 $this->start_controls_section(
1046 'section_style_meta',
1047 [
1048 'label' => esc_html__('Meta', 'ultimate-post-kit'),
1049 'tab' => Controls_Manager::TAB_STYLE,
1050 'conditions' => [
1051 'relation' => 'or',
1052 'terms' => [
1053 [
1054 'name' => 'show_author',
1055 'value' => 'yes'
1056 ],
1057 [
1058 'name' => 'show_comments',
1059 'value' => 'yes'
1060 ]
1061 ]
1062 ],
1063 ]
1064 );
1065
1066 $this->add_control(
1067 'meta_color',
1068 [
1069 'label' => esc_html__('Color', 'ultimate-post-kit'),
1070 'type' => Controls_Manager::COLOR,
1071 'selectors' => [
1072 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-meta, {{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-meta .upk-author-name-wrap .upk-author-name' => 'color: {{VALUE}};',
1073 ],
1074 ]
1075 );
1076
1077 $this->add_control(
1078 'meta_hover_color',
1079 [
1080 'label' => esc_html__('Hover Color', 'ultimate-post-kit'),
1081 'type' => Controls_Manager::COLOR,
1082 'selectors' => [
1083 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-meta .upk-author-name-wrap .upk-author-name:hover' => 'color: {{VALUE}};',
1084 ],
1085 ]
1086 );
1087
1088 $this->add_responsive_control(
1089 'meta_spacing',
1090 [
1091 'label' => esc_html__('Spacing', 'ultimate-post-kit'),
1092 'type' => Controls_Manager::SLIDER,
1093 'range' => [
1094 'px' => [
1095 'min' => 0,
1096 'max' => 50,
1097 ],
1098 ],
1099 'selectors' => [
1100 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-meta' => 'padding-top: {{SIZE}}{{UNIT}};',
1101 ],
1102 ]
1103 );
1104
1105 $this->add_responsive_control(
1106 'meta_space_between',
1107 [
1108 'label' => esc_html__('Space Between', 'ultimate-post-kit'),
1109 'type' => Controls_Manager::SLIDER,
1110 'range' => [
1111 'px' => [
1112 'min' => 0,
1113 'max' => 50,
1114 ],
1115 ],
1116 'selectors' => [
1117 '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-meta > div:before' => 'margin: 0 {{SIZE}}{{UNIT}};',
1118 ],
1119 ]
1120 );
1121
1122 $this->add_group_control(
1123 Group_Control_Typography::get_type(),
1124 [
1125 'name' => 'meta_typography',
1126 'label' => esc_html__('Typography', 'ultimate-post-kit'),
1127 'selector' => '{{WRAPPER}} .upk-fanel-list .upk-item .upk-fanel-meta',
1128 ]
1129 );
1130
1131 $this->end_controls_section();
1132
1133 //Global Pagination Controls
1134 $this->register_pagination_controls();
1135
1136 //Global Ajax Loadmore Style Controls
1137 $this->register_ajax_loadmore_style_controls();
1138 }
1139
1140 /**
1141 * Get post query builder arguments
1142 */
1143 public function query_posts( $posts_per_page ) {
1144 $settings = $this->get_settings();
1145 $posts_per_page = isset( $posts_per_page ) ? (int) $posts_per_page : 0;
1146 $args = $this->getGroupControlQueryArgs();
1147 $is_current_query = ( ! empty( $settings['posts_source'] ) && $settings['posts_source'] === 'current_query' );
1148
1149 if ( $is_current_query ) {
1150 unset( $args['offset'] );
1151 unset( $args['no_found_rows'] );
1152 $posts_per_page = 0;
1153 }
1154
1155 if ( $posts_per_page > 0 ) {
1156 $args['posts_per_page'] = $posts_per_page;
1157 } else {
1158 $args['posts_per_page'] = (int) get_option( 'posts_per_page', 10 );
1159 }
1160
1161 if ( $settings['show_pagination'] ) {
1162 $args['paged'] = max( 1, (int) get_query_var( 'paged' ), (int) get_query_var( 'page' ) );
1163 }
1164
1165 $this->_query = new \WP_Query( $args );
1166 }
1167
1168 public function render_author() {
1169
1170 if (!$this->get_settings('show_author')) {
1171 return;
1172 }
1173 ?>
1174 <div class="upk-author-name-wrap">
1175 <span class="upk-by"><?php echo esc_html_x('by', 'Frontend', 'ultimate-post-kit') ?></span>
1176 <a class="upk-author-name" href="<?php echo esc_url( get_author_posts_url(get_the_author_meta('ID')) ); ?>">
1177 <?php echo esc_html( get_the_author() ); ?>
1178 </a>
1179 </div>
1180 <?php
1181 }
1182
1183 public function render_comments($id = 0) {
1184
1185 if (!$this->get_settings('show_comments')) {
1186 return;
1187 }
1188 ?>
1189
1190 <div class="upk-fanel-comments">
1191 <?php echo esc_html( $this->upk_get_formatted_comments_count( $id ) ); ?>
1192 </div>
1193
1194 <?php
1195 }
1196
1197 public function render_post_grid_item($post_id, $image_size, $excerpt_length) {
1198 $settings = $this->get_settings_for_display();
1199
1200 if ('yes' == $settings['global_link']) {
1201
1202 $this->add_render_attribute('list-item', 'onclick', "window.open('" . esc_url(get_permalink()) . "', '_self')", true);
1203 }
1204 $this->add_render_attribute('list-item', 'class', 'upk-item', true);
1205
1206 if ('yes' == $settings['show_readmore']) {
1207 $this->add_render_attribute('list-box', 'class', 'upk-content upk-readmore--yes', true);
1208 } else {
1209 $this->add_render_attribute('list-box', 'class', 'upk-content', true);
1210 }
1211
1212 ?>
1213 <div <?php $this->print_render_attribute_string('list-item'); ?>>
1214 <div class="upk-item-box">
1215 <div class="upk-image-wrap">
1216
1217 <?php $this->render_image(get_post_thumbnail_id($post_id), $image_size); ?>
1218
1219 <?php if ($settings['show_date'] == 'yes') : ?>
1220 <div class="upk-fanel-date-wrap">
1221 <span class="upk-fanel-date"><?php echo get_the_date('d'); ?></span>
1222 <span class="upk-fanel-month"><?php echo get_the_date('M'); ?></span>
1223 </div>
1224 <?php endif; ?>
1225
1226 </div>
1227
1228 <div <?php $this->print_render_attribute_string('list-box'); ?>>
1229 <?php $this->render_category(); ?>
1230
1231 <?php $this->render_title(substr($this->get_name(), 4)); ?>
1232
1233 <?php $this->render_excerpt($excerpt_length); ?>
1234
1235 <?php if ($settings['show_author'] or $settings['show_comments'] or $settings['show_reading_time']) : ?>
1236 <div class="upk-fanel-meta">
1237 <?php if ($settings['show_author']) : ?>
1238 <?php $this->render_author(); ?>
1239 <?php endif; ?>
1240 <?php if ($settings['show_comments']) : ?>
1241 <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1242 <?php $this->render_comments($post_id); ?>
1243 </div>
1244 <?php endif; ?>
1245
1246 <?php if (_is_upk_pro_activated()) :
1247 if ('yes' === $settings['show_reading_time']) : ?>
1248 <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1249 <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?>
1250 </div>
1251 <?php endif; ?>
1252 <?php endif; ?>
1253 </div>
1254 <?php endif; ?>
1255
1256 </div>
1257 <?php if ($settings['show_readmore'] == 'yes') : ?>
1258 <a class="upk-fanel-read-more" href="<?php echo esc_url(get_permalink()) ?>">
1259 <i class="upk-icon-arrow-right-7" aria-hidden="true"></i>
1260 </a>
1261 <?php endif; ?>
1262 </div>
1263 </div>
1264
1265 <?php
1266 }
1267
1268 protected function render() {
1269 $settings = $this->get_settings_for_display();
1270
1271 $this->query_posts($settings['item_limit']['size']);
1272 $wp_query = $this->get_query();
1273
1274 if (!$wp_query->found_posts) {
1275 return;
1276 }
1277
1278 $this->add_render_attribute(
1279 [
1280 'upk-fanel-list' => [
1281 'class' => 'upk-fanel-list-container upk-ajax-grid',
1282 'data-loadmore' => [
1283 wp_json_encode(
1284 array_filter([
1285 'loadmore_enable' => $settings['ajax_loadmore_enable'],
1286 'loadmore_btn' => $settings['ajax_loadmore_btn'],
1287 'infinite_scroll' => $settings['ajax_loadmore_infinite_scroll'],
1288 ])
1289 ),
1290 ],
1291 ],
1292 ]
1293 );
1294
1295 if ($settings['ajax_loadmore_enable'] == 'yes') {
1296 $ajax_settings = [
1297 'posts_source' => isset($settings['posts_source']) ? $settings['posts_source'] : 'post',
1298 'posts_per_page' => isset($settings['item_limit']['size']) ? $settings['item_limit']['size'] : 6,
1299 'ajax_item_load' => isset($settings['ajax_loadmore_items']) ? $settings['ajax_loadmore_items'] : 3,
1300 'posts_selected_ids' => isset($settings['posts_selected_ids']) ? $settings['posts_selected_ids'] : '',
1301 'posts_include_by' => isset($settings['posts_include_by']) ? $settings['posts_include_by'] : [],
1302 'posts_include_author_ids' => isset($settings['posts_include_author_ids']) ? $settings['posts_include_author_ids'] : '',
1303 'posts_include_term_ids' => isset($settings['posts_include_term_ids']) ? $settings['posts_include_term_ids'] : '',
1304 'posts_exclude_by' => isset($settings['posts_exclude_by']) ? $settings['posts_exclude_by'] : [],
1305 'posts_exclude_ids' => isset($settings['posts_exclude_ids']) ? $settings['posts_exclude_ids'] : '',
1306 'posts_exclude_author_ids' => isset($settings['posts_exclude_author_ids']) ? $settings['posts_exclude_author_ids'] : '',
1307 'posts_exclude_term_ids' => isset($settings['posts_exclude_term_ids']) ? $settings['posts_exclude_term_ids'] : '',
1308 'posts_offset' => isset($settings['posts_offset']) ? $settings['posts_offset'] : 0,
1309 'posts_select_date' => isset($settings['posts_select_date']) ? $settings['posts_select_date'] : '',
1310 'posts_date_before' => isset($settings['posts_date_before']) ? $settings['posts_date_before'] : '',
1311 'posts_date_after' => isset($settings['posts_date_after']) ? $settings['posts_date_after'] : '',
1312 'posts_orderby' => isset($settings['posts_orderby']) ? $settings['posts_orderby'] : 'date',
1313 'posts_order' => isset($settings['posts_order']) ? $settings['posts_order'] : 'DESC',
1314 'posts_ignore_sticky_posts' => isset($settings['posts_ignore_sticky_posts']) ? $settings['posts_ignore_sticky_posts'] : 'no',
1315 'posts_only_with_featured_image'=> isset($settings['posts_only_with_featured_image']) ? $settings['posts_only_with_featured_image'] : 'no',
1316 // List Settings
1317 'show_title' => isset($settings['show_title']) ? $settings['show_title'] : 'yes',
1318 'title_tags' => isset( $settings['title_tags'] ) ? $settings['title_tags'] : 'h3',
1319 'title_style' => isset($settings['title_style']) ? $settings['title_style'] : '',
1320 'show_category' => isset($settings['show_category']) ? $settings['show_category'] : 'yes',
1321 'show_date' => isset($settings['show_date']) ? $settings['show_date'] : 'yes',
1322 'show_readmore' => isset($settings['show_readmore']) ? $settings['show_readmore'] : 'no',
1323 'show_excerpt' => isset($settings['show_excerpt']) ? $settings['show_excerpt'] : 'no',
1324 'excerpt_length' => isset($settings['excerpt_length']) ? $settings['excerpt_length'] : 15,
1325 'show_author' => isset($settings['show_author']) ? $settings['show_author'] : 'no',
1326 'show_comments' => isset($settings['show_comments']) ? $settings['show_comments'] : 'no',
1327 'meta_separator' => isset($settings['meta_separator']) ? $settings['meta_separator'] : '//',
1328 'show_reading_time' => isset($settings['show_reading_time']) ? $settings['show_reading_time'] : 'no',
1329 'avg_reading_speed' => isset($settings['avg_reading_speed']) ? $settings['avg_reading_speed'] : 200,
1330 'hide_seconds' => isset($settings['hide_seconds']) ? $settings['hide_seconds'] : 'no',
1331 'hide_minutes' => isset($settings['hide_minutes']) ? $settings['hide_minutes'] : 'no',
1332 'primary_thumbnail_size' => isset($settings['primary_thumbnail_size']) ? $settings['primary_thumbnail_size'] : 'medium',
1333 'upk_link_new_tab' => isset($settings['upk_link_new_tab']) ? $settings['upk_link_new_tab'] : 'no',
1334 'global_link' => isset($settings['global_link']) ? $settings['global_link'] : 'no',
1335 ];
1336
1337 $this->add_render_attribute(
1338 [
1339 'upk-fanel-list' => [
1340 'data-settings' => [
1341 wp_json_encode($ajax_settings)
1342 ],
1343 ],
1344 ]
1345 );
1346 }
1347
1348 $this->add_render_attribute('list-wrap', 'class', 'upk-fanel-list upk-ajax-grid-wrap');
1349
1350 if (isset($settings['upk_in_animation_show']) && ($settings['upk_in_animation_show'] == 'yes')) {
1351 $this->add_render_attribute('list-wrap', 'class', 'upk-in-animation');
1352 if (isset($settings['upk_in_animation_delay']['size'])) {
1353 $this->add_render_attribute('list-wrap', 'data-in-animation-delay', $settings['upk_in_animation_delay']['size']);
1354 }
1355 }
1356
1357 ?>
1358 <div <?php $this->print_render_attribute_string('upk-fanel-list'); ?>>
1359 <div <?php $this->print_render_attribute_string('list-wrap'); ?>>
1360 <?php while ($wp_query->have_posts()) :
1361 $wp_query->the_post();
1362
1363 $thumbnail_size = $settings['primary_thumbnail_size'];
1364
1365 ?>
1366
1367 <?php $this->render_post_grid_item(get_the_ID(), $thumbnail_size, $settings['excerpt_length']); ?>
1368
1369 <?php endwhile; ?>
1370 </div>
1371 </div>
1372
1373 <?php $this->render_ajax_loadmore(); ?>
1374
1375 <?php
1376
1377 if ($settings['show_pagination']) { ?>
1378 <div class="ep-pagination">
1379 <?php ultimate_post_kit_post_pagination($wp_query, $this->get_id()); ?>
1380 </div>
1381 <?php
1382 }
1383 wp_reset_postdata();
1384 }
1385 }
1386