Ticket #6657: empty-gallery-tab-fix-r7638.patch
File empty-gallery-tab-fix-r7638.patch, 638 bytes (added by , 17 years ago) |
---|
-
wp-admin/includes/media.php
590 590 } 591 591 592 592 function get_media_items( $post_id, $errors ) { 593 if ( $post_id && $post = get_post($post_id) ) { 594 if ( $post->post_type == 'attachment' ) 593 if ( $post_id ) { 594 $post = get_post($post_id); 595 if ( $post && $post->post_type == 'attachment' ) 595 596 $attachments = array($post->ID => $post); 596 597 else 597 598 $attachments = get_children("post_parent=$post_id&post_type=attachment&orderby=menu_order ASC, ID&order=DESC");