Make WordPress Core

Changeset 30161


Ignore:
Timestamp:
11/01/2014 09:46:51 PM (10 years ago)
Author:
wonderboymusic
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/media.php

    r30122 r30161  
    10501050        $attr = ( trim( $attachment->post_excerpt ) ) ? array( 'aria-describedby' => "$selector-$id" ) : '';
    10511051        if ( ! empty( $atts['link'] ) && 'file' === $atts['link'] ) {
    1052             $image_output = wp_get_attachment_link( $id, $atts['size'], false, false, $attr );
     1052            $image_output = wp_get_attachment_link( $id, $atts['size'], false, false, false, $attr );
    10531053        } elseif ( ! empty( $atts['link'] ) && 'none' === $atts['link'] ) {
    10541054            $image_output = wp_get_attachment_image( $id, $atts['size'], false, $attr );
Note: See TracChangeset for help on using the changeset viewer.