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/snog-slider/widgets/snog-slider.php +29 -18 4.0.9 → 4.5.6 View file →
@@ -162,8 +162,9 @@
162 162 $this->add_group_control(
163 163 Group_Control_Image_Size::get_type(),
164 164 [
165 165 'name' => 'primary_thumbnail',
166 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour.
166 167 'exclude' => ['custom'],
167 168 'default' => 'full',
168 169 ]
169 170 );
@@ -243,9 +244,9 @@
243 244
244 245 $this->add_control(
245 246 'show_readmore',
246 247 [
247 - 'label' => esc_html__('Show Read more', 'ultimate-post-kit'),
248 + 'label' => esc_html__('Show Read More', 'ultimate-post-kit'),
248 249 'type' => Controls_Manager::SWITCHER,
249 250 'default' => 'yes',
250 251 'separator' => 'before'
251 252 ]
@@ -253,10 +254,11 @@
253 254
254 255 $this->add_control(
255 256 'readmore_text',
256 257 [
257 - 'label' => __( 'Readmore Text', 'ultimate-post-kit' ),
258 + 'label' => __( 'Read More Text', 'ultimate-post-kit' ),
258 259 'type' => Controls_Manager::TEXT,
260 + 'dynamic' => [ 'active' => true ],
259 261 'default' => esc_html__('Explore', 'ultimate-post-kit'),
260 262 'label_block' => false,
261 263 'condition' => [
262 264 'show_readmore' => 'yes'
@@ -314,8 +316,11 @@
314 316 ],
315 317 'default' => [
316 318 'size' => 5,
317 319 ],
320 + 'condition' => [
321 + 'posts_source!' => 'current_query',
322 + ]
318 323 ]
319 324 );
320 325
321 326 $this->register_query_builder_controls();
@@ -353,10 +358,13 @@
353 358
354 359 $this->add_control(
355 360 'pauseonhover',
356 361 [
357 - 'label' => esc_html__( 'Pause on Hover', 'ultimate-post-kit' ),
358 - 'type' => Controls_Manager::SWITCHER,
362 + 'label' => esc_html__( 'Pause on Hover', 'ultimate-post-kit' ),
363 + 'type' => Controls_Manager::SWITCHER,
364 + 'condition' => [
365 + 'autoplay' => 'yes',
366 + ],
359 367 ]
360 368 );
361 369
362 370 $this->add_control(
@@ -911,8 +919,11 @@
911 919 'section_style_link_btn',
912 920 [
913 921 'label' => esc_html__('Read More', 'ultimate-post-kit'),
914 922 'tab' => Controls_Manager::TAB_STYLE,
923 + 'condition' => [
924 + 'show_readmore' => 'yes'
925 + ],
915 926 ]
916 927 );
917 928
918 929 $this->start_controls_tabs('tabs_link_btn_style');
@@ -1346,11 +1357,11 @@
1346 1357 */
1347 1358 public function query_posts( $posts_per_page ) {
1348 1359
1349 1360 $default = $this->getGroupControlQueryArgs();
1361 + $args = [];
1350 1362 if ( $posts_per_page ) {
1351 1363 $args['posts_per_page'] = $posts_per_page;
1352 - // $args['paged'] = max( 1, get_query_var( 'paged' ), get_query_var( 'page' ) );
1353 1364 }
1354 1365 $args = array_merge( $default, $args );
1355 1366 $this->_query = new WP_Query( $args );
1356 1367 }
@@ -1412,10 +1423,10 @@
1412 1423
1413 1424 $this->add_render_attribute('swiper', 'class', 'upk-main-slider swiper');
1414 1425
1415 1426 ?>
1416 - <div <?php echo $this->get_render_attribute_string( 'snog-slider' ); ?>>
1417 - <div <?php echo $this->get_render_attribute_string('swiper'); ?>>
1427 + <div <?php $this->print_render_attribute_string( 'snog-slider' ); ?>>
1428 + <div <?php $this->print_render_attribute_string('swiper'); ?>>
1418 1429 <div class="swiper-wrapper">
1419 1430 <?php
1420 1431 }
1421 1432
@@ -1447,9 +1458,9 @@
1447 1458 <?php
1448 1459 if (has_excerpt()) {
1449 1460 the_excerpt();
1450 1461 } else {
1451 - echo ultimate_post_kit_custom_excerpt($excerpt_length, $strip_shortcode);
1462 + echo wp_kses_post( ultimate_post_kit_custom_excerpt($excerpt_length, $strip_shortcode) );
1452 1463 }
1453 1464 ?>
1454 1465 </div>
1455 1466 <?php
@@ -1460,9 +1471,9 @@
1460 1471
1461 1472 $this->add_render_attribute('slider-item', 'class', 'upk-item swiper-slide', true);
1462 1473
1463 1474 ?>
1464 - <div <?php echo $this->get_render_attribute_string('slider-item'); ?>>
1475 + <div <?php $this->print_render_attribute_string('slider-item'); ?>>
1465 1476 <div class="upk-image-wrap">
1466 1477 <?php $this->render_image(get_post_thumbnail_id($post_id), $image_size); ?>
1467 1478 </div>
1468 1479 </div>
@@ -1474,9 +1485,9 @@
1474 1485
1475 1486 $this->add_render_attribute('slider-item', 'class', 'upk-item swiper-slide', true);
1476 1487
1477 1488 ?>
1478 - <div <?php echo $this->get_render_attribute_string('slider-item'); ?>>
1489 + <div <?php $this->print_render_attribute_string('slider-item'); ?>>
1479 1490 <div class="upk-content-wrap">
1480 1491 <div class="upk-inner-content">
1481 1492 <?php if ( $settings['show_category'] ) : ?>
1482 1493 <div data-swiper-parallax-x ="-60" data-swiper-parallax-duration="500">
@@ -1488,9 +1499,9 @@
1488 1499 <div class="upk-meta" data-swiper-parallax-x ="-60" data-swiper-parallax-duration="600">
1489 1500 <?php $this->render_author(); ?>
1490 1501
1491 1502 <?php if ($settings['show_date'] == 'yes') : ?>
1492 - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1503 + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1493 1504 <?php $this->render_date(); ?>
1494 1505 </div>
1495 1506 <?php endif; ?>
1496 1507
@@ -1495,10 +1506,10 @@
1495 1506 <?php endif; ?>
1496 1507
1497 1508 <?php if (_is_upk_pro_activated()) :
1498 1509 if ('yes' === $settings['show_reading_time']) : ?>
1499 - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1500 - <?php echo esc_html( ultimate_post_kit_reading_time(get_the_content(), $settings['avg_reading_speed']) ); ?>
1510 + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1511 + <?php echo esc_html( ultimate_post_kit_reading_time(get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no') ); ?>
1501 1512 </div>
1502 1513 <?php endif; ?>
1503 1514 <?php endif; ?>
1504 1515
@@ -1532,9 +1543,9 @@
1532 1543
1533 1544 $this->add_render_attribute('thumb-item', 'class', 'upk-item swiper-slide', true);
1534 1545
1535 1546 ?>
1536 - <div <?php echo $this->get_render_attribute_string('thumb-item'); ?>>
1547 + <div <?php $this->print_render_attribute_string('thumb-item'); ?>>
1537 1548 <div class="upk-image-wrap">
1538 1549 <?php $this->render_image(get_post_thumbnail_id($post_id), $image_size); ?>
1539 1550 </div>
1540 1551 </div>
@@ -1571,9 +1582,9 @@
1571 1582
1572 1583 $this->render_footer();
1573 1584
1574 1585 ?>
1575 - <div thumbsSlider="" <?php echo $this->get_render_attribute_string('swiper-thumbs'); ?>>
1586 + <div thumbsSlider="" <?php $this->print_render_attribute_string('swiper-thumbs'); ?>>
1576 1587 <div class="swiper-wrapper">
1577 1588 <?php
1578 1589
1579 1590 while ( $wp_query->have_posts() ) {
@@ -1586,9 +1597,9 @@
1586 1597 ?>
1587 1598 </div>
1588 1599 </div>
1589 1600
1590 - <div <?php echo $this->get_render_attribute_string('swiper-content'); ?>>
1601 + <div <?php $this->print_render_attribute_string('swiper-content'); ?>>
1591 1602 <div class="swiper-wrapper">
1592 1603 <?php
1593 1604 while ( $wp_query->have_posts() ) {
1594 1605 $wp_query->the_post();
@@ -1600,12 +1611,12 @@
1600 1611
1601 1612 <?php if ($settings['show_navigation']) : ?>
1602 1613 <div class="upk-navigation-wrap">
1603 1614 <div class="upk-nav-btn upk-navigation-prev">
1604 - <i class="upk-icon-arrow-left-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1615 + <i class="upk-icon-arrow-left-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1605 1616 </div>
1606 1617 <div class="upk-nav-btn upk-navigation-next">
1607 - <i class="upk-icon-arrow-right-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1618 + <i class="upk-icon-arrow-right-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1608 1619 </div>
1609 1620 </div>
1610 1621 <?php endif; ?>
1611 1622 </div>