WordPress.org

Make WordPress Core

Ticket #6476: gallery-orderby-desc-r7580.patch

File gallery-orderby-desc-r7580.patch, 540 bytes (added by tellyworth, 14 years ago)
  • wp-includes/media.php

     
    352352
    353353        $id = intval($id);
    354354        $orderby = addslashes($orderby);
    355         $attachments = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&orderby=\"{$orderby}\"");
     355        $attachments = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&orderby=\"{$orderby}\"&order=");
    356356
    357357        if ( empty($attachments) )
    358358                return '';