diff --git a/wp-includes/media.php b/wp-includes/media.php index ade1114d16..8965da9ac2 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1560,6 +1560,8 @@ function img_caption_shortcode( $attr, $content = null ) { return $content; } + $id = $caption_id = $describedby = ''; + if ( $atts['id'] ) { $atts['id'] = sanitize_html_class( $atts['id'] ); $id = 'id="' . esc_attr( $atts['id'] ) . '" '; @@ -1571,8 +1573,6 @@ function img_caption_shortcode( $attr, $content = null ) { $atts['caption_id'] = 'caption-' . str_replace( '_', '-', $atts['id'] ); } - $describedby = ''; - if ( $atts['caption_id'] ) { $caption_id = 'id="' . esc_attr( $atts['caption_id'] ) . '" '; $describedby = 'aria-describedby="' . esc_attr( $atts['caption_id'] ) . '" '; diff --git a/wp-includes/version.php b/wp-includes/version.php index 2532b874e3..a281dab794 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42705'; +$wp_version = '5.0-alpha-42706'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.