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
This commit is contained in:
Scott Taylor 2014-08-06 17:16:45 +00:00
parent 68a82b0932
commit 99a0a62442
1 changed files with 1 additions and 1 deletions

View File

@ -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') )