Ticket #6772: 6772.diff

File 6772.diff, 0.6 kB (added by DD32, 3 months ago)

converted function to use array format for passing at the same time

  • wp-includes/media.php

    old new  
    359359        ), $attr)); 
    360360 
    361361        $id = intval($id); 
    362         $attachments = get_children("post_parent=$id&post_type=attachment&post_mime_type=image&orderby={$orderby}"); 
     362        $attachments = get_children( array('post_parent' => $id, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'orderby' => $orderby) ); 
    363363 
    364364        if ( empty($attachments) ) 
    365365                return '';