[wp-trac] [WordPress Trac] #39422: Consistency for returned value of attachment meta : mime_type VS mime-type

WordPress Trac noreply at wordpress.org
Fri Dec 30 15:24:05 UTC 2016


#39422: Consistency for returned value of attachment meta : mime_type VS mime-type
--------------------------+------------------------------
 Reporter:  gabrielstuff  |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Media         |     Version:  4.6.1
 Severity:  normal        |  Resolution:
 Keywords:                |     Focuses:
--------------------------+------------------------------

Comment (by gabrielstuff):

 Yup, I was planing to automatically insert attachment depending on their
 mime-type.
 I'm working on a theme where you get served with custom embed and some
 automatic behavior after an attachment has been uploaded.

 Based on the mime-type, we generate the appropriate html markup.
 Unfortunately, I'm now forced to check for `mime-type` and `mime_type`.
 Not the end of the world, but if someone read the code, it looks like a
 typo first and then force you to think about the hot fix instead of
 thinking about the feature you are coding.

 That is all !

 Thanks !

--
Ticket URL: <https://core.trac.wordpress.org/ticket/39422#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list