| @@ 59-65 (lines=7) @@ | ||
| 56 | } |
|
| 57 | ||
| 58 | $thumbnail_support = current_theme_supports( 'post-thumbnails', $post_type ) && post_type_supports( $post_type, 'thumbnail' ); |
|
| 59 | if ( ! $thumbnail_support && 'attachment' === $post_type && $post->post_mime_type ) { |
|
| 60 | if ( wp_attachment_is( 'audio', $post ) ) { |
|
| 61 | $thumbnail_support = post_type_supports( 'attachment:audio', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:audio' ); |
|
| 62 | } elseif ( wp_attachment_is( 'video', $post ) ) { |
|
| 63 | $thumbnail_support = post_type_supports( 'attachment:video', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:video' ); |
|
| 64 | } |
|
| 65 | } |
|
| 66 | ||
| 67 | if ( $thumbnail_support ) { |
|
| 68 | add_thickbox(); |
|
| @@ 3329-3335 (lines=7) @@ | ||
| 3326 | ); |
|
| 3327 | ||
| 3328 | $thumbnail_support = current_theme_supports( 'post-thumbnails', $post->post_type ) && post_type_supports( $post->post_type, 'thumbnail' ); |
|
| 3329 | if ( ! $thumbnail_support && 'attachment' === $post->post_type && $post->post_mime_type ) { |
|
| 3330 | if ( wp_attachment_is( 'audio', $post ) ) { |
|
| 3331 | $thumbnail_support = post_type_supports( 'attachment:audio', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:audio' ); |
|
| 3332 | } elseif ( wp_attachment_is( 'video', $post ) ) { |
|
| 3333 | $thumbnail_support = post_type_supports( 'attachment:video', 'thumbnail' ) || current_theme_supports( 'post-thumbnails', 'attachment:video' ); |
|
| 3334 | } |
|
| 3335 | } |
|
| 3336 | ||
| 3337 | if ( $thumbnail_support ) { |
|
| 3338 | $featured_image_id = get_post_meta( $post->ID, '_thumbnail_id', true ); |
|