Make WordPress Core


Ignore:
Timestamp:
07/23/2013 05:39:08 AM (11 years ago)
Author:
nacin
Message:

Media: Add awareness to Attachment Display Settings that audio and video can be embedded.

Also:

  • Add file length metadata to Attachment Details.
  • Round the kb/s bitrate on post.php.

fixes #24449.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/media.php

    r24685 r24777  
    17001700    }
    17011701
     1702    if ( $meta && ( 'audio' === $type || 'video' === $type ) ) {
     1703        if ( isset( $meta['length_formatted'] ) )
     1704            $response['fileLength'] = $meta['length_formatted'];
     1705    }
     1706
    17021707    if ( function_exists('get_compat_media_markup') )
    17031708        $response['compat'] = get_compat_media_markup( $attachment->ID, array( 'in_modal' => true ) );
     
    17541759        ),
    17551760        'defaultProps' => $props,
     1761        'embedExts'    => array_merge( wp_get_audio_extensions(), wp_get_video_extensions() ),
    17561762    );
    17571763
Note: See TracChangeset for help on using the changeset viewer.