From 744e834816f7af9590c552836f90bf4c0bc5105c Mon Sep 17 00:00:00 2001 From: Joe McGill Date: Fri, 16 Mar 2018 20:19:39 +0000 Subject: [PATCH] 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 --- wp-includes/media.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index 9afb105268..6e597a9460 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1578,7 +1578,7 @@ function img_caption_shortcode( $attr, $content = null ) { $style = ''; if ( $caption_width ) { - $style = 'style="max-width: ' . (int) $caption_width . 'px" '; + $style = 'style="width: ' . (int) $caption_width . 'px" '; } if ( $html5 ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index f833ffc6b9..e2c7d95b60 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @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.