From cd9bb049816ed1ae3dc5891fbf20189f3ece0824 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Sat, 1 Nov 2014 21:47:24 +0000 Subject: [PATCH] In `gallery_shortcode()`, when the `link` attribute is equal to `file`, make sure to pass `$attr` as the 6th (!) argument, not 5th, to `wp_get_attachment_link()`. Props bradyvercher. Fixes #27402. Built from https://develop.svn.wordpress.org/trunk@30161 git-svn-id: http://core.svn.wordpress.org/trunk@30161 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/media.php | 2 +- wp-includes/version.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/wp-includes/media.php b/wp-includes/media.php index da8e2c9059..0c3fd2251f 100644 --- a/wp-includes/media.php +++ b/wp-includes/media.php @@ -1049,7 +1049,7 @@ function gallery_shortcode( $attr ) { $attr = ( trim( $attachment->post_excerpt ) ) ? array( 'aria-describedby' => "$selector-$id" ) : ''; if ( ! empty( $atts['link'] ) && 'file' === $atts['link'] ) { - $image_output = wp_get_attachment_link( $id, $atts['size'], false, false, $attr ); + $image_output = wp_get_attachment_link( $id, $atts['size'], false, false, false, $attr ); } elseif ( ! empty( $atts['link'] ) && 'none' === $atts['link'] ) { $image_output = wp_get_attachment_image( $id, $atts['size'], false, $attr ); } else { diff --git a/wp-includes/version.php b/wp-includes/version.php index 2f60685cd0..e4ff6f0382 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -4,7 +4,7 @@ * * @global string $wp_version */ -$wp_version = '4.1-alpha-30160'; +$wp_version = '4.1-alpha-30161'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.