Ticket #27673: 27673.patch
File 27673.patch, 1.9 KB (added by , 9 years ago) |
---|
-
src/wp-admin/edit-form-advanced.php
26 26 27 27 $media_support = theme_supports_thumbnails( $post ) || post_supports_thumbnails( $post ); 28 28 29 if ( post_type_supports( $post_type, 'editor' ) || post_type_supports( $post_type, 'thumbnail' ) ||$media_support ) {29 if ( post_type_supports( $post_type, 'editor' ) || $media_support ) { 30 30 add_thickbox(); 31 31 wp_enqueue_media( array( 'post' => $post_ID ) ); 32 32 } … … 169 169 if ( post_type_supports($post_type, 'page-attributes') ) 170 170 add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core'); 171 171 172 if ( current_theme_supports( 'post-thumbnails', $post_type ) || post_supports_thumbnails( $post ))172 if ( $media_support ) 173 173 add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low'); 174 174 175 175 if ( post_type_supports($post_type, 'excerpt') ) -
src/wp-includes/media.php
2774 2774 return post_type_supports( 'attachment:audio', 'thumbnail' ); 2775 2775 } elseif ( 0 === strpos( $post->post_mime_type, 'video' ) ) { 2776 2776 return post_type_supports( 'attachment:video', 'thumbnail' ); 2777 } elseif ( 0 === strpos( $post->post_mime_type, 'image' ) ) { 2778 return false; 2777 2779 } 2778 2780 } 2779 2781 … … 2795 2797 return current_theme_supports( 'post-thumbnails', 'attachment:audio' ); 2796 2798 } elseif ( 0 === strpos( $post->post_mime_type, 'video' ) ) { 2797 2799 return current_theme_supports( 'post-thumbnails', 'attachment:video' ); 2800 } elseif ( 0 === strpos( $post->post_mime_type, 'image' ) ) { 2801 return false; 2798 2802 } 2799 2803 } 2800 2804