Skip to main content

Timeline for Hide Menu items base on capability

Current License: CC BY-SA 3.0

9 events
when toggle format what by license comment
Apr 13, 2017 at 12:37 history edited CommunityBot
replaced http://wordpress.stackexchange.com/ with https://wordpress.stackexchange.com/
Sep 15, 2012 at 13:55 comment added helgatheviking I did find this: wordpress.stackexchange.com/questions/33342/… which is pretty close.
Sep 15, 2012 at 13:55 vote accept helgatheviking
Sep 15, 2012 at 13:12 comment added fuxia No, you cannot. :) Menus can be created and edited without JavaScript.
Sep 15, 2012 at 13:08 comment added helgatheviking Gotcha. It is marked in the codex as not working perfectly with role name, which is why I thought that. Can I rely on Javascript? Ie, the menu drag and drop already does rely on Javascript so I can assume that most customizing the menu will have Javascript running?
Sep 15, 2012 at 12:52 comment added fuxia current_user_can() accepts role names too, it is just poorly named. And no, there is still no hook to add more fields to menu items. JavaScript might be an option to insert those.
Sep 15, 2012 at 12:48 comment added helgatheviking Great, thanks. I don't think you can pass a role name to current_user_can() though. I wish you could though. On another note is there a way to add some checkboxes to the advanced menu options (along w/ description, etc)? Doesn't look like it, but if there was I could wrap this into a plugin.
Sep 15, 2012 at 9:43 history edited kaiser CC BY-SA 3.0
added 18 characters in body
Sep 15, 2012 at 3:50 history answered fuxia CC BY-SA 3.0