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:
parent
9817ecd92e
commit
143d248292
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user