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/carbon-slider/widgets/carbon-slider.php +19 -13 4.0.9 → 4.5.6 View file →
@@ -149,8 +149,9 @@
149 149 $this->add_group_control(
150 150 Group_Control_Image_Size::get_type(),
151 151 [
152 152 'name' => 'primary_thumbnail',
153 + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour.
153 154 'exclude' => ['custom'],
154 155 'default' => 'full',
155 156 'condition' => [
156 157 'show_image' => 'yes'
@@ -247,8 +248,11 @@
247 248 ],
248 249 'default' => [
249 250 'size' => 12,
250 251 ],
252 + 'condition' => [
253 + 'posts_source!' => 'current_query',
254 + ]
251 255 ]
252 256 );
253 257
254 258 $this->register_query_builder_controls();
@@ -286,10 +290,13 @@
286 290
287 291 $this->add_control(
288 292 'pauseonhover',
289 293 [
290 - 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'),
291 - 'type' => Controls_Manager::SWITCHER,
294 + 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'),
295 + 'type' => Controls_Manager::SWITCHER,
296 + 'condition' => [
297 + 'autoplay' => 'yes',
298 + ],
292 299 ]
293 300 );
294 301
295 302 $this->add_control(
@@ -1237,11 +1244,11 @@
1237 1244 */
1238 1245 public function query_posts($posts_per_page) {
1239 1246
1240 1247 $default = $this->getGroupControlQueryArgs();
1248 + $args = [];
1241 1249 if ($posts_per_page) {
1242 1250 $args['posts_per_page'] = $posts_per_page;
1243 - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page'));
1244 1251 }
1245 1252 $args = array_merge($default, $args);
1246 1253 $this->_query = new WP_Query($args);
1247 1254 }
@@ -1265,13 +1272,12 @@
1265 1272
1266 1273 if (!$this->get_settings('show_comments')) {
1267 1274 return;
1268 1275 }
1269 - ?>
1276 + ?>
1270 1277
1271 1278 <div class="upk-comments">
1272 - <?php echo get_comments_number($id) ?>
1273 - <?php echo esc_html_x('Comments', 'Frontend', 'ultimate-post-kit') ?>
1279 + <?php echo esc_html( $this->upk_get_formatted_comments_count( $id ) ); ?>
1274 1280 </div>
1275 1281
1276 1282 <?php
1277 1283 }
@@ -1317,9 +1323,9 @@
1317 1323 $this->add_render_attribute('swiper', 'class', 'swiper-carousel swiper');
1318 1324
1319 1325 ?>
1320 1326 <div <?php $this->print_render_attribute_string('carbon-slider'); ?>>
1321 - <div <?php echo $this->get_render_attribute_string('swiper'); ?>>
1327 + <div <?php $this->print_render_attribute_string('swiper'); ?>>
1322 1328 <div class="swiper-wrapper">
1323 1329 <?php
1324 1330 }
1325 1331
@@ -1362,16 +1368,16 @@
1362 1368 <div class="upk-meta" data-swiper-parallax-x="-300" data-swiper-parallax-duration="1000">
1363 1369 <?php $this->render_author(); ?>
1364 1370 <?php if (_is_upk_pro_activated()) :
1365 1371 if ('yes' === $settings['show_reading_time']) : ?>
1366 - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1367 - <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'] ) ); ?>
1372 + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1373 + <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?>
1368 1374 </div>
1369 1375 <?php endif; ?>
1370 1376 <?php endif; ?>
1371 1377
1372 1378 <?php if ($settings['show_comments']) : ?>
1373 - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>">
1379 + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>">
1374 1380 <?php $this->render_comments($post_id); ?>
1375 1381 </div>
1376 1382 <?php endif; ?>
1377 1383 </div>
@@ -1416,9 +1422,9 @@
1416 1422
1417 1423 $this->add_render_attribute('swiper-thumbs', 'class', 'upk-carbon-thumbs swiper');
1418 1424
1419 1425 ?>
1420 - <div class="upk-carbon-slider-wrap" id="<?php echo esc_html($id_wrapper); ?>">
1426 + <div class="upk-carbon-slider-wrap" id="<?php echo esc_attr($id_wrapper); ?>">
1421 1427 <?php
1422 1428
1423 1429 $this->render_header();
1424 1430
@@ -1447,12 +1453,12 @@
1447 1453 </div>
1448 1454 <?php if ($settings['show_navigation']) : ?>
1449 1455 <div class="upk-navigation-wrap">
1450 1456 <div class="upk-navigation-button upk-navigation-prev">
1451 - <i class="upk-icon-arrow-left-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1457 + <i class="upk-icon-arrow-left-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1452 1458 </div>
1453 1459 <div class="upk-navigation-button upk-navigation-next">
1454 - <i class="upk-icon-arrow-right-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1460 + <i class="upk-icon-arrow-right-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i>
1455 1461 </div>
1456 1462 </div>
1457 1463 <?php endif; ?>
1458 1464