WordPress.org

Make WordPress Core

Changeset 27908


Ignore:
Timestamp:
04/02/2014 05:13:09 PM (6 years ago)
Author:
wonderboymusic
Message:

Fix a regression caused by [27622] in prepend_attachment() by passing all attachments that are not audio or video to the else clause.

Fixes #27634.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/post-template.php

    r27755 r27908  
    14541454        return $content;
    14551455
    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' ) ) {
    14621457        $meta = wp_get_attachment_metadata( get_the_ID() );
    14631458        $atts = array( 'src' => wp_get_attachment_url() );
     
    14691464    } elseif ( 0 === strpos( $post->post_mime_type, 'audio' ) ) {
    14701465        $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>';
    14711471    }
    14721472
Note: See TracChangeset for help on using the changeset viewer.