diff --git a/web/app/mu-plugins/cbf-staff-media-details.php b/web/app/mu-plugins/cbf-staff-media-details.php new file mode 100644 index 00000000..0a48b1c2 --- /dev/null +++ b/web/app/mu-plugins/cbf-staff-media-details.php @@ -0,0 +1,41 @@ +post_type !== 'attachment' || $post->post_status === 'trash' ) { + return $caps; + } + + if ( ! user_can( $user_id, 'edit_courses' ) || user_can( $user_id, 'edit_posts' ) ) { + return $caps; + } + + return array( 'edit_courses' ); + }, + 10, + 4 +);