| @@ -161,8 +161,9 @@ | ||
| 161 | 161 | $this->add_group_control( |
| 162 | 162 | Group_Control_Image_Size::get_type(), |
| 163 | 163 | [ |
| 164 | 164 | 'name' => 'primary_thumbnail', |
| 165 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 165 | 166 | 'exclude' => ['custom'], |
| 166 | 167 | 'default' => 'medium', |
| 167 | 168 | ] |
| 168 | 169 | ); |
| @@ -354,8 +355,9 @@ | ||
| 354 | 355 | [ |
| 355 | 356 | 'name' => 'overlay_color', |
| 356 | 357 | 'label' => esc_html__('Background', 'ultimate-post-kit'), |
| 357 | 358 | 'types' => ['classic', 'gradient'], |
| 359 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 358 | 360 | 'exclude' => ['image'], |
| 359 | 361 | 'selector' => '{{WRAPPER}} .upk-gratis-grid .upk-img-wrap::before', |
| 360 | 362 | 'fields_options' => [ |
| 361 | 363 | 'background' => [ |
| @@ -444,8 +446,9 @@ | ||
| 444 | 446 | [ |
| 445 | 447 | 'name' => 'overlay_hover_color', |
| 446 | 448 | 'label' => esc_html__('Background', 'ultimate-post-kit'), |
| 447 | 449 | 'types' => ['classic', 'gradient'], |
| 450 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 448 | 451 | 'exclude' => ['image'], |
| 449 | 452 | 'selector' => '{{WRAPPER}} .upk-gratis-grid .upk-img-wrap::after', |
| 450 | 453 | 'fields_options' => [ |
| 451 | 454 | 'background' => [ |
| @@ -506,8 +509,9 @@ | ||
| 506 | 509 | [ |
| 507 | 510 | 'name' => 'overlay_active_color', |
| 508 | 511 | 'label' => esc_html__('Background', 'ultimate-post-kit'), |
| 509 | 512 | 'types' => ['classic', 'gradient'], |
| 513 | + // phpcs:ignore WordPressVIPMinimum.Performance.WPQueryParams.PostNotIn_exclude -- Elementor widget query built from user-configured controls; expected behaviour. | |
| 510 | 514 | 'exclude' => ['image'], |
| 511 | 515 | 'selector' => '{{WRAPPER}} .upk-gratis-grid .upk-item.active .upk-img-wrap::after', |
| 512 | 516 | ] |
| 513 | 517 | ); |
| @@ -1207,9 +1211,9 @@ | ||
| 1207 | 1211 | } |
| 1208 | 1212 | |
| 1209 | 1213 | ?> |
| 1210 | 1214 | |
| 1211 | - <img class="upk-img" src="<?php echo esc_url($image_src); ?>" alt="<?php echo esc_html(get_the_title()); ?>"> | |
| 1215 | + <img class="upk-img" src="<?php echo esc_url($image_src); ?>" alt="<?php echo esc_attr(get_the_title()); ?>"> | |
| 1212 | 1216 | |
| 1213 | 1217 | <?php |
| 1214 | 1218 | } |
| 1215 | 1219 | |
| @@ -1220,9 +1224,9 @@ | ||
| 1220 | 1224 | return; |
| 1221 | 1225 | } |
| 1222 | 1226 | ?> |
| 1223 | 1227 | <div class="upk-category"> |
| 1224 | - <?php echo upk_get_category($this->get_settings('posts_source')); ?> | |
| 1228 | + <?php echo wp_kses_post( upk_get_category($this->get_settings('posts_source')) ); ?> | |
| 1225 | 1229 | </div> |
| 1226 | 1230 | <?php |
| 1227 | 1231 | } |
| 1228 | 1232 | |
| @@ -1273,9 +1277,12 @@ | ||
| 1273 | 1277 | <span><?php echo esc_html__('by', 'ultimate-post-kit') ?></span> |
| 1274 | 1278 | <a |
| 1275 | 1279 | class="upk-author-name" |
| 1276 | 1280 | href="<?php echo esc_url( get_author_posts_url(get_the_author_meta('ID')) ); ?>" |
| 1277 | - aria-label="<?php echo esc_attr( sprintf( __( 'View all posts by %s', 'ultimate-post-kit' ), get_the_author() ) ); ?>" | |
| 1281 | + aria-label="<?php | |
| 1282 | + /* translators: %s: author name */ | |
| 1283 | + echo esc_attr( sprintf( __( 'View all posts by %s', 'ultimate-post-kit' ), get_the_author() ) ); | |
| 1284 | + ?>" | |
| 1278 | 1285 | > |
| 1279 | 1286 | <span><?php echo esc_html( get_the_author() ); ?></span> |
| 1280 | 1287 | </a> |
| 1281 | 1288 | </div> |
| @@ -1310,9 +1317,9 @@ | ||
| 1310 | 1317 | <?php if ($settings['show_date'] or $settings['show_reading_time']) : ?> |
| 1311 | 1318 | <div class="upk-date-reading upk-flex upk-flex-middle"> |
| 1312 | 1319 | <?php $this->render_date(); ?> |
| 1313 | 1320 | <?php if ('yes' === $settings['show_reading_time']) : ?> |
| 1314 | - <div class="upk-reading-time" data-separator="<?php echo esc_html($settings['meta_separator']); ?>"> | |
| 1321 | + <div class="upk-reading-time" data-separator="<?php echo esc_attr($settings['meta_separator']); ?>"> | |
| 1315 | 1322 | <?php echo esc_html( ultimate_post_kit_reading_time( get_the_content(), $settings['avg_reading_speed'], $settings['hide_seconds'] ?? 'no', $settings['hide_minutes'] ?? 'no' ) ); ?> |
| 1316 | 1323 | </div> |
| 1317 | 1324 | <?php endif; ?> |
| 1318 | 1325 | </div> |
| @@ -1445,8 +1452,9 @@ | ||
| 1445 | 1452 | |
| 1446 | 1453 | $i++; |
| 1447 | 1454 | $active_item = ''; |
| 1448 | 1455 | if (_is_upk_pro_activated()) { |
| 1456 | + // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedHooknameFound -- established hook name relied on across the plugin family; renaming would break integration. | |
| 1449 | 1457 | $active_item = apply_filters('gratis_grid_active_item', $this, $i); |
| 1450 | 1458 | } |
| 1451 | 1459 | |
| 1452 | 1460 | ?> |