Come dare i permessi di vedere i media caricati da utenti admin a utenti editor


add_filter( 'ajax_query_attachments_args', 'show_current_user_attachments' );
function show_current_user_attachments( $query ) {
	
	if( current_user_can('edit_posts') ){
		$query['author'] = get_current_user_id();
	}
	
	return $query;
}

WordPress permessi e ruoli utenti https://wordpress.org/support/article/roles-and-capabilities/