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
This commit is contained in:
parent
42809dad43
commit
6b8ee0942c
|
@ -183,7 +183,7 @@ foreach ( get_object_taxonomies( $post ) as $tax_name ) {
|
||||||
if ( post_type_supports($post_type, 'page-attributes') )
|
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');
|
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');
|
add_meta_box('postimagediv', __('Featured Image'), 'post_thumbnail_meta_box', null, 'side', 'low');
|
||||||
|
|
||||||
if ( post_type_supports($post_type, 'excerpt') )
|
if ( post_type_supports($post_type, 'excerpt') )
|
||||||
|
|
Loading…
Reference in New Issue