| @@ -165,8 +165,9 @@ | ||
| 165 | 165 | $this->add_group_control( |
| 166 | 166 | Group_Control_Image_Size::get_type(), |
| 167 | 167 | [ |
| 168 | 168 | 'name' => 'primary_thumbnail', |
| 169 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 169 | 170 | 'exclude' => ['custom'], |
| 170 | 171 | 'default' => 'full', |
| 171 | 172 | ] |
| 172 | 173 | ); |
| @@ -261,8 +262,11 @@ | ||
| 261 | 262 | ], |
| 262 | 263 | 'default' => [ |
| 263 | 264 | 'size' => 12, |
| 264 | 265 | ], |
| 266 | + 'condition' => [ | |
| 267 | + 'posts_source!' => 'current_query', | |
| 268 | + ] | |
| 265 | 269 | ] |
| 266 | 270 | ); |
| 267 | 271 | |
| 268 | 272 | $this->register_query_builder_controls(); |
| @@ -300,10 +304,13 @@ | ||
| 300 | 304 | |
| 301 | 305 | $this->add_control( |
| 302 | 306 | 'pauseonhover', |
| 303 | 307 | [ |
| 304 | - 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'), | |
| 305 | - 'type' => Controls_Manager::SWITCHER, | |
| 308 | + 'label' => esc_html__('Pause on Hover', 'ultimate-post-kit'), | |
| 309 | + 'type' => Controls_Manager::SWITCHER, | |
| 310 | + 'condition' => [ | |
| 311 | + 'autoplay' => 'yes', | |
| 312 | + ], | |
| 306 | 313 | ] |
| 307 | 314 | ); |
| 308 | 315 | |
| 309 | 316 | $this->add_control( |
| @@ -382,8 +389,9 @@ | ||
| 382 | 389 | [ |
| 383 | 390 | 'name' => 'overlay_color', |
| 384 | 391 | 'label' => esc_html__('Background', 'ultimate-post-kit'), |
| 385 | 392 | 'types' => ['classic', 'gradient'], |
| 393 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 386 | 394 | 'exclude' => ['image'], |
| 387 | 395 | 'selector' => '{{WRAPPER}} .upk-camux-slider .upk-img-wrap::before', |
| 388 | 396 | 'fields_options' => [ |
| 389 | 397 | 'background' => [ |
| @@ -1374,9 +1382,8 @@ | ||
| 1374 | 1382 | $default = $this->getGroupControlQueryArgs(); |
| 1375 | 1383 | $args = []; |
| 1376 | 1384 | if ($posts_per_page) { |
| 1377 | 1385 | $args['posts_per_page'] = $posts_per_page; |
| 1378 | - // $args['paged'] = max(1, get_query_var('paged'), get_query_var('page')); | |
| 1379 | 1386 | } |
| 1380 | 1387 | $args = array_merge($default, $args); |
| 1381 | 1388 | $this->_query = new WP_Query($args); |
| 1382 | 1389 | } |
| @@ -1400,13 +1407,13 @@ | ||
| 1400 | 1407 | |
| 1401 | 1408 | if (!$this->get_settings('show_comments')) { |
| 1402 | 1409 | return; |
| 1403 | 1410 | } |
| 1404 | - ?> | |
| 1411 | + ?> | |
| 1405 | 1412 | |
| 1406 | 1413 | <div class="upk-comments"> |
| 1407 | - <?php echo get_comments_number($id) ?> | |
| 1408 | - <i class="upk-icon-bubble"></i> | |
| 1414 | + <?php echo esc_html( $this->upk_get_localized_comment_count( $id ) ); ?> | |
| 1415 | + <i class="upk-icon-bubble" aria-hidden="true"></i> | |
| 1409 | 1416 | </div> |
| 1410 | 1417 | |
| 1411 | 1418 | <?php |
| 1412 | 1419 | } |
| @@ -1466,12 +1473,12 @@ | ||
| 1466 | 1473 | </div> |
| 1467 | 1474 | <?php if ($settings['show_navigation']) : ?> |
| 1468 | 1475 | <div class="upk-navigation-wrap"> |
| 1469 | 1476 | <div class="upk-navigation-prev"> |
| 1470 | - <i class="upk-icon-arrow-left-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i> | |
| 1477 | + <i class="upk-icon-arrow-left-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i> | |
| 1471 | 1478 | </div> |
| 1472 | 1479 | <div class="upk-navigation-next"> |
| 1473 | - <i class="upk-icon-arrow-right-<?php echo esc_html($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i> | |
| 1480 | + <i class="upk-icon-arrow-right-<?php echo esc_attr($settings['nav_arrows_icon']); ?>" aria-hidden="true"></i> | |
| 1474 | 1481 | </div> |
| 1475 | 1482 | </div> |
| 1476 | 1483 | <?php endif; ?> |
| 1477 | 1484 | </div> |
| @@ -1516,15 +1523,15 @@ | ||
| 1516 | 1523 | <?php if ($settings['show_author']) : ?> |
| 1517 | 1524 | <?php $this->render_author(); ?> |
| 1518 | 1525 | <?php endif; ?> |
| 1519 | 1526 | <?php if ($settings['show_date']) : ?> |
| 1520 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1527 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1521 | 1528 | <?php $this->render_date(); ?> |
| 1522 | 1529 | </div> |
| 1523 | 1530 | <?php endif; ?> |
| 1524 | 1531 | <?php if (_is_upk_pro_activated()) : |
| 1525 | 1532 | if ('yes' === $settings['show_reading_time']) : ?> |
| 1526 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1533 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1527 | 1534 | <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?> |
| 1528 | 1535 | </div> |
| 1529 | 1536 | <?php endif; ?> |
| 1530 | 1537 | <?php endif; ?> |