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
This commit is contained in:
Scott Taylor 2014-03-24 14:39:14 +00:00
parent f20dbd9c68
commit 8bc15ab4fc
1 changed files with 4 additions and 4 deletions

View File

@ -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 = '<p class="attachment">';
// 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 .= '</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.