| @@ -109,8 +109,9 @@ | ||
| 109 | 109 | $this->add_group_control( |
| 110 | 110 | Group_Control_Image_Size::get_type(), |
| 111 | 111 | [ |
| 112 | 112 | 'name' => 'primary_thumbnail', |
| 113 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 113 | 114 | 'exclude' => ['custom'], |
| 114 | 115 | 'default' => 'full', |
| 115 | 116 | ] |
| 116 | 117 | ); |
| @@ -200,8 +201,11 @@ | ||
| 200 | 201 | ], |
| 201 | 202 | 'default' => [ |
| 202 | 203 | 'size' => 3, |
| 203 | 204 | ], |
| 205 | + 'condition' => [ | |
| 206 | + 'posts_source!' => 'current_query', | |
| 207 | + ] | |
| 204 | 208 | ] |
| 205 | 209 | ); |
| 206 | 210 | |
| 207 | 211 | $this->register_query_builder_controls(); |
| @@ -239,10 +243,13 @@ | ||
| 239 | 243 | |
| 240 | 244 | $this->add_control( |
| 241 | 245 | 'pauseonhover', |
| 242 | 246 | [ |
| 243 | - 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'), | |
| 244 | - 'type' => Controls_Manager::SWITCHER, | |
| 247 | + 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'), | |
| 248 | + 'type' => Controls_Manager::SWITCHER, | |
| 249 | + 'condition' => [ | |
| 250 | + 'autoplay' => 'yes', | |
| 251 | + ], | |
| 245 | 252 | ] |
| 246 | 253 | ); |
| 247 | 254 | |
| 248 | 255 | $this->add_control( |
| @@ -395,9 +402,9 @@ | ||
| 395 | 402 | $this->add_group_control( |
| 396 | 403 | Group_Control_Text_Stroke::get_type(), |
| 397 | 404 | [ |
| 398 | 405 | 'name' => 'title_text_stroke', |
| 399 | - 'label' => __('Text Stroke', 'ultimate-post-kit') . BDTUPK_NC, | |
| 406 | + 'label' => __('Text Stroke', 'ultimate-post-kit'), | |
| 400 | 407 | 'selector' => '{{WRAPPER}} .upk-noxe-slider .upk-title', |
| 401 | 408 | ] |
| 402 | 409 | ); |
| 403 | 410 | |
| @@ -825,9 +832,8 @@ | ||
| 825 | 832 | $default = $this->getGroupControlQueryArgs(); |
| 826 | 833 | $args = []; |
| 827 | 834 | if ($posts_per_page) { |
| 828 | 835 | $args['posts_per_page'] = $posts_per_page; |
| 829 | - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page')); | |
| 830 | 836 | } |
| 831 | 837 | $args = array_merge($default, $args); |
| 832 | 838 | $this->_query = new WP_Query($args); |
| 833 | 839 | } |
| @@ -856,9 +862,9 @@ | ||
| 856 | 862 | return; |
| 857 | 863 | } |
| 858 | 864 | ?> |
| 859 | 865 | <div class="upk-noxe-category" data-swiper-parallax-opacity="0.5"> |
| 860 | - <?php echo upk_get_category($this->get_settings('posts_source')); ?> | |
| 866 | + <?php echo wp_kses_post( upk_get_category($this->get_settings('posts_source')) ); ?> | |
| 861 | 867 | </div> |
| 862 | 868 | <?php |
| 863 | 869 | } |
| 864 | 870 | |
| @@ -881,13 +887,12 @@ | ||
| 881 | 887 | |
| 882 | 888 | if (!$this->get_settings('show_comments')) { |
| 883 | 889 | return; |
| 884 | 890 | } |
| 885 | - ?> | |
| 891 | + ?> | |
| 886 | 892 | |
| 887 | 893 | <div class="upk-noxe-comments"> |
| 888 | - <?php echo get_comments_number($id) ?> | |
| 889 | - <?php echo esc_html__('Comments', 'ultimate-post-kit') ?> | |
| 894 | + <?php echo esc_html( $this->upk_get_formatted_comments_count( $id ) ); ?> | |
| 890 | 895 | </div> |
| 891 | 896 | |
| 892 | 897 | <?php |
| 893 | 898 | } |
| @@ -1013,9 +1018,9 @@ | ||
| 1013 | 1018 | <div class="upk-noxe-meta" data-swiper-parallax-y="-80"> |
| 1014 | 1019 | <?php $this->render_author(); ?> |
| 1015 | 1020 | |
| 1016 | 1021 | <?php if ($settings['show_comments'] == 'yes') : ?> |
| 1017 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1022 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1018 | 1023 | <?php $this->render_comments($post_id); ?> |
| 1019 | 1024 | </div> |
| 1020 | 1025 | <?php endif; ?> |
| 1021 | 1026 | |
| @@ -1020,9 +1025,9 @@ | ||
| 1020 | 1025 | <?php endif; ?> |
| 1021 | 1026 | |
| 1022 | 1027 | <?php if (_is_upk_pro_activated()) : |
| 1023 | 1028 | if ('yes' === $settings['show_reading_time']) : ?> |
| 1024 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1029 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1025 | 1030 | <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?> |
| 1026 | 1031 | </div> |
| 1027 | 1032 | <?php endif; ?> |
| 1028 | 1033 | <?php endif; ?> |