Make WordPress Core

Changeset 7516


Ignore:
Timestamp:
03/26/2008 03:34:55 AM (17 years ago)
Author:
ryan
Message:

Handle more than 3 columns in gallery. Props Dickie. fixes #6382

File:
1 edited

Legend:

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

    r7496 r7516  
    369369    $captiontag = tag_escape($captiontag);
    370370    $columns = intval($columns);
     371    $itemwidth = $columns > 0 ? floor(100/$columns) : 100;
    371372   
    372373    $output = apply_filters('gallery_style', "
     
    379380                margin-top: 10px;
    380381                text-align: center;
    381                 width: 33%;         }
     382                width: {$itemwidth}%;           }
    382383            .gallery img {
    383384                border: 2px solid #cfcfcf;
Note: See TracChangeset for help on using the changeset viewer.