From 8bc15ab4fc625d5bcd73d9d6c26e88b70b0bbb6a Mon Sep 17 00:00:00 2001 From: Scott Taylor Date: Mon, 24 Mar 2014 14:39:14 +0000 Subject: [PATCH] Do not use the alternative if/elseif/else syntax in `prepend_attachment()` introduced in [27622], as per kovshenin. Fixes #27243. Built from https://develop.svn.wordpress.org/trunk@27682 git-svn-id: http://core.svn.wordpress.org/trunk@27523 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-includes/post-template.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/wp-includes/post-template.php b/wp-includes/post-template.php index b3d57a6f96..6ab77548d4 100644 --- a/wp-includes/post-template.php +++ b/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 = '

'; // show the medium sized image representation of the attachment if available, and link to the raw file $p .= wp_get_attachment_link(0, 'medium', false); $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.