[wp-trac] [WordPress Trac] #15317: My Sites limited to 23 sites on Admin Bar

WordPress Trac noreply at wordpress.org
Mon May 11 07:38:56 UTC 2015


#15317: My Sites limited to 23 sites on Admin Bar
--------------------------+-----------------------------
 Reporter:  ronbme        |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  low           |   Milestone:  Future Release
Component:  Toolbar       |     Version:  3.1
 Severity:  normal        |  Resolution:
 Keywords:  has-patch     |     Focuses:  multisite
--------------------------+-----------------------------

Comment (by magnus78):

 The css patch seems to work for me. In IE there's a slight glitch, but
 even there I think it's a vast improvement.

 The fix in the form of a plugin:



 {{{
 /**
  * Make the My Sites list scroll if too many blogs
  */
 function custom_my_sites() {
   $user_id = get_current_user_id();
   $user_blogs = get_blogs_of_user( $user_id );
   if (count($user_blogs) > 12) {
      echo '<style type="text/css">
       #wp-admin-bar-my-sites-list {
         max-height: 90vh;
         overflow-y: auto;
         overflow-x: visible;
       }
       #wpadminbar .menupop li.hover {
         position: relative;
       }
       #wpadminbar .menupop li.hover > .ab-sub-wrapper {
         margin-left: 337px;
         margin-top: -32px;
         position: fixed;
       }
      </style>';
   }
 }
 add_action('admin_head', 'custom_my_sites');
 }}}

--
Ticket URL: <https://core.trac.wordpress.org/ticket/15317#comment:23>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list