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. Built from https://develop.svn.wordpress.org/trunk@41724 git-svn-id: http://core.svn.wordpress.org/trunk@41558 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
4f48c60803
commit
760f9fd3fd
|
@ -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 ) {
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
*
|
||||
* @global string $wp_version
|
||||
*/
|
||||
$wp_version = '4.9-alpha-41723';
|
||||
$wp_version = '4.9-alpha-41724';
|
||||
|
||||
/**
|
||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||
|
|
Loading…
Reference in New Issue