Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#25959 closed defect (bug) (fixed)

Appearance Themes: base64 encode a default theme screenshot for when a theme lacks one

Reported by: matveb's profile matveb Owned by: ocean90's profile ocean90
Milestone: 3.8 Priority: normal
Severity: normal Version: 3.8
Component: Customize Keywords: has-patch
Focuses: ui Cc:

Description

Display a fallback image when a theme lacks a screenshot instead of returning false.

(The image provided can also be reduced to a simple pattern and use background-repeat.)

Attachments (4)

default.png (6.4 KB) - added by matveb 10 years ago.
25959.diff (2.1 KB) - added by shaunandrews 10 years ago.
Adding a base64 encoded background image to themes without a screenshot.png.
25959.2.diff (2.4 KB) - added by matveb 10 years ago.
25959.3.diff (691 bytes) - added by kovshenin 10 years ago.

Download all attachments as: .zip

Change History (16)

@matveb
10 years ago

@shaunandrews
10 years ago

Adding a base64 encoded background image to themes without a screenshot.png.

@matveb
10 years ago

#2 @matveb
10 years ago

  • Keywords has-patch added

Looks good! Moved the second check a bit so the multiple screenshot part is kept inside the first conditional.

#3 @dd32
10 years ago

Why are we base64'ing an image in the CSS?
What benefit does it have other than adding an extra image to core to handle it instead?

#4 @matveb
10 years ago

Not much really. It was an image before. Nacin mentioned it would be interesting to try encoding it instead — avoid a request for what is a very simple image pattern.

#5 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 3.8

#6 @SergeyBiryukov
10 years ago

  • Keywords ui-focus added

#7 @dd32
10 years ago

In 26462:

Themes: Add a default image for when a theme doesn't have a screenshot. Props matveb. See #25959

#8 @ocean90
10 years ago

In 26473:

Themes: Add missing close tag, see [26462]. see #25959.

#9 @ocean90
10 years ago

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

#10 @dd32
10 years ago

I had left this open specifically for feedback for lack-of-screenshot placeholder, so re-open if someone thinks the placeholder could be better or have an alternative.

@kovshenin
10 years ago

#11 @kovshenin
10 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

The missing closing tag in [26473] was not really missing, but 25959.3.diff makes it easer to read.

#12 @ocean90
10 years ago

  • Owner set to ocean90
  • Resolution set to fixed
  • Status changed from reopened to closed

In 26504:

Themes: Fix HTML markup for screenshots. props kovshenin. fixes #25959.

Note: See TracTickets for help on using tickets.