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
This commit is contained in:
Scott Taylor 2014-11-01 21:47:24 +00:00
parent 382d93ddf9
commit cd9bb04981
2 changed files with 2 additions and 2 deletions

View File

@ -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 {

View File

@ -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.