From 6b8ee0942cbbc8bfae5235bd533c2d4aa42bbf92 Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Wed, 6 Aug 2014 17:17:16 +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. Built from https://develop.svn.wordpress.org/trunk@29402 git-svn-id: http://core.svn.wordpress.org/trunk@29180 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 9529dd889e..f9e36c1299 100644 --- a/wp-admin/edit-form-advanced.php +++ b/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') )