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/crystal-slider/widgets/crystal-slider.php +21 -13 4.0.9 → 4.5.6 View file →
@@ -151,8 +151,9 @@
151 151 $this->add_group_control(
152 152 Group_Control_Image_Size::get_type(),
153 153 [
154 154 'name' => 'primary_thumbnail',
155 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour.
155 156 'exclude' => ['custom'],
156 157 'default' => 'full',
157 158 ]
158 159 );
@@ -248,8 +249,11 @@
248 249 ],
249 250 'default' => [
250 251 'size' => 3,
251 252 ],
253 + 'condition' => [
254 + 'posts_source!' => 'current_query',
255 + ]
252 256 ]
253 257 );
254 258
255 259 $this->register_query_builder_controls();
@@ -287,10 +291,13 @@
287 291
288 292 $this->add_control(
289 293 'pauseonhover',
290 294 [
291 - 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'),
292 - 'type' => Controls_Manager::SWITCHER,
295 + 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'),
296 + 'type' => Controls_Manager::SWITCHER,
297 + 'condition' => [
298 + 'autoplay' => 'yes',
299 + ],
293 300 ]
294 301 );
295 302
296 303 $this->add_control(
@@ -1156,10 +1163,10 @@
1156 1163 'default' => [
1157 1164 'unit' => '%',
1158 1165 ],
1159 1166 'selectors' => [
1160 - '{{WRAPPER}} .upk-crystal-slider .upk-navigation-wrap .upk-navigation-next' => 'left: {{SIZE}}{{UNIT}};',
1161 - '{{WRAPPER}} .upk-crystal-slider .upk-navigation-wrap .upk-navigation-prev' => 'right: {{SIZE}}{{UNIT}};',
1167 + '{{WRAPPER}} .upk-crystal-slider .upk-navigation-wrap .upk-navigation-next' => 'right: {{SIZE}}{{UNIT}}; left: auto;',
1168 + '{{WRAPPER}} .upk-crystal-slider .upk-navigation-wrap .upk-navigation-prev' => 'left: {{SIZE}}{{UNIT}}; right: auto;',
1162 1169 ],
1163 1170 ]
1164 1171 );
1165 1172
@@ -1516,11 +1523,11 @@
1516 1523 */
1517 1524 public function query_posts($posts_per_page) {
1518 1525
1519 1526 $default = $this->getGroupControlQueryArgs();
1527 + $args = [];
1520 1528 if ($posts_per_page) {
1521 1529 $args['posts_per_page'] = $posts_per_page;
1522 - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page'));
1523 1530 }
1524 1531 $args = array_merge($default, $args);
1525 1532 $this->_query = new WP_Query($args);
1526 1533 }
@@ -1549,9 +1556,10 @@
1549 1556 if (!$this->get_settings('show_title')) {
1550 1557 return;
1551 1558 }
1552 1559
1553 - 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'])), esc_url( get_permalink() ), esc_html( get_the_title() ));
1560 + $title = get_the_title();
1561 + 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'])), esc_url( get_permalink() ), esc_html( $title ), esc_attr( $title ));
1554 1562 }
1555 1563
1556 1564 public function render_category() {
1557 1565
@@ -1559,9 +1567,9 @@
1559 1567 return;
1560 1568 }
1561 1569 ?>
1562 1570 <div class="upk-category" data-swiper-parallax-x="-150" data-swiper-parallax-duration="1000">
1563 - <?php echo upk_get_category($this->get_settings('posts_source')); ?>
1571 + <?php echo wp_kses_post( upk_get_category($this->get_settings('posts_source')) ); ?>
1564 1572 </div>
1565 1573 <?php
1566 1574 }
1567 1575
@@ -1655,9 +1663,9 @@
1655 1663 $this->add_render_attribute('swiper', 'class', 'swiper-carousel swiper');
1656 1664
1657 1665 ?>
1658 1666 <div <?php $this->print_render_attribute_string('crystal-slider'); ?>>
1659 - <div <?php echo $this->get_render_attribute_string('swiper'); ?>>
1667 + <div <?php $this->print_render_attribute_string('swiper'); ?>>
1660 1668 <div class="swiper-wrapper">
1661 1669 <?php
1662 1670 }
1663 1671
@@ -1668,12 +1676,12 @@
1668 1676 </div>
1669 1677 <?php if ($settings['show_navigation']) : ?>
1670 1678 <div class="upk-navigation-wrap">
1671 1679 <div class="upk-navigation-prev">
1672 - <i class="upk-icon-arrow-left-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1680 + <i class="upk-icon-arrow-left-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1673 1681 </div>
1674 1682 <div class="upk-navigation-next">
1675 - <i class="upk-icon-arrow-right-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1683 + <i class="upk-icon-arrow-right-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1676 1684 </div>
1677 1685 </div>
1678 1686 <?php endif; ?>
1679 1687
@@ -1712,16 +1720,16 @@
1712 1720 <?php if ($settings['show_author']) : ?>
1713 1721 <?php $this->render_author(); ?>
1714 1722 <?php endif; ?>
1715 1723 <?php if ($settings['show_date']) : ?>
1716 - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1724 + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1717 1725 <?php $this->render_date(); ?>
1718 1726 </div>
1719 1727 <?php endif; ?>
1720 1728 <?php if (_is_upk_pro_activated()) :
1721 1729 if ('yes' === $settings['show_reading_time']) : ?>
1722 - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1723 - <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'] ) ); ?>
1730 + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1731 + <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?>
1724 1732 </div>
1725 1733 <?php endif; ?>
1726 1734 <?php endif; ?>
1727 1735 </div>