Add size-$size
class to <img>
in wp_get_attachment_image()
.
Fixes #32093. git-svn-id: https://develop.svn.wordpress.org/trunk@34629 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
eb6430708b
commit
b45a72a67c
@ -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']) )
|
||||
|
Loading…
Reference in New Issue
Block a user