mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-12 04:40:26 +00:00
Media: After [42693], update HTML4 markup in img_caption_shortcode() to avoid an empty ID attribute as well.
Add a unit test for `aria-describedby` in `img_caption_shortcode()`. See #34595. git-svn-id: https://develop.svn.wordpress.org/trunk@42694 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1623,7 +1623,7 @@ function img_caption_shortcode( $attr, $content = null ) {
|
||||
esc_attr( $class ),
|
||||
str_replace( '<img ', '<img ' . $describedby, do_shortcode( $content ) ),
|
||||
sprintf(
|
||||
'<p id="%s" class="wp-caption-text">%s</p>',
|
||||
'<p %sclass="wp-caption-text">%s</p>',
|
||||
$atts['caption_id'],
|
||||
$atts['caption']
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user