Make WordPress Core

Ticket #28327: 28327.diff

File 28327.diff, 697 bytes (added by MikeHansenMe, 11 years ago)

check if user can upload files

  • src/wp-admin/edit-form-advanced.php

     
    176176if ( post_type_supports($post_type, 'page-attributes') )
    177177        add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core');
    178178
    179 if ( $thumbnail_support )
     179if ( $thumbnail_support && current_user_can( 'upload_files' ) )
    180180        add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low');
    181181
    182182if ( post_type_supports($post_type, 'excerpt') )