WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 5 years ago

Last modified 5 years ago

#14470 closed defect (bug) (fixed)

Update more default references to Twenty Ten

Reported by: nacin Owned by:
Milestone: 3.1 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch
Focuses: Cc:

Description

A blog with a dead theme will try to revert to 'WordPress Default' via get_current_theme().

Since our fallback/default constant contains the directory and here we need the name, I think it's best to just hard-code this for now (3.0.2, if there will be one). Ideally, we can in a future release restructure the Theme API to stop passing around names as if they are authoritative, because they're messy and ideally the slug should be used. (It's made my revisions project quite annoying.)

We also have logic elsewhere to make sure that Default and Classic impostors are treated secondary to the proper themes. Should we continue to do this for new default themes?

Attachments (1)

theme-fallback-change.diff (1.4 KB) - added by tonyf12 5 years ago.
A patch to expand the existing checks to Twenty Ten, and have get_current_theme return Twenty Ten in that case

Download all attachments as: .zip

Change History (5)

@tonyf125 years ago

A patch to expand the existing checks to Twenty Ten, and have get_current_theme return Twenty Ten in that case

comment:1 @tonyf125 years ago

That's my first time ever submitting a patch for Wordpress (or any open source project) so don't shoot me too much if I got it wrong. I think that covers the "for now" part of the suggestion.

comment:2 @blepoxp5 years ago

  • Keywords has-patch added

comment:3 @nacin5 years ago

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

This was committed. Commit missed the ticket as I horribly botched the ticket number.

(In [15720]) Account for Twenty Ten in theme name collisions and properly fall back to TT in get_current_theme(). fixes #15719, props tonyf12.

Thanks tonyf and congrats on your first patch.

comment:4 @nacin5 years ago

  • Milestone changed from 3.0.2 to 3.1
Note: See TracTickets for help on using tickets.