Ticket #27634: 27634.patch
File 27634.patch, 1.3 KB (added by , 11 years ago) |
---|
-
src/wp-includes/post-template.php
1453 1453 if ( empty($post->post_type) || $post->post_type != 'attachment' ) 1454 1454 return $content; 1455 1455 1456 if ( wp_attachment_is_image() ) { 1457 $p = '<p class="attachment">'; 1458 // show the medium sized image representation of the attachment if available, and link to the raw file 1459 $p .= wp_get_attachment_link(0, 'medium', false); 1460 $p .= '</p>'; 1461 } elseif ( 0 === strpos( $post->post_mime_type, 'video' ) ) { 1456 if ( 0 === strpos( $post->post_mime_type, 'video' ) ) { 1462 1457 $meta = wp_get_attachment_metadata( get_the_ID() ); 1463 1458 $atts = array( 'src' => wp_get_attachment_url() ); 1464 1459 if ( ! empty( $meta['width'] ) && ! empty( $meta['height'] ) ) { … … 1468 1463 $p = wp_video_shortcode( $atts ); 1469 1464 } elseif ( 0 === strpos( $post->post_mime_type, 'audio' ) ) { 1470 1465 $p = wp_audio_shortcode( array( 'src' => wp_get_attachment_url() ) ); 1466 } else { 1467 $p = '<p class="attachment">'; 1468 // show the medium sized image representation of the attachment if available, and link to the raw file 1469 $p .= wp_get_attachment_link( 0, 'medium', false ); 1470 $p .= '</p>'; 1471 1471 } 1472 1472 1473 1473 /**