diff --git a/wp-includes/media.php b/wp-includes/media.php
index 4003a41..50be3ee 100644
a
|
b
|
function gallery_shortcode($attr) { |
788 | 788 | if ( 'RAND' == $order ) |
789 | 789 | $orderby = 'none'; |
790 | 790 | |
| 791 | // Always exclude the post thumbnail |
| 792 | if ( empty( $exclude ) ) |
| 793 | $exclude = get_post_thumbnail_id(); |
| 794 | else |
| 795 | $exclude .= ',' . get_post_thumbnail_id(); |
| 796 | |
791 | 797 | if ( !empty($include) ) { |
792 | 798 | $include = preg_replace( '/[^0-9,]+/', '', $include ); |
793 | 799 | $_attachments = get_posts( array('include' => $include, 'post_status' => 'inherit', 'post_type' => 'attachment', 'post_mime_type' => 'image', 'order' => $order, 'orderby' => $orderby) ); |