Making WordPress.org

Changeset 5197


Ignore:
Timestamp:
03/29/2017 05:40:29 PM (8 years ago)
Author:
obenland
Message:

Plugin Directory: Make sure screen shots are sorted

Fixes #2603.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sites/trunk/wordpress.org/public_html/wp-content/plugins/plugin-directory/shortcodes/class-screenshots.php

    r5176 r5197  
    2626        }
    2727
     28        ksort( $screen_shots, SORT_NATURAL );
     29
    2830        /*
    2931         * Find the image that corresponds with the text.
     
    3537            );
    3638
    37             if ( $descriptions && ! empty( $descriptions[ (int)$image['resolution'] ] ) ) {
    38                 $caption = $descriptions[ (int)$image['resolution'] ];
     39            if ( $descriptions && ! empty( $descriptions[ (int) $image['resolution'] ] ) ) {
     40                $caption = $descriptions[ (int) $image['resolution'] ];
    3941                $caption = Plugin_I18n::instance()->translate( 'screenshot-' . $image['resolution'], $caption, [ 'post_id' => $plugin->ID ] );
    40                
     42
    4143                $screen_shot .= '<figcaption>' . $caption . '</figcaption>';
    4244            }
Note: See TracChangeset for help on using the changeset viewer.