Opened 9 years ago
Closed 9 years ago
#35081 closed defect (bug) (fixed)
Missing Change Theme button when there are only two themes available
Reported by: | igmoweb | Owned by: | westonruter |
---|---|---|---|
Milestone: | 4.4.1 | Priority: | normal |
Severity: | normal | Version: | 4.4 |
Component: | Customize | Keywords: | commit fixed-major |
Focuses: | Cc: |
Description
When you have two themes in your installation, Change Theme button in Customizer is missing. I guess this is not a expected behavior, isn't it?
My thoughts:
It looks like in class-wp-customize-themes-section.php, line no. 49:
if ( count( $this->controls ) > 1 )
$this->controls does not include the current theme in the list. So there are two easy approaches for this:
- Make the condition "> 0"
- Add the current theme as a control in class-wp-customize-manager.php
Bear in mind that in a multisite, you want to display the network activated Themes, not all the themes, just in case something extra is needed for this fix in a Multisite
Attachments (1)
Change History (8)
#1
@
9 years ago
- Milestone changed from Awaiting Review to 4.4.1
- Owner set to westonruter
- Status changed from new to accepted
#2
@
9 years ago
- Keywords commit added
@igmoweb you're right. In fact a bit lower in the theme it even indicates that > 0
should have been used because it adds one to the number of controls:
<span class="title-count theme-count"><?php echo count( $this->controls ) + 1 /* Active theme */; ?></span>
Note: See
TracTickets for help on using
tickets.
See #34549 for where this was originally introduced.