| @@ -148,8 +148,9 @@ | ||
| 148 | 148 | $this->add_group_control( |
| 149 | 149 | Group_Control_Image_Size::get_type(), |
| 150 | 150 | [ |
| 151 | 151 | 'name' => 'primary_thumbnail', |
| 152 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 152 | 153 | 'exclude' => ['custom'], |
| 153 | 154 | 'default' => 'medium', |
| 154 | 155 | ] |
| 155 | 156 | ); |
| @@ -379,9 +380,9 @@ | ||
| 379 | 380 | [ |
| 380 | 381 | 'label' => esc_html__('Glass Morphism', 'ultimate-post-kit'), |
| 381 | 382 | 'type' => Controls_Manager::SWITCHER, |
| 382 | 383 | // translators: %1s: Opening anchor tag with link to MDN backdrop-filter documentation, %2s: Closing anchor tag |
| 383 | - '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>'), | |
| 384 | + '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>'), | |
| 384 | 385 | 'default' => 'yes', |
| 385 | 386 | ] |
| 386 | 387 | ); |
| 387 | 388 | |
| @@ -1240,9 +1241,9 @@ | ||
| 1240 | 1241 | [ |
| 1241 | 1242 | 'label' => esc_html__('Glassmorphism', 'ultimate-post-kit'), |
| 1242 | 1243 | 'type' => Controls_Manager::SWITCHER, |
| 1243 | 1244 | // translators: %1s: Opening anchor tag with link to MDN backdrop-filter documentation, %2s: Closing anchor tag |
| 1244 | - '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>'), | |
| 1245 | + '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>'), | |
| 1245 | 1246 | 'default' => 'yes', |
| 1246 | 1247 | 'separator' => 'before' |
| 1247 | 1248 | ] |
| 1248 | 1249 | ); |
| @@ -1276,8 +1277,9 @@ | ||
| 1276 | 1277 | [ |
| 1277 | 1278 | 'name' => 'post_format_background', |
| 1278 | 1279 | 'label' => esc_html__('Background', 'ultimate-post-kit'), |
| 1279 | 1280 | 'types' => ['classic', 'gradient'], |
| 1281 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 1280 | 1282 | 'exclude' => ['image'], |
| 1281 | 1283 | 'selector' => '{{WRAPPER}} .upk-alex-carousel .upk-post-format a', |
| 1282 | 1284 | 'fields_options' => [ |
| 1283 | 1285 | 'background' => [ |
| @@ -1415,9 +1417,9 @@ | ||
| 1415 | 1417 | <?php endif; ?> |
| 1416 | 1418 | |
| 1417 | 1419 | <div class="upk-flex upk-flex-middle upk-date-reading-wrap"> |
| 1418 | 1420 | <?php if ('yes' === $settings['show_date']) : ?> |
| 1419 | - <div data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1421 | + <div data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1420 | 1422 | <?php $this->render_date(); ?> |
| 1421 | 1423 | </div> |
| 1422 | 1424 | <?php endif; ?> |
| 1423 | 1425 | |
| @@ -1422,9 +1424,9 @@ | ||
| 1422 | 1424 | <?php endif; ?> |
| 1423 | 1425 | |
| 1424 | 1426 | <?php if (_is_upk_pro_activated()) : |
| 1425 | 1427 | if ('yes' === $settings['show_reading_time']) : ?> |
| 1426 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1428 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1427 | 1429 | <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?> |
| 1428 | 1430 | </div> |
| 1429 | 1431 | <?php endif; ?> |
| 1430 | 1432 | <?php endif; ?> |
| @@ -1442,9 +1444,9 @@ | ||
| 1442 | 1444 | $this->render_header_attribute('alex'); |
| 1443 | 1445 | |
| 1444 | 1446 | ?> |
| 1445 | 1447 | <div <?php $this->print_render_attribute_string('carousel'); ?>> |
| 1446 | - <div class="upk-alex-wrap upk-content-<?php echo esc_html($settings['content_position']) ?>"> | |
| 1448 | + <div class="upk-alex-wrap upk-content-<?php echo esc_attr($settings['content_position']) ?>"> | |
| 1447 | 1449 | <div <?php $this->print_render_attribute_string('swiper'); ?>> |
| 1448 | 1450 | <div class="swiper-wrapper"> |
| 1449 | 1451 | <?php |
| 1450 | 1452 | } |
| @@ -1452,10 +1454,14 @@ | ||
| 1452 | 1454 | public function render_post_grid_item($post_id, $image_size) { |
| 1453 | 1455 | $settings = $this->get_settings_for_display(); |
| 1454 | 1456 | |
| 1455 | 1457 | if ('yes' == $settings['global_link']) { |
| 1456 | - | |
| 1457 | - $this->add_render_attribute('grid-item', 'onclick', "window.open('" . esc_url(get_permalink()) . "', '_self')", true); | |
| 1458 | + $this->add_render_attribute( | |
| 1459 | + 'grid-item', | |
| 1460 | + 'onclick', | |
| 1461 | + sprintf( "window.open('%s', '_self')", esc_js( esc_url( get_permalink() ) ) ), | |
| 1462 | + true | |
| 1463 | + ); | |
| 1458 | 1464 | } |
| 1459 | 1465 | |
| 1460 | 1466 | $this->add_render_attribute('grid-item', 'class', 'upk-item swiper-slide', true); |
| 1461 | 1467 | |