mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Media: Use max-width for default captions.
This alters the HTML output of the image caption shortcode to use `max-width` instead of `width` to improve compatibility with flexible layouts. Props aaronrutley, desrosj. Fixes #33981. git-svn-id: https://develop.svn.wordpress.org/trunk@41724 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1578,7 +1578,7 @@ function img_caption_shortcode( $attr, $content = null ) {
|
||||
|
||||
$style = '';
|
||||
if ( $caption_width ) {
|
||||
$style = 'style="width: ' . (int) $caption_width . 'px" ';
|
||||
$style = 'style="max-width: ' . (int) $caption_width . 'px" ';
|
||||
}
|
||||
|
||||
if ( $html5 ) {
|
||||
|
||||
Reference in New Issue
Block a user