From 9a28059d8279ea7c8947f7964cc103e97b123edc Mon Sep 17 00:00:00 2001 From: Genyus Date: Thu, 29 Oct 2026 19:09:44 -0400 Subject: [PATCH] fix(academy): let content staff edit media details --- .../mu-plugins/cbf-staff-media-details.php | 41 +++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 web/app/mu-plugins/cbf-staff-media-details.php 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 +);