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.


git-svn-id: https://develop.svn.wordpress.org/trunk@30161 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Scott Taylor 2014-11-01 21:46:51 +00:00
parent 9817ecd92e
commit 143d248292
1 changed files with 1 additions and 1 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 {