diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index dfc74f6ce0..be462587a2 100644 --- a/wp-includes/post-template.php +++ b/wp-includes/post-template.php @@ -1453,12 +1453,7 @@ function prepend_attachment($content) { if ( empty($post->post_type) || $post->post_type != 'attachment' ) return $content; - if ( wp_attachment_is_image() ) { - $p = '
'; - } elseif ( 0 === strpos( $post->post_mime_type, 'video' ) ) { + if ( 0 === strpos( $post->post_mime_type, 'video' ) ) { $meta = wp_get_attachment_metadata( get_the_ID() ); $atts = array( 'src' => wp_get_attachment_url() ); if ( ! empty( $meta['width'] ) && ! empty( $meta['height'] ) ) { @@ -1468,6 +1463,11 @@ function prepend_attachment($content) { $p = wp_video_shortcode( $atts ); } elseif ( 0 === strpos( $post->post_mime_type, 'audio' ) ) { $p = wp_audio_shortcode( array( 'src' => wp_get_attachment_url() ) ); + } else { + $p = ' '; } /**