diff --git a/src/wp-includes/post-template.php b/src/wp-includes/post-template.php index b3d57a6f96..6ab77548d4 100644 --- a/src/wp-includes/post-template.php +++ b/src/wp-includes/post-template.php @@ -1446,12 +1446,12 @@ function prepend_attachment($content) { if ( empty($post->post_type) || $post->post_type != 'attachment' ) return $content; - if ( wp_attachment_is_image() ): + if ( wp_attachment_is_image() ) { $p = '
'; - elseif ( 0 === strpos( $post->post_mime_type, 'video' ) ): + } elseif ( 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'] ) ) { @@ -1459,9 +1459,9 @@ function prepend_attachment($content) { $atts['height'] = (int) $meta['height']; } $p = wp_video_shortcode( $atts ); - elseif ( 0 === strpos( $post->post_mime_type, 'audio' ) ): + } elseif ( 0 === strpos( $post->post_mime_type, 'audio' ) ) { $p = wp_audio_shortcode( array( 'src' => wp_get_attachment_url() ) ); - endif; + } /** * Filter the attachment markup to be prepended to the post content.