Ticket #21082: 21082.3.diff
File 21082.3.diff, 1.2 KB (added by , 8 years ago) |
---|
-
src/wp-includes/media.php
1492 1492 $itemwidth = $columns > 0 ? floor(100/$columns) : 100; 1493 1493 $float = is_rtl() ? 'right' : 'left'; 1494 1494 1495 $selector = "gallery-{$i nstance}";1495 $selector = "gallery-{$id}-{$instance}"; 1496 1496 1497 1497 $gallery_style = ''; 1498 1498 … … 1505 1505 * Defaults to false if the theme supports HTML5 galleries. 1506 1506 * Otherwise, defaults to true. 1507 1507 */ 1508 1508 1509 if ( apply_filters( 'use_default_gallery_style', ! $html5 ) ) { 1509 1510 $gallery_style = " 1510 1511 <style type='text/css'> 1511 #{$selector} {1512 #{$selector} .gallery-item { 1512 1513 margin: auto; 1513 1514 } 1514 #{$selector}.gallery-item {1515 .gallery .gallery-item { 1515 1516 float: {$float}; 1516 1517 margin-top: 10px; 1517 1518 text-align: center; 1518 1519 width: {$itemwidth}%; 1519 1520 } 1520 #{$selector}img {1521 .gallery img { 1521 1522 border: 2px solid #cfcfcf; 1522 1523 } 1523 #{$selector}.gallery-caption {1524 .gallery .gallery-caption { 1524 1525 margin-left: 0; 1525 1526 } 1526 1527 /* see gallery_shortcode() in wp-includes/media.php */