Revert max-width styles on caption shortcodes.

This is a partial revert of [41724], so image captions include an
inline `width` style instead of `max-width`.

This returns the caption shortcode to the pre-4.9.0 behavior, while
retaining the extra unit test coverage added in [41724].

Fixes #43123. See #33981.

Built from https://develop.svn.wordpress.org/trunk@42837


git-svn-id: http://core.svn.wordpress.org/trunk@42667 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill 2018-03-16 20:07:33 +00:00
parent 176a289050
commit 06ec96a7a4
2 changed files with 2 additions and 2 deletions

View File

@ -1603,7 +1603,7 @@ function img_caption_shortcode( $attr, $content = null ) {
$style = ''; $style = '';
if ( $caption_width ) { if ( $caption_width ) {
$style = 'style="max-width: ' . (int) $caption_width . 'px" '; $style = 'style="width: ' . (int) $caption_width . 'px" ';
} }
if ( $html5 ) { if ( $html5 ) {

View File

@ -4,7 +4,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.0-alpha-42836'; $wp_version = '5.0-alpha-42837';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.