Make WordPress Core

Ticket #21082: 21082.3.diff

File 21082.3.diff, 1.2 KB (added by antpb, 8 years ago)
  • src/wp-includes/media.php

     
    14921492        $itemwidth = $columns > 0 ? floor(100/$columns) : 100;
    14931493        $float = is_rtl() ? 'right' : 'left';
    14941494
    1495         $selector = "gallery-{$instance}";
     1495        $selector = "gallery-{$id}-{$instance}";
    14961496
    14971497        $gallery_style = '';
    14981498
     
    15051505         *                    Defaults to false if the theme supports HTML5 galleries.
    15061506         *                    Otherwise, defaults to true.
    15071507         */
     1508
    15081509        if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) {
    15091510                $gallery_style = "
    15101511                <style type='text/css'>
    1511                         #{$selector} {
     1512                        #{$selector} .gallery-item {
    15121513                                margin: auto;
    15131514                        }
    1514                         #{$selector} .gallery-item {
     1515                        .gallery .gallery-item {
    15151516                                float: {$float};
    15161517                                margin-top: 10px;
    15171518                                text-align: center;
    15181519                                width: {$itemwidth}%;
    15191520                        }
    1520                         #{$selector} img {
     1521                        .gallery img {
    15211522                                border: 2px solid #cfcfcf;
    15221523                        }
    1523                         #{$selector} .gallery-caption {
     1524                        .gallery .gallery-caption {
    15241525                                margin-left: 0;
    15251526                        }
    15261527                        /* see gallery_shortcode() in wp-includes/media.php */