WordPress.org

Make WordPress Core

Ticket #27673: 27673.patch

File 27673.patch, 1.9 KB (added by SergeyBiryukov, 4 years ago)
  • src/wp-admin/edit-form-advanced.php

     
    2626 
    2727$media_support = theme_supports_thumbnails( $post ) || post_supports_thumbnails( $post ); 
    2828 
    29 if ( post_type_supports( $post_type, 'editor' ) || post_type_supports( $post_type, 'thumbnail' ) || $media_support ) { 
     29if ( post_type_supports( $post_type, 'editor' ) || $media_support ) { 
    3030        add_thickbox(); 
    3131        wp_enqueue_media( array( 'post' => $post_ID ) ); 
    3232} 
     
    169169if ( post_type_supports($post_type, 'page-attributes') ) 
    170170        add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core'); 
    171171 
    172 if ( current_theme_supports( 'post-thumbnails', $post_type ) || post_supports_thumbnails( $post ) ) 
     172if ( $media_support ) 
    173173        add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low'); 
    174174 
    175175if ( post_type_supports($post_type, 'excerpt') ) 
  • src/wp-includes/media.php

     
    27742774                        return post_type_supports( 'attachment:audio', 'thumbnail' ); 
    27752775                } elseif ( 0 === strpos( $post->post_mime_type, 'video' ) ) { 
    27762776                        return post_type_supports( 'attachment:video', 'thumbnail' ); 
     2777                } elseif ( 0 === strpos( $post->post_mime_type, 'image' ) ) { 
     2778                        return false; 
    27772779                } 
    27782780        } 
    27792781 
     
    27952797                        return current_theme_supports( 'post-thumbnails', 'attachment:audio' ); 
    27962798                } elseif ( 0 === strpos( $post->post_mime_type, 'video' ) ) { 
    27972799                        return current_theme_supports( 'post-thumbnails', 'attachment:video' ); 
     2800                } elseif ( 0 === strpos( $post->post_mime_type, 'image' ) ) { 
     2801                        return false; 
    27982802                } 
    27992803        } 
    28002804