WordPress.org

Make WordPress Core

Opened 3 years ago

Closed 3 years ago

#18599 closed enhancement (wontfix)

If child theme is missing a screenshot, use the parent theme's screenshot

Reported by: Viper007Bond Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.3
Component: Administration Keywords: has-patch
Focuses: Cc:

Description

If a child theme is missing a screenshot file, then we should display the parent theme's screenshot file. Chances are it will be accurate and it'll look better than the current blank spot that is displayed instead.

Attachments (3)

18599.patch (4.7 KB) - added by Viper007Bond 3 years ago.
Introduces new Screenshot URI attribute while maintaining backwards compatibility
18599.2.patch (2.6 KB) - added by SergeyBiryukov 3 years ago.
18599.3.patch (3.2 KB) - added by SergeyBiryukov 3 years ago.

Download all attachments as: .zip

Change History (15)

comment:1 @Viper007Bond3 years ago

Working on a patch.

comment:2 follow-up: @jane3 years ago

I don't think I like this idea.... child theming often changes superficial things like colors and layout, so the most likely reason for a child theme to exist is the same reason not to use the same screenshot.

Maybe instead prompt child theme uploaders* to add a screenshot and link to Codex directions on how to do so?

*If they upload to repo (vs individual dashboard), they should be required to include screenshot already, yeah?

@Viper007Bond3 years ago

Introduces new Screenshot URI attribute while maintaining backwards compatibility

comment:3 in reply to: ↑ 2 @Viper007Bond3 years ago

Replying to jane:

I don't think I like this idea.... child theming often changes superficial things like colors and layout, so the most likely reason for a child theme to exist is the same reason not to use the same screenshot.

If that's the case, then they should be including a screenshot image file of their own. :)

Maybe instead prompt child theme uploaders* to add a screenshot and link to Codex directions on how to do so?

*If they upload to repo (vs individual dashboard), they should be required to include screenshot already, yeah?

Yes, I bet the theme directory requires a screenshot so no problems there. This is more about one-off themes that people make to avoid modifying the parent theme -- that's exactly what I'm doing right now for example. I want to make modifications to my theme without having updating my theme to it's latest version be a major PITA. I could clone the screenshot file into my child theme, but what if the parent theme updates its screenshot?

Last edited 3 years ago by Viper007Bond (previous) (diff)

comment:4 @Viper007Bond3 years ago

  • Keywords has-patch added

@SergeyBiryukov3 years ago

comment:5 @SergeyBiryukov3 years ago

I just wanted to give it a crack when I saw the ticket, and I ended up with a bit more simple, but less elegant patch.

It's probably not of use, so I've added it just in case.

comment:6 @scribu3 years ago

I like the idea of this ticket, but I don't like the idea of adding a Screenshot URI attribute.

Therefore, I think 18599.2.patch is the way to go.

comment:7 @Viper007Bond3 years ago

My patch was originally similar to Sergey's, but the issue is that the child theme and parent theme don't have to be in the same folder so $theme_root can vary between the two.

It has to go off of both $stylesheet_dir and $template_dir.

@SergeyBiryukov3 years ago

comment:8 @SergeyBiryukov3 years ago

I've updated the patch to use $stylesheet_dir and $template_dir.

comment:9 @scribu3 years ago

So, for example, you can have a child theme for the default BuddyPress theme, without moving it from plugins/buddypress?

comment:10 follow-ups: @jane3 years ago

I just still think it's better to have no screenshot than one that is not accurate. You say in the ticket description "Chances are it will be accurate," but why would you assume that to be the case? A 2-column theme can become a 3 column theme. A blue theme can become red.

If the main use case here is someone making their own child theme, they a) have the ability to upload a screenshot, and b) know what it looks like. And if it winds up in the dashboard of someone other than the maker, then it is important that the picture be accurate. If a theme author does not include a screenshot with their theme, we should not be injecting one into it. It's just not cool.

comment:11 in reply to: ↑ 10 @Viper007Bond3 years ago

If a child theme looks different than it's parent, then it should have a screenshot file. But what about a child theme that looks the same as its parent theme? Should the child theme then have to duplicate the parent theme screenshot? What if said screenshot is updated in the parent theme?

You're probably right though that it's better to display no screenshot than a potentially inaccurate one.

comment:12 in reply to: ↑ 10 @westi3 years ago

  • Milestone Awaiting Review deleted
  • Resolution set to wontfix
  • Status changed from new to closed

Replying to jane:

I just still think it's better to have no screenshot than one that is not accurate. You say in the ticket description "Chances are it will be accurate," but why would you assume that to be the case? A 2-column theme can become a 3 column theme. A blue theme can become red.

If the main use case here is someone making their own child theme, they a) have the ability to upload a screenshot, and b) know what it looks like. And if it winds up in the dashboard of someone other than the maker, then it is important that the picture be accurate. If a theme author does not include a screenshot with their theme, we should not be injecting one into it. It's just not cool.

Agreed.

Closing as WONTFIX.

Note: See TracTickets for help on using tickets.