← All changes
|
modules/buzz-list-carousel/widgets/buzz-list-carousel.php
+11
-9
4.1.2
→
4.5.6
View file →
| @@ -113,8 +113,9 @@ | ||
| 113 | 113 | $this->add_group_control( |
| 114 | 114 | Group_Control_Image_Size::get_type(), |
| 115 | 115 | [ |
| 116 | 116 | 'name' => 'primary_thumbnail', |
| 117 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 117 | 118 | 'exclude' => ['custom'], |
| 118 | 119 | 'default' => 'medium', |
| 119 | 120 | ] |
| 120 | 121 | ); |
| @@ -243,8 +244,11 @@ | ||
| 243 | 244 | ], |
| 244 | 245 | 'default' => [ |
| 245 | 246 | 'size' => 6, |
| 246 | 247 | ], |
| 248 | + 'condition' => [ | |
| 249 | + 'posts_source!' => 'current_query', | |
| 250 | + ] | |
| 247 | 251 | ] |
| 248 | 252 | ); |
| 249 | 253 | |
| 250 | 254 | $this->register_query_builder_controls(); |
| @@ -885,9 +889,8 @@ | ||
| 885 | 889 | $default = $this->getGroupControlQueryArgs(); |
| 886 | 890 | $args = []; |
| 887 | 891 | if ($posts_per_page) { |
| 888 | 892 | $args['posts_per_page'] = $posts_per_page; |
| 889 | - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page')); | |
| 890 | 893 | } |
| 891 | 894 | $args = array_merge($default, $args); |
| 892 | 895 | $this->_query = new WP_Query($args); |
| 893 | 896 | } |
| @@ -900,9 +903,9 @@ | ||
| 900 | 903 | ?> |
| 901 | 904 | <div class="upk-author-wrap"> |
| 902 | 905 | <span class="upk-by"><?php echo esc_html_x('by', 'Frontend', 'ultimate-post-kit'); ?></span> |
| 903 | 906 | <a class="upk-author-name" href="<?php echo esc_url( get_author_posts_url(get_the_author_meta('ID')) ); ?>"> |
| 904 | - <?php echo esc_html( esc_html( get_the_author() ) ); ?> | |
| 907 | + <?php echo esc_html( get_the_author() ); ?> | |
| 905 | 908 | </a> |
| 906 | 909 | </div> |
| 907 | 910 | <?php |
| 908 | 911 | } |
| @@ -911,13 +914,12 @@ | ||
| 911 | 914 | |
| 912 | 915 | if (!$this->get_settings('show_comments')) { |
| 913 | 916 | return; |
| 914 | 917 | } |
| 915 | - ?> | |
| 918 | + ?> | |
| 916 | 919 | |
| 917 | 920 | <div class="upk-comments"> |
| 918 | - <?php echo get_comments_number($id) ?> | |
| 919 | - <?php echo esc_html_x('Comments', 'Frontend', 'ultimate-post-kit') ?> | |
| 921 | + <?php echo esc_html( $this->upk_get_formatted_comments_count( $id ) ); ?> | |
| 920 | 922 | </div> |
| 921 | 923 | |
| 922 | 924 | <?php |
| 923 | 925 | } |
| @@ -948,9 +950,9 @@ | ||
| 948 | 950 | <div class="upk-img-wrap"> |
| 949 | 951 | <?php $this->render_image(get_post_thumbnail_id($post_id), $image_size); ?> |
| 950 | 952 | </div> |
| 951 | 953 | <div class="upk-content"> |
| 952 | - <div class="upk-count"><?php printf("%2d", $slide_index); ?></div> | |
| 954 | + <div class="upk-count"><?php printf("%2d", esc_attr($slide_index)); ?></div> | |
| 953 | 955 | <div class="upk-inner"> |
| 954 | 956 | <?php $this->render_category(); ?> |
| 955 | 957 | <?php $this->render_title(substr($this->get_name(), 4)); ?> |
| 956 | 958 | <?php if ($settings['show_author'] or $settings['show_comments'] or $settings['show_date'] or $settings['show_reading_time']) : ?> |
| @@ -959,9 +961,9 @@ | ||
| 959 | 961 | <?php $this->render_author(); ?> |
| 960 | 962 | <?php endif; ?> |
| 961 | 963 | |
| 962 | 964 | <?php if ($settings['show_date']) : ?> |
| 963 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 965 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 964 | 966 | <?php $this->render_date(); ?> |
| 965 | 967 | </div> |
| 966 | 968 | <?php endif; ?> |
| 967 | 969 | |
| @@ -966,9 +968,9 @@ | ||
| 966 | 968 | <?php endif; ?> |
| 967 | 969 | |
| 968 | 970 | <?php if (_is_upk_pro_activated()) : |
| 969 | 971 | if ('yes' === $settings['show_reading_time']) : ?> |
| 970 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 972 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 971 | 973 | <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?> |
| 972 | 974 | </div> |
| 973 | 975 | <?php endif; ?> |
| 974 | 976 | <?php endif; ?> |
| @@ -973,9 +975,9 @@ | ||
| 973 | 975 | <?php endif; ?> |
| 974 | 976 | <?php endif; ?> |
| 975 | 977 | |
| 976 | 978 | <?php if ($settings['show_comments']) : ?> |
| 977 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 979 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 978 | 980 | <?php $this->render_comments($post_id); ?> |
| 979 | 981 | </div> |
| 980 | 982 | <?php endif; ?> |
| 981 | 983 | |