Make WordPress Core

Opened 12 years ago

Closed 12 years ago

Last modified 12 years ago

#21231 closed defect (bug) (fixed)

Twenty Twelve: Adjust backwards compatibility

Reported by: obenland's profile obenland Owned by: lancewillett's profile lancewillett
Milestone: 3.5 Priority: normal
Severity: normal Version:
Component: Bundled Theme Keywords: has-patch
Focuses: Cc:

Description

Twenty Twelve provides back-compat with 3.3.

It'll be bundled with 3.5 and released to extend at the earliest with 3.4 in the wild for over two months...

Attachments (2)

21231.diff (2.9 KB) - added by obenland 12 years ago.
21231.2.diff (87.5 KB) - added by obenland 12 years ago.

Download all attachments as: .zip

Change History (11)

@obenland
12 years ago

#1 follow-up: @nacin
12 years ago

  • Milestone changed from Awaiting Review to 3.5
  • Summary changed from Twenty Twelve: Remove backwards compatibility to Twenty Twelve: Adjust backwards compatibility

I prefer the inline function_exists() approach that Twenty Eleven used to the conditional define of get_custom_header() used here (and by _s), so that was probably going to change either way.

I am fine with making it backwards compatible with only 3.4, but we should avoid it from fatal erroring in lower versions, as the theme directory does not contain compatibility aspects yet.

#2 @obenland
12 years ago

So in this case, the only thing not to be removed would be the wp_get_theme() check.

With providing no back-compat for custom headers, the get_custom_header() calls in header.php will never be accessed, since the Theme does not register support. (Just tested with 3.3.1, too)

Do you agree?

#3 @lancewillett
12 years ago

  • Cc lancewillett added

#4 in reply to: ↑ 1 @lancewillett
12 years ago

Replying to nacin:

I prefer the inline function_exists() approach that Twenty Eleven used to the conditional define of get_custom_header() used here (and by _s), so that was probably going to change either way.

Let me know the preferred method and I'll fix it.

I am fine with making it backwards compatible with only 3.4, but we should avoid it from fatal erroring in lower versions, as the theme directory does not contain compatibility aspects yet.

Shouldn't default themes go back 2 versions? I'd suggest making it 3.3 compat if possible.

#5 @obenland
12 years ago

While WPTRT guidelines allow you to provide support for two prior versions, it recommends to max it to one.

With the custom header shiv removed, Twenty Twelve would still be compatible to 3.3 in the sense of not breaking. It would just lack custom header support.

Would that be acceptable?

#6 @lancewillett
12 years ago

  • Keywords needs-refresh added; dev-feedback removed

Chatted today in IRC #wordpress-dev, and decided to go back-compat to 3.1 (which is essentially the same as 3.3).

obenland is going to look and refresh his patch to remove the custom header fallbacks.

3.3 and earlier will not have custom header support, which is OK because there isn't one on by default in this theme.

@obenland
12 years ago

#7 @lancewillett
12 years ago

  • Keywords needs-refresh removed

@obenland .2 patch has some extra code in it -- just FYI. :)

#8 @lancewillett
12 years ago

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

In [21328]:

Twenty Twelve: remove back compat for custom header image, installs prior to 3.4 will not see it as an option. Props obenland, closes #21231.

#9 @lancewillett
12 years ago

In [21329]:

Twenty Twelve: remove unneeded filter (props nacin) and fix up PHP comment blocks in custom-header.php file for s/@package/@since/ on individual functions. See #21231.

Note: See TracTickets for help on using tickets.