| @@ -179,8 +179,9 @@ | ||
| 179 | 179 | $this->add_group_control( |
| 180 | 180 | Group_Control_Image_Size::get_type(), |
| 181 | 181 | [ |
| 182 | 182 | 'name' => 'primary_thumbnail', |
| 183 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 183 | 184 | 'exclude' => ['custom'], |
| 184 | 185 | 'default' => 'medium', |
| 185 | 186 | ] |
| 186 | 187 | ); |
| @@ -209,8 +210,11 @@ | ||
| 209 | 210 | ], |
| 210 | 211 | 'default' => [ |
| 211 | 212 | 'size' => 6, |
| 212 | 213 | ], |
| 214 | + 'condition' => [ | |
| 215 | + 'posts_source!' => 'current_query', | |
| 216 | + ] | |
| 213 | 217 | ] |
| 214 | 218 | ); |
| 215 | 219 | |
| 216 | 220 | $this->register_query_builder_controls(); |
| @@ -312,9 +316,9 @@ | ||
| 312 | 316 | [ |
| 313 | 317 | 'label' => esc_html__('Glassmorphism', 'ultimate-post-kit'), |
| 314 | 318 | 'type' => Controls_Manager::SWITCHER, |
| 315 | 319 | // translators: %1s: Opening anchor tag with link to MDN backdrop-filter documentation, %2s: Closing anchor tag |
| 316 | - 'description' => sprintf(__('This feature will not work in the Firefox browser untill you enable browser compatibility so please %1s look here %2s', 'ultimate-post-kit'), '<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility" target="_blank">', '</a>'), | |
| 320 | + 'description' => sprintf(__('This feature will not work in the Firefox browser untill you enable browser compatibility so please %1$s look here %2$s', 'ultimate-post-kit'), '<a href="https://developer.mozilla.org/en-US/docs/Web/CSS/backdrop-filter#Browser_compatibility" target="_blank">', '</a>'), | |
| 317 | 321 | 'default' => 'yes', |
| 318 | 322 | 'condition' => [ |
| 319 | 323 | 'content_style' => '2', |
| 320 | 324 | ] |
| @@ -705,9 +709,9 @@ | ||
| 705 | 709 | Group_Control_Typography::get_type(), |
| 706 | 710 | [ |
| 707 | 711 | 'name' => 'author_typography', |
| 708 | 712 | 'label' => esc_html__('Typography', 'ultimate-post-kit'), |
| 709 | - 'selector' => '{{WRAPPER}} .upk-hazel-carousel .upk-meta', | |
| 713 | + 'selector' => '{{WRAPPER}} .upk-hazel-carousel .upk-meta, {{WRAPPER}} .upk-hazel-carousel .upk-meta *', | |
| 710 | 714 | ] |
| 711 | 715 | ); |
| 712 | 716 | |
| 713 | 717 | $this->end_controls_section(); |
| @@ -880,9 +884,8 @@ | ||
| 880 | 884 | $default = $this->getGroupControlQueryArgs(); |
| 881 | 885 | $args = []; |
| 882 | 886 | if ($posts_per_page) { |
| 883 | 887 | $args['posts_per_page'] = $posts_per_page; |
| 884 | - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page')); | |
| 885 | 888 | } |
| 886 | 889 | $args = array_merge($default, $args); |
| 887 | 890 | $this->_query = new WP_Query($args); |
| 888 | 891 | } |
| @@ -898,9 +901,9 @@ | ||
| 898 | 901 | $image_src = $image_src[0]; |
| 899 | 902 | } |
| 900 | 903 | |
| 901 | 904 | ?> |
| 902 | - <img class="upk-blog-image" src="<?php echo esc_url($image_src); ?>" alt="<?php echo esc_html(get_the_title()); ?>"> | |
| 905 | + <img class="upk-blog-image" src="<?php echo esc_url($image_src); ?>" alt="<?php echo esc_attr(get_the_title()); ?>"> | |
| 903 | 906 | <?php |
| 904 | 907 | } |
| 905 | 908 | |
| 906 | 909 | public function render_author() { |
| @@ -910,9 +913,9 @@ | ||
| 910 | 913 | } |
| 911 | 914 | |
| 912 | 915 | ?> |
| 913 | 916 | <div class="upk-blog-author"> |
| 914 | - <span class="by"><?php echo esc_html__('by', 'ultimate-post-kit') ?></span> | |
| 917 | + <span class="by"><?php echo esc_html__('By', 'ultimate-post-kit') ?></span> | |
| 915 | 918 | <span class="upk-author"> |
| 916 | 919 | <a href="<?php echo esc_url( get_author_posts_url(get_the_author_meta('ID')) ); ?>"> |
| 917 | 920 | <?php echo esc_html( get_the_author() ) ?> |
| 918 | 921 | </a> |
| @@ -943,9 +946,9 @@ | ||
| 943 | 946 | |
| 944 | 947 | ?> |
| 945 | 948 | <div class="upk-blog-badge"> |
| 946 | 949 | <span> |
| 947 | - <?php echo upk_get_category($this->get_settings('posts_source')); ?> | |
| 950 | + <?php echo wp_kses_post( upk_get_category($this->get_settings('posts_source')) ); ?> | |
| 948 | 951 | </span> |
| 949 | 952 | </div> |
| 950 | 953 | <?php |
| 951 | 954 | } |
| @@ -957,9 +960,9 @@ | ||
| 957 | 960 | $this->render_header_attribute('hazel'); |
| 958 | 961 | |
| 959 | 962 | ?> |
| 960 | 963 | <div <?php $this->print_render_attribute_string('carousel'); ?>> |
| 961 | - <div class="upk-post-grid upk-pg-text-position-<?php echo esc_html($settings['content_position']) ?> upk-content-style-<?php echo esc_html($settings['content_style']) ?>"> | |
| 964 | + <div class="upk-post-grid upk-pg-text-position-<?php echo esc_attr($settings['content_position']) ?> upk-content-style-<?php echo esc_attr($settings['content_style']) ?>"> | |
| 962 | 965 | <div <?php $this->print_render_attribute_string('swiper'); ?>> |
| 963 | 966 | <div class="swiper-wrapper"> |
| 964 | 967 | <?php |
| 965 | 968 | } |
| @@ -992,9 +995,9 @@ | ||
| 992 | 995 | <div class="upk-meta"> |
| 993 | 996 | <?php $this->render_author(); ?> |
| 994 | 997 | |
| 995 | 998 | <?php if ($settings['show_date']) : ?> |
| 996 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 999 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 997 | 1000 | <div class="upk-date"> |
| 998 | 1001 | <i class="upk-icon-calendar" aria-hidden="true"></i><?php $this->render_date(); ?> |
| 999 | 1002 | </div> |
| 1000 | 1003 | |
| @@ -1008,9 +1011,9 @@ | ||
| 1008 | 1011 | <?php endif; ?> |
| 1009 | 1012 | |
| 1010 | 1013 | <?php if (_is_upk_pro_activated()) : |
| 1011 | 1014 | if ('yes' === $settings['show_reading_time']) : ?> |
| 1012 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1015 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1013 | 1016 | <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?> |
| 1014 | 1017 | </div> |
| 1015 | 1018 | <?php endif; ?> |
| 1016 | 1019 | <?php endif; ?> |