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.

Merges [42837] to the 4.9 branch.

Built from https://develop.svn.wordpress.org/branches/4.9@42838


git-svn-id: http://core.svn.wordpress.org/branches/4.9@42668 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Joe McGill 2018-03-16 20:19:39 +00:00
parent 9b7814a4a1
commit 744e834816
2 changed files with 2 additions and 2 deletions

View File

@ -1578,7 +1578,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 = '4.9.5-alpha-42831'; $wp_version = '4.9.5-alpha-42838';
/** /**
* 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.