diff --git a/wp-admin/includes/media.php b/wp-admin/includes/media.php index 47792f0bfa..1bfe3e2760 100644 --- a/wp-admin/includes/media.php +++ b/wp-admin/includes/media.php @@ -1193,6 +1193,7 @@ function get_media_item( $attachment_id, $args = null ) { $meta = wp_get_attachment_metadata($post->ID); if ( is_array($meta) && array_key_exists('width', $meta) && array_key_exists('height', $meta) ) $media_dims .= "{$meta['width']} × {$meta['height']} "; + $media_dims = apply_filters('media_meta', $media_dims, $post); $image_edit_button = ''; if ( gd_edit_image_support($post->post_mime_type) ) { @@ -1212,8 +1213,12 @@ function get_media_item( $attachment_id, $args = null ) { " . __('File name:') . " $filename " . __('File type:') . " $post->post_mime_type - " . __('Upload date:') . " " . mysql2date( get_option('date_format'), $post->post_date ) . " - " . __('Dimensions:') . " " . apply_filters('media_meta', $media_dims, $post) . " + " . __('Upload date:') . " " . mysql2date( get_option('date_format'), $post->post_date ) . "\n"; + + if ( !empty($media_dims) ) + $item .= "" . __('Dimensions:') . " $media_dims\n"; + + $item .= " $image_edit_button