WordPress.org

Make WordPress Core

Ticket #28327: 28327.2.diff

File 28327.2.diff, 898 bytes (added by SergeyBiryukov, 7 years ago)
  • src/wp-admin/edit-form-advanced.php

     
    4040        }
    4141}
    4242
    43 if ( $thumbnail_support ) {
     43if ( $thumbnail_support && current_user_can( 'upload_files' ) ) {
    4444        add_thickbox();
    4545        wp_enqueue_media( array( 'post' => $post_ID ) );
    4646}
     
    183183if ( post_type_supports($post_type, 'page-attributes') )
    184184        add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core');
    185185
    186 if ( $thumbnail_support )
     186if ( $thumbnail_support && current_user_can( 'upload_files' ) )
    187187        add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low');
    188188
    189189if ( post_type_supports($post_type, 'excerpt') )