[wp-trac] [WordPress Trac] #30788: Media library views: inconsistent behaviour with mime type groups

WordPress Trac noreply at wordpress.org
Fri Dec 19 18:43:42 UTC 2014


#30788: Media library views: inconsistent behaviour with mime type groups
--------------------------+-----------------------------
 Reporter:  mdgl          |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.1
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 Custom media type groups defined using the `post_mime_types` filter are
 not displayed as filter options by the media library "list" view if the
 group contains multiple MIME types separated by a comma. Such groups are
 displayed correctly by the "grid" and other JavaScript views.

 For example, if you add a custom media group `Documents` for MIME types
 `text/plain,application/pdf`, this is not listed as a filter option in
 "list" mode but does appear in the "grid" view.

 If there is just a single MIME type in the group (e.g. `text/plain`) it
 appears correctly in both views.

 It appears that function `wp_match_mime_types()` is not correctly matching
 against such comma-separated MIME type values.

 Further inconsistencies occur in the naming and display of the groups. In
 "list" view, each group name is appropriately pluralised and suffixed with
 the count of matching items but this does not occur in the JavaScript
 views. In addition, the filter to display all items is named `All` in
 "list" view but `All media items` in the JavaScript views (English
 translation).

 Related #22514, #30123.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30788>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list