Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#27673 closed defect (bug) (fixed)

Featured Image meta box is displayed for images

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: nacin's profile 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:

Attachments (2)

27673.patch (1.9 KB) - added by SergeyBiryukov 10 years ago.
27673.diff (4.3 KB) - added by nacin 10 years ago.

Download all attachments as: .zip

Change History (12)

#1 @SergeyBiryukov
10 years ago

  • Keywords has-patch added

#2 @kirasong
10 years 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()?

#3 @nacin
10 years 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.

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

10 years ago

10 years ago

#5 @nacin
10 years 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.

#6 @wonderboymusic
10 years 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.

#7 @nacin
10 years ago

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

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

10 years ago

#9 @wonderboymusic
10 years ago

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

#10 @nacin
10 years 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.