Opened 16 years ago
Closed 16 years ago
#9865 closed defect (bug) (duplicate)
Admin Theme page doesn't allow selection of theme if only 1 theme present
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 2.7.1 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
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.
See #9029