mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-05-19 18:54:26 +00:00
Default themes: Improve styles for 4.8 widgets
Mostly adds styles for lists and mediaelement.js instances within widgets. Adds size classname to image widget so themes can customize their display. Props Soean, obenland, celloexpressions, ocean90, karmatosed. Fixes #40745. git-svn-id: https://develop.svn.wordpress.org/trunk@40839 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -201,6 +201,7 @@ class WP_Widget_Media_Image extends WP_Widget_Media {
|
||||
if ( 'custom' === $size || ! in_array( $size, array_merge( get_intermediate_image_sizes(), array( 'full' ) ), true ) ) {
|
||||
$size = array( $instance['width'], $instance['height'] );
|
||||
}
|
||||
$image_attributes['class'] .= sprintf( ' attachment-%1$s size-%1$s', is_array( $size ) ? join( 'x', $size ) : $size );
|
||||
|
||||
$image = wp_get_attachment_image( $attachment->ID, $size, false, $image_attributes );
|
||||
|
||||
|
||||
Reference in New Issue
Block a user