Changeset 42694
- Timestamp:
- 02/11/2018 03:39:20 PM (7 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/media.php
r42693 r42694 1624 1624 str_replace( '<img ', '<img ' . $describedby, do_shortcode( $content ) ), 1625 1625 sprintf( 1626 '<p id="%s"class="wp-caption-text">%s</p>',1626 '<p %sclass="wp-caption-text">%s</p>', 1627 1627 $atts['caption_id'], 1628 1628 $atts['caption'] -
trunk/tests/phpunit/tests/media.php
r42343 r42694 213 213 $this->assertEquals( 1, preg_match_all( "~{$img_preg}.*wp-caption-text~", $result, $_r ) ); 214 214 $this->assertEquals( 1, preg_match_all( "~wp-caption-text.*{$content_preg}~", $result, $_r ) ); 215 } 216 217 /** 218 * @ticket 34595 219 */ 220 function test_img_caption_shortcode_has_aria_describedby() { 221 $result = img_caption_shortcode( 222 array( 223 'width' => 20, 224 'id' => 'myId', 225 ), 226 $this->img_content . $this->html_content 227 ); 228 229 $this->assertEquals( 1, preg_match_all( '/aria-describedby="caption-myId"/', $result, $_r ) ); 215 230 } 216 231
Note: See TracChangeset
for help on using the changeset viewer.