Make WordPress Core

Opened 15 years ago

Closed 15 years ago

#9865 closed defect (bug) (duplicate)

Admin Theme page doesn't allow selection of theme if only 1 theme present

Reported by: alexkingorg's profile alexkingorg Owned by:
Milestone: Priority: normal
Severity: normal Version: 2.7.1
Component: General Keywords:
Focuses: Cc:


Today I was setting up a site and wholesale replaced the default 'wp-content/themes' directory with a 'wp-content/themes' directory checked out of our SVN. This removed the default theme (Kubrick) and left only the theme I was working on for the site.

The wp-admin/themes.php file has code at line 139 that checks to see if more than one theme is present:

<code>if ( 1 < $theme_total ) {</code>

If more than 1 theme is found, then the grid of themes is shown so that you can choose between them. However, in my situation I had deleted all other themes leaving just 1 theme but had not yet activated that theme. With this edge case, no theme is active, and there is no way to select the 1 theme that is in the 'wp-content/themes' directory.

I recommend this code change so that if the current theme ($ct) is not in the theme list, all themes are shown for selection.

Change History (1)

#1 @ryan
15 years ago

  • Milestone Unassigned deleted
  • Resolution set to duplicate
  • Status changed from new to closed

See #9029

Note: See TracTickets for help on using tickets.