WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 3 weeks ago

#43697 reviewing enhancement

Add theme update counter in admin theme menu item

Reported by: mukesh27 Owned by: SergeyBiryukov
Milestone: 5.8 Priority: normal
Severity: normal Version:
Component: Themes Keywords: has-patch has-screenshots dev-feedback needs-testing
Focuses: ui, administration Cc:

Description

Add theme update counter in admin theme menu item as we show for plugin menu item.

Attachments (6)

theme-update.png (617.9 KB) - added by mukesh27 3 years ago.
43697.patch (1.3 KB) - added by mukesh27 3 years ago.
43697.2.patch (1.3 KB) - added by mukesh27 3 years ago.
updated patch
43697.3.diff (1.4 KB) - added by zodiac1978 3 weeks ago.
Updated patch. Count is added to "appearance" now and is using the correct class names and caps.
Bildschirmfoto 2021-02-06 um 22.07.04.png (45.5 KB) - added by zodiac1978 3 weeks ago.
New screenshot showing the badge
43697.4.diff (1.4 KB) - added by zodiac1978 3 weeks ago.
Corrected wrong comment text.

Download all attachments as: .zip

Change History (15)

@mukesh27
3 years ago

@mukesh27
3 years ago

#1 @mukesh27
3 years ago

  • Keywords has-patch has-screenshots added

#2 @joyously
3 years ago

Why does your code use the update-plugins capability and class name?

This used to work. Can you look back at older versions for that code?

Last edited 3 years ago by joyously (previous) (diff)

@mukesh27
3 years ago

updated patch

#3 @mukesh27
3 years ago

ohhh, i have updated new patch

#4 @pento
2 years ago

  • Version trunk deleted

#5 @SergeyBiryukov
3 weeks ago

#52425 was marked as a duplicate.

#6 @zodiac1978
3 weeks ago

  • Focuses ui added

@joyously I think using update-plugins as class name is not very intuitive, but at the moment correct.

The network menu is using it too:
https://github.com/WordPress/WordPress/blob/b3b8942dfcb451eddb5559b63c1043fce5d9449e/wp-admin/network/menu.php#L65

We could either use it here too or add the class name to the CSS, because at the moment it does not exist:
https://github.com/WordPress/WordPress/search?q=update-themes

@mukesh27 Looking at the patch and the screenshot it shows an inconsistent behavior: The badge is added to the first submenu item instead of the main menu item ("Appearance"), like it is seen for the "Plugins" menu item.

I would vote for using the same design as for Plugins (which is also used in a multisite):
https://github.com/WordPress/WordPress/blob/b3b8942dfcb451eddb5559b63c1043fce5d9449e/wp-admin/network/menu.php#L59-L79

@zodiac1978
3 weeks ago

Updated patch. Count is added to "appearance" now and is using the correct class names and caps.

@zodiac1978
3 weeks ago

New screenshot showing the badge

#7 @zodiac1978
3 weeks ago

I am still experiencing a strange behavior. There is a paid theme in my test environment with available update, but the notice "Automatic update is unavailable for this theme."

After leaving the themes.php page the count is changing from 7 to 6. On all admin pages it stays on 6. Just on update-core.php it is showing 7 again.

#8 @zodiac1978
3 weeks ago

  • Keywords dev-feedback needs-testing added

@zodiac1978
3 weeks ago

Corrected wrong comment text.

#9 @SergeyBiryukov
3 weeks ago

  • Milestone changed from Awaiting Review to 5.8
  • Owner set to SergeyBiryukov
  • Status changed from new to reviewing
Note: See TracTickets for help on using tickets.