Index: /trunk/wp-admin/includes/media.php
===================================================================
--- /trunk/wp-admin/includes/media.php (revision 23767)
+++ /trunk/wp-admin/includes/media.php (revision 23768)
@@ -2286,6 +2286,7 @@
$alt_text = get_post_meta( $post->ID, '_wp_attachment_image_alt', true );
- $att_url = wp_get_attachment_url( $post->ID );
-
+ $att_url = wp_get_attachment_url( $post->ID ); ?>
+
+ ID ) ) :
$image_edit_button = '';
@@ -2295,5 +2296,5 @@
}
?>
-
+ post_mime_type, 'audio/' ) ):
+
+ echo do_shortcode( '[audio src="' . $att_url . '"]' );
+
+ elseif ( $attachment_id && 0 === strpos( $post->post_mime_type, 'video/' ) ):
+
+ $meta = wp_get_attachment_metadata( $attachment_id );
+ $shortcode = sprintf( '[video src="%s"%s%s]',
+ $att_url,
+ empty( $meta['width'] ) ? '' : sprintf( ' width="%d"', $meta['width'] ),
+ empty( $meta['height'] ) ? '' : sprintf( ' height="%d"', $meta['height'] )
+ );
+ echo do_shortcode( $shortcode );
+
+ endif; ?>
-
-