WordPress.org

Make WordPress Core

Ticket #6508: media.patch

File media.patch, 559 bytes (added by Dickie, 6 years ago)

Fix for Gallery problem

  • trunk/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&order=&orderby={$orderby}"); 
    356356 
    357357        if ( empty($attachments) ) 
    358358                return '';