[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 12:27:14 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 dhanendran):

 Hi @gabrielstuff ,

 Are you sure that you are getting the wrong key value? Because I have
 tried this and got the correct data as expected.

 {{{
 Array
 (
     [filesize] => 1055736
     [mime_type] => video/quicktime
     [length] => 5
     [length_formatted] => 0:05
     [width] => 1280
     [height] => 720
     [fileformat] => mp4
     [dataformat] => quicktime
     [audio] => Array
         (
             [dataformat] => mp4
             [codec] => ISO/IEC 14496-3 AAC
             [sample_rate] => 48000
             [channels] => 2
             [bits_per_sample] => 16
             [lossless] =>
             [channelmode] => stereo
         )

 )
 }}}

 Are you using any plugin to do any additional work in media? If so please
 check with your plugin it may modify the data using
 `wp_get_attachment_metadata` filter.

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


More information about the wp-trac mailing list