#48294 closed defect (bug) (fixed)
5.3 breaks counters used in submenu items
| Reported by: | 
  
     | 
      Owned by: | 
  
     | 
    
|---|---|---|---|
| Milestone: | 5.3 | Priority: | normal | 
| Severity: | minor | Version: | 5.3 | 
| Component: | Administration | Keywords: | |
| Focuses: | ui | Cc: | |
| PR Number: | 
Description
Changes in CSS for 5.3 breaks the use of counters in submenu pages. There are plugins that add counter alerts within menus for various reasons (for example, a new CPT needing revision from an admin).
Previously the snippet below would work in <5.3 and now the number is not styled:
<?php add_action('admin_menu', function(){ $count = '<span class="update-plugins count-10"><span class="plugin-count">10</span></span>'; add_options_page('Example', 'Example'.$count, 'manage_options', 'example', '__return_false'); });
It might be worth creating a sub-menu css class, or at least warning devs of this breaking change in a blog post.
Change History (7)
    
      
    #1
  
    
        
          
            
 @
            
6 weeks ago
        
    
  
  
  - Component changed from General to Administration
 - Focuses ui added
 - Milestone changed from Awaiting Review to 5.3
 
    
      
        
        
This ticket was mentioned in Slack in #core by jeffpaul. View the logs.
      
      
6 weeks ago
    
    
  
              Note: See
        TracTickets for help on using
        tickets.
    
Breaking change here:
https://core.trac.wordpress.org/changeset?old=46332&old_path=trunk%2Fsrc%2Fwp-admin%2Fcss%2Fadmin-menu.css&new=46453&new_path=trunk%2Fsrc%2Fwp-admin%2Fcss%2Fadmin-menu.css