WordPress.org

Make WordPress Core

Changeset 21778


Ignore:
Timestamp:
09/06/12 19:19:56 (20 months ago)
Author:
markjaquith
Message:

use 'ids' parameter for explicit attachment ordering in [gallery] shortcodes. fixes #21816

File:
1 edited

Legend:

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

    r21772 r21778  
    802802        'columns'    => 3, 
    803803        'size'       => 'thumbnail', 
     804        'ids'        => '', 
    804805        'include'    => '', 
    805806        'exclude'    => '' 
     
    809810    if ( 'RAND' == $order ) 
    810811        $orderby = 'none'; 
     812 
     813    if ( !empty( $ids ) ) { 
     814        // 'ids' is explicitly ordered 
     815        $orderby = 'post__in'; 
     816        $include = $ids; 
     817    } 
    811818 
    812819    if ( !empty($include) ) { 
Note: See TracChangeset for help on using the changeset viewer.