WordPress.org

Make WordPress Core


Ignore:
Timestamp:
05/25/2017 03:18:04 PM (2 years ago)
Author:
obenland
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/widgets/class-wp-widget-media-image.php

    r40835 r40839  
    202202                $size = array( $instance['width'], $instance['height'] );
    203203            }
     204            $image_attributes['class'] .= sprintf( ' attachment-%1$s size-%1$s', is_array( $size ) ? join( 'x', $size ) : $size );
    204205
    205206            $image = wp_get_attachment_image( $attachment->ID, $size, false, $image_attributes );
Note: See TracChangeset for help on using the changeset viewer.