Change WordPress user roles and capabilities Forums Bug Reports Enabling Media Library for Authors & Editors Reply To: Enabling Media Library for Authors & Editors

#3227
Vladimir
Keymaster

I can not reproduce this difference between list and thumbnail views.

I see a mistake in logic. This filter will never return true for user with single ‘editor’ role or user with single ‘author’ role, as 1st definitely can not ‘author’, but 2nd can not ‘editor’.

Try to replace permissions check part with this one:


if (!current_user_can('editor') &&  !current_user_can('author')) {
    return $show_all;
}