From b45a72a67ca3eccca07f771d28b7f3a6974744d3 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sun, 27 Sep 2015 17:54:01 +0000 Subject: [PATCH] Add `size-$size` class to `` in `wp_get_attachment_image()`. Fixes #32093. git-svn-id: https://develop.svn.wordpress.org/trunk@34629 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/media.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-includes/media.php b/src/wp-includes/media.php index ef41e201f0..b3a7ac7cd2 100644 --- a/src/wp-includes/media.php +++ b/src/wp-includes/media.php @@ -767,7 +767,7 @@ function wp_get_attachment_image($attachment_id, $size = 'thumbnail', $icon = fa $attachment = get_post($attachment_id); $default_attr = array( 'src' => $src, - 'class' => "attachment-$size_class", + 'class' => "attachment-$size_class size-$size", 'alt' => trim(strip_tags( get_post_meta($attachment_id, '_wp_attachment_image_alt', true) )), // Use Alt field first ); if ( empty($default_attr['alt']) )