Make WordPress Core

Changeset 25665


Ignore:
Timestamp:
10/02/2013 08:45:55 PM (11 years ago)
Author:
ocean90
Message:

Allow to filter the link attribute via shortcode_atts_gallery. props iworks. fixes #24979.

File:
1 edited

Legend:

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

    r25485 r25665  
    734734        'size'       => 'thumbnail',
    735735        'include'    => '',
    736         'exclude'    => ''
     736        'exclude'    => '',
     737        'link'       => ''
    737738    ), $attr, 'gallery'));
    738739
     
    808809    $i = 0;
    809810    foreach ( $attachments as $id => $attachment ) {
    810         if ( ! empty( $attr['link'] ) && 'file' === $attr['link'] )
     811        if ( ! empty( $link ) && 'file' === $link )
    811812            $image_output = wp_get_attachment_link( $id, $size, false, false );
    812         elseif ( ! empty( $attr['link'] ) && 'none' === $attr['link'] )
     813        elseif ( ! empty( $link ) && 'none' === $link )
    813814            $image_output = wp_get_attachment_image( $id, $size, false );
    814815        else
Note: See TracChangeset for help on using the changeset viewer.