[wp-trac] [WordPress Trac] #23182: Offset error if the first item in an admin menu is a separator

WordPress Trac noreply at wordpress.org
Fri Jan 11 18:03:04 UTC 2013


#23182: Offset error if the first item in an admin menu is a separator
-----------------------------+--------------------------
 Reporter:  phill_brown      |       Type:  defect (bug)
   Status:  new              |   Priority:  normal
Milestone:  Awaiting Review  |  Component:  Menus
  Version:  trunk            |   Severity:  normal
 Keywords:  has-patch        |
-----------------------------+--------------------------
 There are a few ways you can get to this error, but the easiest way with
 the default install is:

 {{{
 add_action( 'admin_menu', create_function( '', 'unset(
 $GLOBALS[\'menu\'][2] );' ) );
 }}}

 I originally came across the error assigning the ''manage_sites''
 capability to a non super admin role. If you do the same and visit /wp-
 admin/network/sites.php - you'll see the same error.

 If this fix is approved, it raises another minor issue with the network
 page. There's now an unnecessary separator at the top of the menu. The
 second patch (network-menu) assigns the same capability requirement to the
 separator as the dashboard.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/23182>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list