[wp-trac] [WordPress Trac] #33012: Full MIME type ignored in wp_mime_type_icon() for videos

WordPress Trac noreply at wordpress.org
Thu Jul 16 07:43:54 UTC 2015


#33012: Full MIME type ignored in wp_mime_type_icon() for videos
--------------------------+-----------------------------
 Reporter:  morganestes   |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Media         |    Version:  4.2.2
 Severity:  normal        |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 When passing a MIME type of 'video/mp4' to `wp_mime_type_icon()`, the URI
 gets set to http://example.com/wp-includes/images/media/video.png as
 expected, but the check for `isset($types[$wilds[0]])` fails to match the
 MIME type and matches on 'default' instead since it's looking for 'video'
 but `$wilds[0]` is 'video/mp4'.

 A workaround for this is to only pass 'video' as the parameter to force
 the check to match the media filename, but that's checking for filename
 match, not MIME matches.

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


More information about the wp-trac mailing list