- Timestamp:
- 03/16/2018 08:06:41 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r42706 r42837 1604 1604 $style = ''; 1605 1605 if ( $caption_width ) { 1606 $style = 'style=" max-width: ' . (int) $caption_width . 'px" ';1606 $style = 'style="width: ' . (int) $caption_width . 'px" '; 1607 1607 } 1608 1608 -
trunk/tests/phpunit/tests/media.php
r42743 r42837 133 133 134 134 if ( current_theme_supports( 'html5', 'caption' ) ) { 135 $this->assertEquals( 1, preg_match_all( '/ max-width: 20/', $result, $_r ) );135 $this->assertEquals( 1, preg_match_all( '/width: 20/', $result, $_r ) ); 136 136 } else { 137 $this->assertEquals( 1, preg_match_all( '/ max-width: 30/', $result, $_r ) );137 $this->assertEquals( 1, preg_match_all( '/width: 30/', $result, $_r ) ); 138 138 } 139 139 } -
trunk/tests/phpunit/tests/shortcode.php
r42343 r42837 536 536 array( 537 537 '[caption caption="test" width="2"]<div>hello</div>[/caption]', 538 '<div style=" max-width: 12px" class="wp-caption alignnone"><div>hello</div><p class="wp-caption-text">test</p></div>',538 '<div style="width: 12px" class="wp-caption alignnone"><div>hello</div><p class="wp-caption-text">test</p></div>', 539 539 ), 540 540 array(
Note: See TracChangeset
for help on using the changeset viewer.