Make WordPress Core


Ignore:
Timestamp:
03/23/2014 02:34:39 AM (11 years ago)
Author:
wonderboymusic
Message:

Turn on thumbnail support for attachment:audio and attachment:video. Change conditionals to check for theme OR post type support when determining whether to turn on the Featured Image UI pieces in the admin.

Fixes #27460.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/includes/image.php

    r27472 r27657  
    128128    } elseif ( preg_match( '#^video/#', get_post_mime_type( $attachment ) ) ) {
    129129        $metadata = wp_read_video_metadata( $file );
    130         $support = current_theme_supports( 'post-thumbnails', 'attachment:video' ) && post_type_supports( 'attachment:video', 'thumbnail' );
     130        $support = current_theme_supports( 'post-thumbnails', 'attachment:video' ) || post_type_supports( 'attachment:video', 'thumbnail' );
    131131    } elseif ( preg_match( '#^audio/#', get_post_mime_type( $attachment ) ) ) {
    132132        $metadata = wp_read_audio_metadata( $file );
    133         $support = current_theme_supports( 'post-thumbnails', 'attachment:audio' ) && post_type_supports( 'attachment:audio', 'thumbnail' );
     133        $support = current_theme_supports( 'post-thumbnails', 'attachment:audio' ) || post_type_supports( 'attachment:audio', 'thumbnail' );
    134134    }
    135135
Note: See TracChangeset for help on using the changeset viewer.