This commit is contained in:
Javier Casares 2026-08-23 07:08:42 +00:00
commit e6cba7ef6a

View file

@ -247,7 +247,17 @@ function wpvulnerability_component_icon_html( $type ) {
if ( ! isset( $icon_map[ $type ] ) ) {
return '';
}
return '<img src="' . esc_url( WPVULNERABILITY_PLUGIN_URL . 'assets/' . $icon_map[ $type ] ) . '" class="wpvuln-component-icon" alt="" />';
// Explicit dimensions: this HTML is also embedded where the plugin CSS is
// not loaded (notification emails, Site Health), and without width/height
// the SVG renders at its intrinsic 800x800 size.
$alt = sprintf(
/* translators: %s: component type (plugin, theme, core, php, ...) */
__( '%s icon', 'wpvulnerability' ),
(string) $type
);
return '<img src="' . esc_url( WPVULNERABILITY_PLUGIN_URL . 'assets/' . $icon_map[ $type ] ) . '" class="wpvuln-component-icon" width="16" height="16" alt="' . esc_attr( $alt ) . '" />';
}
/**