From 99a0a62442b8bb4f57b2205cf3e7afdbf3b615e9 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 6 Aug 2014 17:16:45 +0000 Subject: [PATCH] Don't show the Featured Image metabox for users with the `contributor` role. Do enqueue media so that TinyMCE previews work for YouTube embeds, etc. Props SergeyBiryukov. Fixes #28327. git-svn-id: https://develop.svn.wordpress.org/trunk@29402 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-admin/edit-form-advanced.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wp-admin/edit-form-advanced.php b/src/wp-admin/edit-form-advanced.php index 9529dd889e..f9e36c1299 100644 --- a/src/wp-admin/edit-form-advanced.php +++ b/src/wp-admin/edit-form-advanced.php @@ -183,7 +183,7 @@ foreach ( get_object_taxonomies( $post ) as $tax_name ) { if ( post_type_supports($post_type, 'page-attributes') ) add_meta_box('pageparentdiv', 'page' == $post_type ? __('Page Attributes') : __('Attributes'), 'page_attributes_meta_box', null, 'side', 'core'); -if ( $thumbnail_support ) +if ( $thumbnail_support && current_user_can( 'upload_files' ) ) add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low'); if ( post_type_supports($post_type, 'excerpt') )