I'm following the advice found in several places to remove tabs by using the following filter. However, the same number of tabs appear, the last one is simply displayed x number of times. I'm running Multisite, 4.0
The filter:
function remove_media_editor_tabs( $strings ) {
$user_id = get_current_user_id();
$user = get_userdata( $user_id );
$user_has_role = array_intersect( $user->roles, array(
'role_one',
'role_two'
) );
if ( $user_has_role ) {
// remove "Create New Gallery"
unset( $strings["createGalleryTitle"] );
// remove "Set Featured Image"
unset( $strings["setFeaturedImageTitle"] );
// remove "Create Video Playlist"
unset( $strings["createVideoPlaylistTitle"] );
}
return $strings;
}
add_filter('media_view_strings', 'remove_media_editor_tabs');
The screenshot: