| @@ -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 | |
| @@ -1519,9 +1526,8 @@ | ||
| 1519 | 1526 | $default = $this->getGroupControlQueryArgs(); |
| 1520 | 1527 | $args = []; |
| 1521 | 1528 | if ($posts_per_page) { |
| 1522 | 1529 | $args['posts_per_page'] = $posts_per_page; |
| 1523 | - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page')); | |
| 1524 | 1530 | } |
| 1525 | 1531 | $args = array_merge($default, $args); |
| 1526 | 1532 | $this->_query = new WP_Query($args); |
| 1527 | 1533 | } |
| @@ -1550,9 +1556,10 @@ | ||
| 1550 | 1556 | if (!$this->get_settings('show_title')) { |
| 1551 | 1557 | return; |
| 1552 | 1558 | } |
| 1553 | 1559 | |
| 1554 | - 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 )); | |
| 1555 | 1562 | } |
| 1556 | 1563 | |
| 1557 | 1564 | public function render_category() { |
| 1558 | 1565 | |
| @@ -1560,9 +1567,9 @@ | ||
| 1560 | 1567 | return; |
| 1561 | 1568 | } |
| 1562 | 1569 | ?> |
| 1563 | 1570 | <div class="upk-category" data-swiper-parallax-x="-150" data-swiper-parallax-duration="1000"> |
| 1564 | - <?php echo upk_get_category($this->get_settings('posts_source')); ?> | |
| 1571 | + <?php echo wp_kses_post( upk_get_category($this->get_settings('posts_source')) ); ?> | |
| 1565 | 1572 | </div> |
| 1566 | 1573 | <?php |
| 1567 | 1574 | } |
| 1568 | 1575 | |
| @@ -1669,12 +1676,12 @@ | ||
| 1669 | 1676 | </div> |
| 1670 | 1677 | <?php if ($settings['show_navigation']) : ?> |
| 1671 | 1678 | <div class="upk-navigation-wrap"> |
| 1672 | 1679 | <div class="upk-navigation-prev"> |
| 1673 | - <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> | |
| 1674 | 1681 | </div> |
| 1675 | 1682 | <div class="upk-navigation-next"> |
| 1676 | - <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> | |
| 1677 | 1684 | </div> |
| 1678 | 1685 | </div> |
| 1679 | 1686 | <?php endif; ?> |
| 1680 | 1687 | |
| @@ -1713,15 +1720,15 @@ | ||
| 1713 | 1720 | <?php if ($settings['show_author']) : ?> |
| 1714 | 1721 | <?php $this->render_author(); ?> |
| 1715 | 1722 | <?php endif; ?> |
| 1716 | 1723 | <?php if ($settings['show_date']) : ?> |
| 1717 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1724 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1718 | 1725 | <?php $this->render_date(); ?> |
| 1719 | 1726 | </div> |
| 1720 | 1727 | <?php endif; ?> |
| 1721 | 1728 | <?php if (_is_upk_pro_activated()) : |
| 1722 | 1729 | if ('yes' === $settings['show_reading_time']) : ?> |
| 1723 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1730 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1724 | 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' ) ); ?> |
| 1725 | 1732 | </div> |
| 1726 | 1733 | <?php endif; ?> |
| 1727 | 1734 | <?php endif; ?> |