mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-10-03 22:27:04 +00:00
Media: Improve display and accessibility of meta data in detail view.
* Add a `human_readable_duration` function including tests. * Add 'pixels' after image width/height. * Add screen reader text for durations. Props Presskopp, kiranpotphode, milindmore22, stormrockwell, afercia. Fixes #39667. git-svn-id: https://develop.svn.wordpress.org/trunk@43633 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -3378,7 +3378,8 @@ function wp_prepare_attachment_for_js( $attachment ) {
|
||||
|
||||
if ( $meta && ( 'audio' === $type || 'video' === $type ) ) {
|
||||
if ( isset( $meta['length_formatted'] ) ) {
|
||||
$response['fileLength'] = $meta['length_formatted'];
|
||||
$response['fileLength'] = $meta['length_formatted'];
|
||||
$response['fileLengthHumanReadable'] = human_readable_duration( $meta['length_formatted'] );
|
||||
}
|
||||
|
||||
$response['meta'] = array();
|
||||
|
||||
Reference in New Issue
Block a user