[wp-trac] [WordPress Trac] #29213: Introduce capability for access to nav-menus.php
WordPress Trac
noreply at wordpress.org
Thu Jan 15 06:50:31 UTC 2015
#29213: Introduce capability for access to nav-menus.php
------------------------------------+-----------------------------
Reporter: westonruter | Owner: ocean90
Type: enhancement | Status: reviewing
Priority: normal | Milestone: 4.2
Component: Menus | Version: 3.0
Severity: normal | Resolution:
Keywords: has-patch dev-feedback | Focuses: administration
------------------------------------+-----------------------------
Changes (by westonruter):
* keywords: has-patch => has-patch dev-feedback
* owner: westonruter => ocean90
* status: assigned => reviewing
Comment:
In [attachment:29213.2.diff]:
* Use `manage_menus` cap instead of `edit_nav_menus`. The use of “menus”
makes sense instead of “nav_menus” because the theme support is called
“menus”. Though at the same time, the post type is called “nav_menu_item”
and the taxonomy is called “nav_menu”. I am not partial to either
capability. I think celloexpressions should have the last word :-)
* Bubble-up submenu admin page capability in addition to location; replace
label if no children left. This is based on the great research by jesin.
If the user lacks the capability for the original menu parent, then the
capability and location of the first sub-menu item is assigned to the
parent. If there is only one submenu item anyway, then the label is also
copied up to the parent item.
* Show the “Menus” link in the admin bar if the user can `manage_menus`.
Also, the change here also allows other menu items (specifically
“Customize”) to appear in the admin bar if they have the required
capability. Previously, the entire menu would short-circuit if the user
lacked `edit_theme_options`.
Note that the changes to allow the Menus link to appear in the admin menu
and the admin bar were also initially done in the Customizer for #28605.
However, it was [https://core.trac.wordpress.org/ticket/28605#comment:12
decided on IRC] that Core support for displaying the Customize links would
be removed and it would have to be manually added in by a plugin that also
granted the user the `customize` capability. We'll need to decide if that
decision remains.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/29213#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list