[wp-trac] [WordPress Trac] #49977: Multisite: 'mu_menu_items' filter leaves empty table on Network Settings

WordPress Trac noreply at wordpress.org
Wed Apr 22 18:57:47 UTC 2020


#49977: Multisite: 'mu_menu_items' filter leaves empty table on Network Settings
--------------------------------+---------------------------------------
 Reporter:  dlh                 |      Owner:  (none)
     Type:  defect (bug)        |     Status:  new
 Priority:  normal              |  Milestone:  Awaiting Review
Component:  Networks and Sites  |    Version:  3.0
 Severity:  normal              |   Keywords:  has-patch has-screenshots
  Focuses:  multisite           |
--------------------------------+---------------------------------------
 As a developer maintaining a multisite network, I'd like to prevent super
 administrators from enabling any administration menus on individual sites,
 such as "Plugins." I can do this with:

 `add_filter( 'mu_menu_items', '__return_empty_array' );`

 However, the `Menu Settings` heading and empty settings table still appear
 on the Network Settings screen. See the attached screenshot.

 The attached patch would check for available menus after applying
 `mu_menu_items` and before rendering the markup.

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


More information about the wp-trac mailing list