[wp-trac] [WordPress Trac] #42486: The Tools screen is blank for users who cannot manage categories or tags

WordPress Trac noreply at wordpress.org
Thu Jan 25 02:49:22 UTC 2018


#42486: The Tools screen is blank for users who cannot manage categories or tags
---------------------------------------------------+--------------------
 Reporter:  johnbillion                            |       Owner:
     Type:  defect (bug)                           |      Status:  new
 Priority:  normal                                 |   Milestone:  4.9.4
Component:  Administration                         |     Version:  4.9
 Severity:  normal                                 |  Resolution:
 Keywords:  has-patch needs-testing needs-refresh  |     Focuses:
---------------------------------------------------+--------------------

Comment (by seanchayes):

 I refreshed the patch and added the same logic from `wp-admin/tools.php`
 to help determine if the Tools menu needs to be displayed.

 So, if something adds an action to `tool_box`, there's some entries for
 the Tools menu and the current user can manage default taxonomies the
 '''Tools''' menu will be shown.

 For testing, I set up some local users - a subscriber, an author and an
 editor and added a function to a child theme (which could just as well
 have been a plugin) that added something to the `tool_box` action.

 For each user, and while the added function was in place, the '''Tools'''
 menu displayed. As soon as I removed the function then regardless of non-
 admin user the '''Tools''' menu was hidden.

 I couldn't think of any worthwhile text to display on at the `wp-
 admin/tools.php` page when it is empty and no submenu items are displayed
 and nothing is hooked into `tool_box` so it just shows the '''Tools'''
 heading if you go there directly and are not an admin or with the
 capabilities tested for.

 `42486v2.diff` is the patch with these changes.

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


More information about the wp-trac mailing list