I was able to implement the feature in your plugin. I changed the function wpuxss_eml_post_mime_types() in mime-types.php to this.
function wpuxss_eml_post_mime_types( $post_mime_types )
{
$wpuxss_eml_mimes = get_option('wpuxss_eml_mimes');
if ( !empty($wpuxss_eml_mimes) )
{
$mineGroups = array();
foreach ( $wpuxss_eml_mimes as $type => $mime )
{
if ( $mime['filter'] == 1 )
{
$key = $mime['singular'];
if ( !isset($mineGroups[$key]) )
{
$mineGroups[$key] = array(
'singular' => $mime['singular'],
'plural' => $mime['plural'],
'mime' => $mime['mime'],
);
}
else
{
$mineGroups[$key]['mime'] .= ',' . $mime['mime'];
}
}
}
if ( !empty($mineGroups) )
{
foreach ( $mineGroups as $type => $mineGroup )
{
$post_mime_types[$mineGroup['mime']] = array(
__($mineGroup['singular']),
__('Manage ' . $mineGroup['singular']),
_n_noop($mineGroup['singular'] . ' <span class="count">(%s)</span>', $mineGroup['plural'] . ' <span class="count">(%s)</span>')
);
}
}
}
return $post_mime_types;
}
Basically it creates comma separated MIME-type keys in $post_mime_types, which should work according to this blog https://ageekandhisblog.com/wordpress-how-to-add-more-upload-categories-filter/
But unfortunately, there seems to be a bug (?) in /wp-admin/includes/class-wp-media-list-table.php in function get_views() and I had to change a few lines, which would be a quite bad requirement for the plugin. Anyway, I changed the following lines.
$matches = wp_match_mime_types(array_keys($post_mime_types), array_keys($_num_posts));
to
$post_mime_types_piped = array_keys($post_mime_types);
foreach ($post_mime_types_piped as $key => $value)
$post_mime_types_piped[$key] = str_replace(",", "|", $value);
$matches = wp_match_mime_types($post_mime_types_piped, array_keys($_num_posts));
and
if ( !empty( $num_posts[$mime_type] ) )
$type_links[$mime_type] = "<a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type] ), number_format_i18n( $num_posts[$mime_type] )) . '</a>';
to
$mime_type_piped = str_replace(',', '|', $mime_type);
if ( !empty( $num_posts[$mime_type_piped] ) )
$type_links[$mime_type] = "<a href='upload.php?post_mime_type=$mime_type'$class>" . sprintf( translate_nooped_plural( $label[2], $num_posts[$mime_type_piped] ), number_format_i18n( $num_posts[$mime_type_piped] )) . '</a>';
I hope this will help you.