Make WordPress Core

Ticket #26697: 26697.2.diff

File 26697.2.diff, 909 bytes (added by obenland, 11 years ago)
  • wp-includes/media.php

     
    724724                        unset( $attr['orderby'] );
    725725        }
    726726
    727         extract(shortcode_atts(array(
     727        $defaults_atts = array(
    728728                'order'      => 'ASC',
    729729                'orderby'    => 'menu_order ID',
    730730                'id'         => $post ? $post->ID : 0,
     
    735735                'size'       => 'thumbnail',
    736736                'include'    => '',
    737737                'exclude'    => '',
    738                 'link'       => ''
    739         ), $attr, 'gallery'));
     738                'link'       => '',
     739        );
     740
     741        if ( current_theme_supports( 'html5', 'gallery' ) ) {
     742                $defaults_atts = wp_parse_args( array(
     743                        'itemtag'    => 'figure',
     744                        'icontag'    => 'div',
     745                        'captiontag' => 'figcaption',
     746                ), $defaults_atts );
     747        }
     748
     749        extract( shortcode_atts( $defaults_atts, $attr, 'gallery' ) );
    740750
    741751        $id = intval($id);
    742752        if ( 'RAND' == $order )