[wp-trac] [WordPress Trac] #48294: 5.3 breaks counters used in submenu items

WordPress Trac noreply at wordpress.org
Sat Oct 12 12:53:59 UTC 2019


#48294: 5.3 breaks counters used in submenu items
--------------------------+-----------------------------
 Reporter:  netweblogic   |      Owner:  (none)
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  General       |    Version:  trunk
 Severity:  minor         |   Keywords:
  Focuses:                |
--------------------------+-----------------------------
 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
 <?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.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/48294>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list