Make WordPress Core

Changeset 12338


Ignore:
Timestamp:
12/08/2009 12:45:32 PM (15 years ago)
Author:
westi
Message:

Make the gallery shortcode float the right way for RTL languages. Fixes #7134 props ikonst.

File:
1 edited

Legend:

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

    r12326 r12338  
    649649 */
    650650function gallery_shortcode($attr) {
    651     global $post;
     651    global $post, $wp_locale;
    652652
    653653    static $instance = 0;
     
    712712    $columns = intval($columns);
    713713    $itemwidth = $columns > 0 ? floor(100/$columns) : 100;
    714 
     714    $float = $wp_locale->text_direction == 'rtl' ? 'right' : 'left';
     715   
    715716    $selector = "gallery-{$instance}";
    716717
     
    721722            }
    722723            #{$selector} .gallery-item {
    723                 float: left;
     724                float: {$float};
    724725                margin-top: 10px;
    725726                text-align: center;
Note: See TracChangeset for help on using the changeset viewer.