mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Media Grid, for audio files: show Bitrate in the Edit Attachments modal a la the Edit Post screen.
See #28839. git-svn-id: https://develop.svn.wordpress.org/trunk@29106 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -1463,6 +1463,9 @@ function wp_get_attachment_id3_keys( $attachment, $context = 'display' ) {
|
||||
$fields['genre'] = __( 'Genre' );
|
||||
$fields['year'] = __( 'Year' );
|
||||
$fields['length_formatted'] = _x( 'Length', 'video or audio' );
|
||||
} elseif ( 'js' === $context ) {
|
||||
$fields['bitrate'] = __( 'Bitrate' );
|
||||
$fields['bitrate_mode'] = __( 'Bitrate Mode' );
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -2716,7 +2719,7 @@ function wp_prepare_attachment_for_js( $attachment ) {
|
||||
$response['fileLength'] = $meta['length_formatted'];
|
||||
|
||||
$response['meta'] = array();
|
||||
foreach ( wp_get_attachment_id3_keys( $attachment ) as $key => $label ) {
|
||||
foreach ( wp_get_attachment_id3_keys( $attachment, 'js' ) as $key => $label ) {
|
||||
if ( ! empty( $meta[ $key ] ) ) {
|
||||
$response['meta'][ $key ] = $meta[ $key ];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user