diff --git a/wp-includes/media.php b/wp-includes/media.php index 4a97f445ef..1da6dcecd1 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1556,13 +1556,14 @@ function img_caption_shortcode( $attr, $content = null ) { return $content; } + $caption_id = ''; + if ( ! empty( $atts['id'] ) ) { $att_id = esc_attr( sanitize_html_class( $atts['id'] ) ); $atts['id'] = 'id="' . $att_id . '" '; + $caption_id = 'caption-' . str_replace( '_', '-', $att_id ); } - $caption_id = 'caption-' . str_replace( '_', '-', $att_id ); - $class = trim( 'wp-caption ' . $atts['align'] . ' ' . $atts['class'] ); $html5 = current_theme_supports( 'html5', 'caption' ); diff --git a/wp-includes/version.php b/wp-includes/version.php index 376e5d6631..9253ef822c 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '5.0-alpha-42691'; +$wp_version = '5.0-alpha-42692'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.