Make WordPress Core

#27673 closed defect (bug) (fixed)

Featured Image meta box is displayed for images

Reported by: SergeyBiryukov Owned by: nacin
Milestone: 3.9 Priority: normal
Severity: normal Version: 3.9
Component: Media Keywords: has-patch
Focuses: Cc:


Since [27657], Featured Image meta box is displayed for images too.

Reported by knutsp:

When I edit an image attachment (jpg) I can see a featured image meta box,. I know this is enabled for many other media types, like videos and playlists, but seems strange for an image to have (another) image to represent itself.

Looks like this: https://cloudup.com/cKiCnaLZrao.

Attachments (2)

27673.patch (1.9 KB) - added by SergeyBiryukov 18 months ago.
27673.diff (4.3 KB) - added by nacin 18 months ago.

Download all attachments as: .zip

Change History (12)

@SergeyBiryukov18 months ago

comment:1 @SergeyBiryukov18 months ago

  • Keywords has-patch added

comment:2 @DH-Shredder18 months ago

So, it seems like this is fine if post|theme_supports_thumbnails() are supposed to be only for media thumbnails in the future.

However, if that's the case, perhaps we also want to rename those functions so that they reflect what they do more properly? Something like post|theme_supports_media_thumbnails()?

comment:3 @nacin18 months ago

Yeah, I'd like to use this ticket as an opportunity to revisit/reconsider these new functions. They are too generic and are conflicting as they are ostensibly a higher-level API than current_theme_supports() / post_type_supports() but aren't really named that way. They're also minimally used outside of edit-form-advanced.php and I'd almost rather see the logic stay inline.

comment:4 @ircbot18 months ago

This ticket was mentioned in IRC in #wordpress-dev by nacin|sleep. View the logs.

@nacin18 months ago

comment:5 @nacin18 months ago

27673.diff restores 3.8 logic, with some updated checks (it's not a clean revert). I don't love that it's used in two places, but I find it to be a lot better than the overly generic functions. The logic here is really confusing, the generic functions don't help at all really.

comment:6 @wonderboymusic18 months ago

This is problematic because it will require every theme to register support for thumbnails. The thinking was that it should be changed to theme OR post_type support - support was registered for attachment:audio and attachment:video so that their covers will be slurped automatically.

Thumbnail support in the admin really shouldn't be tied to a theme. Imagine one theme supports album covers and one doesn't - as it currently stands, videos and playlists are the only place where they are displayed, which have nothing to do with the theme.

comment:7 @nacin18 months ago

This patch does not require the theme to register support for thumbnails.

comment:8 @ircbot18 months ago

This ticket was mentioned in IRC in #wordpress-dev by nacin. View the logs.

comment:9 @wonderboymusic18 months ago

I missed the ! part of the patch - nacin wins again

comment:10 @nacin18 months ago

  • Owner set to nacin
  • Resolution set to fixed
  • Status changed from new to closed

In 28051:

Don't show featured images for image attachments. Remove abstractions for now.

fixes #27673.

Note: See TracTickets for help on using tickets.