Make WordPress Core

Opened 6 years ago

Closed 6 years ago

Last modified 5 years ago

#50334 closed defect (bug) (fixed)

The Theme Installer displays an "Activate" button for the already active theme

Reported by: afercia's profile afercia Owned by: sergeybiryukov's profile SergeyBiryukov
Milestone: 5.5 Priority: normal
Severity: normal Version: 4.6
Component: Themes Keywords: has-screenshots has-patch
Focuses: Cc:

Description

Noticed while investigating on #50316.

In previous versions of WordPress, when navigating themes in the Theme Installer, the active theme displayed a visually disabled button (actually it's a href="#" link) with text "Installed". See first screenshot attached below.

Starting from WordPress 4.6, this button (actually still a link) is a working link with text "Activate", which doesn't make much sense as the displayed theme is already the active one. See second screenshot attached below.

Not sure if this change was intentional, but worth investigating. In any case, the "Activate" button/link is a bit misleading.

To reproduce:

  • take note of the name of your currently active theme
  • go to the Add Themes page, located at wp-admin/theme-install.php?browse=featured
  • search for the name of your active theme
  • in the search results, click on "Details & Preview" on your active theme
  • the Theme Installer opens
  • observe the button/link at the top of the left sidebar and see the text says "Activate"
  • click the link
  • the theme installer opens and a notice appears on the page with the message "New theme activated. Visit site"

Attachments (3)

theme installer 3.9.png (27.3 KB) - added by afercia 6 years ago.
WP 3.9 Theme Installer displays an "Installed" button for the Active theme
theme installer 4.6.png (28.7 KB) - added by afercia 6 years ago.
WP 4.6 Theme Installer displays an "Activate" button for the Active theme
50334.diff (2.9 KB) - added by SergeyBiryukov 6 years ago.

Download all attachments as: .zip

Change History (10)

@afercia
6 years ago

WP 3.9 Theme Installer displays an "Installed" button for the Active theme

@afercia
6 years ago

WP 4.6 Theme Installer displays an "Activate" button for the Active theme

#1 @joyously
6 years ago

Could this be a side effect of the change in the theme previewer, to remove the cookies?

#2 @SergeyBiryukov
6 years ago

  • Milestone changed from Awaiting Review to 5.5
  • Owner set to SergeyBiryukov
  • Status changed from new to accepted

Good catch, introduced in [37714].

@SergeyBiryukov
6 years ago

#3 @SergeyBiryukov
6 years ago

  • Keywords has-patch added

#4 @SergeyBiryukov
6 years ago

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

In 47924:

Themes: Show a disabled "Activated" button instead of "Activate" for the active theme on Add Themes screen.

Additionally, switch the "Live Preview" label for the active theme to "Customize", for consistency with the Themes screen.

Props afercia, SergeyBiryukov.
Fixes #50334.

This ticket was mentioned in Slack in #core-editor by noahtallen. View the logs.


6 years ago

#6 @SergeyBiryukov
6 years ago

In 48037:

Themes: Ensure the theme slug is set before checking if the theme is installed or active.

This fixes an issue with every installed theme being marked as active on Themes screen.

The slug is set on Add Themes screen, but not on Themes.

Follow-up to [47924].

Props BackuPs, mukesh27, SergeyBiryukov.
Fixes #50381. See #50334.

This ticket was mentioned in Slack in #core by talldanwp. View the logs.


5 years ago

Note: See TracTickets for help on using tickets.