PluginProbe
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets / 4.5.6
Ultimate Post Kit – Elementor Post Grid, Post Carousel, Post Slider & Blog Layout Widgets v4.5.6
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
← All changes | modules/pholox-slider/widgets/pholox-slider.php +89 -93 4.1.0 → 4.5.6 View file →
@@ -160,8 +160,9 @@
160 160 $this->add_group_control(
161 161 Group_Control_Image_Size::get_type(),
162 162 [
163 163 'name' => 'primary_thumbnail',
164 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour.
164 165 'exclude' => ['custom'],
165 166 'default' => 'full',
166 167 'separator' => 'after',
167 168 ]
@@ -220,9 +221,9 @@
220 221 [
221 222 'label' => esc_html__('Thumbs Category', 'ultimate-post-kit'),
222 223 'type' => Controls_Manager::SWITCHER,
223 224 'default' => 'yes',
224 - 'separator' => 'before',
225 + // 'separator' => 'before',
225 226 ]
226 227 );
227 228
228 229 $this->add_control(
@@ -241,9 +242,9 @@
241 242 'type' => Controls_Manager::SELECT,
242 243 'default' => 'h3',
243 244 'options' => ultimate_post_kit_title_tags(),
244 245 'condition' => [
245 - 'show_title' => 'yes'
246 + 'thumb_show_title' => 'yes'
246 247 ]
247 248 ]
248 249 );
249 250
@@ -271,8 +272,11 @@
271 272 ],
272 273 'default' => [
273 274 'size' => 5,
274 275 ],
276 + 'condition' => [
277 + 'posts_source!' => 'current_query',
278 + ]
275 279 ]
276 280 );
277 281
278 282 $this->register_query_builder_controls();
@@ -355,24 +359,15 @@
355 359
356 360 $this->end_controls_section();
357 361
358 362 $this->start_controls_section(
359 - 'style_content_section',
363 + 'section_style_image',
360 364 [
361 - 'label' => esc_html__('Slider', 'ultimate-post-kit'),
365 + 'label' => esc_html__('Image', 'ultimate-post-kit'),
362 366 'tab' => Controls_Manager::TAB_STYLE,
363 367 ]
364 368 );
365 369
366 - $this->add_control(
367 - 'main_slider_image_heading',
368 - [
369 - 'label' => esc_html__('Image', 'ultimate-post-kit'),
370 - 'type' => Controls_Manager::HEADING,
371 - 'separator' => 'before',
372 - ]
373 - );
374 -
375 370 $this->add_group_control(
376 371 Group_Control_Border::get_type(),
377 372 [
378 373 'name' => 'main_slider_image_border',
@@ -391,17 +386,15 @@
391 386 ],
392 387 ]
393 388 );
394 389
390 + $this->end_controls_section();
395 391
396 - $this->start_controls_tabs(
397 - 'style_slider_tabs'
398 - );
399 -
400 - $this->start_controls_tab(
401 - 'style_main_slider_items_tab',
392 + $this->start_controls_section(
393 + 'section_style_content',
402 394 [
403 - 'label' => esc_html__('Items', 'ultimate-post-kit'),
395 + 'label' => esc_html__('Content', 'ultimate-post-kit'),
396 + 'tab' => Controls_Manager::TAB_STYLE,
404 397 ]
405 398 );
406 399
407 400 $this->add_group_control(
@@ -451,14 +444,15 @@
451 444 'selector' => '{{WRAPPER}} .upk-pholox-slider .upk-main-slider .upk-content',
452 445 ]
453 446 );
454 447
455 - $this->end_controls_tab();
448 + $this->end_controls_section();
456 449
457 - $this->start_controls_tab(
458 - 'style_main_slider_play_button_tab',
450 + $this->start_controls_section(
451 + 'section_style_play_button',
459 452 [
460 453 'label' => esc_html__('Play Button', 'ultimate-post-kit'),
454 + 'tab' => Controls_Manager::TAB_STYLE,
461 455 ]
462 456 );
463 457
464 458 $this->add_responsive_control(
@@ -563,14 +557,18 @@
563 557 ]
564 558 ]
565 559 );
566 560
567 - $this->end_controls_tab();
561 + $this->end_controls_section();
568 562
569 - $this->start_controls_tab(
570 - 'style_main_slider_title_tab',
563 + $this->start_controls_section(
564 + 'section_style_title',
571 565 [
572 - 'label' => esc_html__('Title', 'ultimate-post-kit'),
566 + 'label' => esc_html__('Title', 'ultimate-post-kit'),
567 + 'tab' => Controls_Manager::TAB_STYLE,
568 + 'condition' => [
569 + 'show_title' => 'yes',
570 + ],
573 571 ]
574 572 );
575 573
576 574 $this->add_control(
@@ -646,14 +644,18 @@
646 644 ],
647 645 ]
648 646 );
649 647
650 - $this->end_controls_tab();
648 + $this->end_controls_section();
651 649
652 - $this->start_controls_tab(
653 - 'style_main_slider_category_tab',
650 + $this->start_controls_section(
651 + 'section_style_category',
654 652 [
655 - 'label' => esc_html__('Category', 'ultimate-post-kit'),
653 + 'label' => esc_html__('Category', 'ultimate-post-kit'),
654 + 'tab' => Controls_Manager::TAB_STYLE,
655 + 'condition' => [
656 + 'show_category' => 'yes',
657 + ],
656 658 ]
657 659 );
658 660
659 661 $this->add_responsive_control(
@@ -802,20 +804,35 @@
802 804 ]
803 805 );
804 806
805 807
806 - $this->end_controls_tab();
808 + $this->end_controls_section();
807 809
808 - // main slider meta tab
809 -
810 - $this->start_controls_tab(
811 - 'style_main_slider_meta_tab',
810 + $this->start_controls_section(
811 + 'section_style_meta',
812 812 [
813 - 'label' => esc_html__('Meta', 'ultimate-post-kit'),
813 + 'label' => esc_html__('Meta', 'ultimate-post-kit'),
814 + 'tab' => Controls_Manager::TAB_STYLE,
815 + 'conditions' => [
816 + 'relation' => 'or',
817 + 'terms' => [
818 + [
819 + 'name' => 'show_author',
820 + 'value' => 'yes',
821 + ],
822 + [
823 + 'name' => 'show_date',
824 + 'value' => 'yes',
825 + ],
826 + [
827 + 'name' => 'show_reading_time',
828 + 'value' => 'yes',
829 + ],
830 + ],
831 + ],
814 832 ]
815 833 );
816 834
817 -
818 835 $this->add_control(
819 836 'meta_color',
820 837 [
821 838 'label' => esc_html__('Color', 'ultimate-post-kit'),
@@ -862,37 +879,18 @@
862 879 'selector' => '{{WRAPPER}} .upk-pholox-slider .upk-main-slider .upk-meta',
863 880 ]
864 881 );
865 882
866 - $this->end_controls_tab();
867 -
868 - $this->end_controls_tabs();
869 -
870 883 $this->end_controls_section();
871 884
872 - // start thumbnail style
873 -
874 885 $this->start_controls_section(
875 - 'style_playlist',
886 + 'section_style_thumbs_item',
876 887 [
877 - 'label' => esc_html__('Thumbs', 'ultimate-post-kit'),
888 + 'label' => esc_html__('Thumbs Item', 'ultimate-post-kit'),
878 889 'tab' => Controls_Manager::TAB_STYLE,
879 890 ]
880 891 );
881 892
882 - $this->start_controls_tabs(
883 - 'style_thumbs_slider_tabs'
884 - );
885 -
886 - // thumbs slider item
887 -
888 - $this->start_controls_tab(
889 - 'tab_thumbs_slider_item',
890 - [
891 - 'label' => __('Item', 'ultimate-post-kit'),
892 - ]
893 - );
894 -
895 893 $this->add_group_control(
896 894 Group_Control_Background::get_type(),
897 895 [
898 896 'name' => 'thumbs_item_background',
@@ -982,14 +980,15 @@
982 980 ],
983 981 ]
984 982 );
985 983
986 - $this->end_controls_tab();
984 + $this->end_controls_section();
987 985
988 - $this->start_controls_tab(
989 - 'style_thumbs_slide_image_tab',
986 + $this->start_controls_section(
987 + 'section_style_thumbs_image',
990 988 [
991 - 'label' => esc_html__('Image', 'ultimate-post-kit'),
989 + 'label' => esc_html__('Thumbs Image', 'ultimate-post-kit'),
990 + 'tab' => Controls_Manager::TAB_STYLE,
992 991 ]
993 992 );
994 993
995 994 $this->add_responsive_control(
@@ -1033,16 +1032,15 @@
1033 1032 ],
1034 1033 ]
1035 1034 );
1036 1035
1037 - $this->end_controls_tab();
1036 + $this->end_controls_section();
1038 1037
1039 - // thumbs slider play button tab
1040 -
1041 - $this->start_controls_tab(
1042 - 'style_thumbs_slider_play-button_tab',
1038 + $this->start_controls_section(
1039 + 'section_style_thumbs_play_button',
1043 1040 [
1044 - 'label' => esc_html__('Play Button', 'ultimate-post-kit'),
1041 + 'label' => esc_html__('Thumbs Play Button', 'ultimate-post-kit'),
1042 + 'tab' => Controls_Manager::TAB_STYLE,
1045 1043 ]
1046 1044 );
1047 1045
1048 1046 $this->add_responsive_control(
@@ -1163,16 +1161,18 @@
1163 1161 ]
1164 1162 );
1165 1163
1166 1164
1167 - $this->end_controls_tab();
1165 + $this->end_controls_section();
1168 1166
1169 - // thumbs slider title tab
1170 -
1171 - $this->start_controls_tab(
1172 - 'style_thumbs_slider_title_tab',
1167 + $this->start_controls_section(
1168 + 'section_style_thumbs_title',
1173 1169 [
1174 - 'label' => esc_html__('Title', 'ultimate-post-kit'),
1170 + 'label' => esc_html__('Thumbs Title', 'ultimate-post-kit'),
1171 + 'tab' => Controls_Manager::TAB_STYLE,
1172 + 'condition' => [
1173 + 'thumb_show_title' => 'yes',
1174 + ],
1175 1175 ]
1176 1176 );
1177 1177
1178 1178 $this->add_control(
@@ -1215,16 +1215,18 @@
1215 1215 ],
1216 1216 ]
1217 1217 );
1218 1218
1219 - $this->end_controls_tab();
1219 + $this->end_controls_section();
1220 1220
1221 - // thumbs slider thumbs tab
1222 -
1223 - $this->start_controls_tab(
1224 - 'style_thumbs_slider_category_tab',
1221 + $this->start_controls_section(
1222 + 'section_style_thumbs_category',
1225 1223 [
1226 - 'label' => esc_html__('Category', 'ultimate-post-kit'),
1224 + 'label' => esc_html__('Thumbs Category', 'ultimate-post-kit'),
1225 + 'tab' => Controls_Manager::TAB_STYLE,
1226 + 'condition' => [
1227 + 'thumb_show_category' => 'yes',
1228 + ],
1227 1229 ]
1228 1230 );
1229 1231
1230 1232 // $this->add_control(
@@ -1408,9 +1410,9 @@
1408 1410 [
1409 1411 'label' => esc_html__('Border Color', 'ultimate-post-kit'),
1410 1412 'type' => Controls_Manager::COLOR,
1411 1413 'condition' => [
1412 - 'category_border_border!' => '',
1414 + 'playlist_category_border_border!' => '',
1413 1415 ],
1414 1416 'selectors' => [
1415 1417 '{{WRAPPER}} .upk-pholox-slider .upk-thumbs-slider .upk-category a:hover' => 'border-color: {{VALUE}};',
1416 1418 ],
@@ -1415,15 +1417,9 @@
1415 1417 '{{WRAPPER}} .upk-pholox-slider .upk-thumbs-slider .upk-category a:hover' => 'border-color: {{VALUE}};',
1416 1418 ],
1417 1419 ]
1418 1420 );
1419 - // category control thumbs end
1420 1421
1421 -
1422 - $this->end_controls_tab();
1423 -
1424 - $this->end_controls_tabs();
1425 -
1426 1422 $this->end_controls_section();
1427 1423 }
1428 1424
1429 1425 /**
@@ -1436,9 +1432,8 @@
1436 1432 $default = $this->getGroupControlQueryArgs();
1437 1433 $args = [];
1438 1434 if ($posts_per_page) {
1439 1435 $args['posts_per_page'] = $posts_per_page;
1440 - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page'));
1441 1436 }
1442 1437
1443 1438 $args = array_merge($default, $args);
1444 1439 $this->_query = new WP_Query($args);
@@ -1451,9 +1446,10 @@
1451 1446 if (!$this->get_settings('thumb_show_title')) {
1452 1447 return;
1453 1448 }
1454 1449
1455 - printf('<%1$s class="upk-title"><a href="%2$s" title="%3$s">%3$s</a></%1$s>', esc_attr(Utils::get_valid_html_tag($settings['title_tags'])), 'javascript:void(0);', esc_html( get_the_title() ));
1450 + $title = get_the_title();
1451 + printf('<%1$s class="upk-title"><a href="%2$s" title="%4$s">%3$s</a></%1$s>', esc_attr(Utils::get_valid_html_tag($settings['title_tags'])), 'javascript:void(0);', esc_html( $title ), esc_attr( $title ));
1456 1452 }
1457 1453
1458 1454
1459 1455 function thumbs_render_category()
@@ -1462,9 +1458,9 @@
1462 1458 return;
1463 1459 }
1464 1460 ?>
1465 1461 <div class="upk-category">
1466 - <?php echo upk_get_category($this->get_settings('posts_source')); ?>
1462 + <?php echo wp_kses_post( upk_get_category($this->get_settings('posts_source')) ); ?>
1467 1463 </div>
1468 1464 <?php
1469 1465 }
1470 1466
@@ -1589,9 +1585,9 @@
1589 1585 <div class="upk-meta" data-swiper-parallax="-350" data-swiper-parallax-duration="1000">
1590 1586 <?php $this->render_author(); ?>
1591 1587
1592 1588 <?php if ($settings['show_date'] == 'yes') : ?>
1593 - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1589 + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1594 1590 <?php $this->render_date(); ?>
1595 1591 </div>
1596 1592 <?php endif; ?>
1597 1593
@@ -1596,9 +1592,9 @@
1596 1592 <?php endif; ?>
1597 1593
1598 1594 <?php if (_is_upk_pro_activated()) :
1599 1595 if ('yes' === $settings['show_reading_time']) : ?>
1600 - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1596 + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1601 1597 <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?>
1602 1598 </div>
1603 1599 <?php endif; ?>
1604 1600 <?php endif; ?>