Make WordPress Core

Ticket #51828: gallery-item-alignment.patch

File gallery-item-alignment.patch, 499 bytes (added by rolekwp, 3 years ago)
  • wp-includes/media.php

    diff -pur a/wp-includes/media.php b/wp-includes/media.php
    a b function gallery_shortcode( $attr ) { 
    23862386        }
    23872387
    23882388        if ( ! $html5 && $columns > 0 && 0 !== $i % $columns ) {
     2389                while ( 0 !== $i % $columns ) {
     2390                        $output .= "<{$itemtag} class='gallery-item'>";
     2391                        $output .= "</{$itemtag}>";
     2392                        $i++;
     2393                }
    23892394                $output .= "
    23902395                        <br style='clear: both' />";
    23912396        }