Admin Menu Editor For WordPress

Here is my latest and hack-iest plugin yet – Admin Menu Editor. It’s a WordPress plugin that will let you manually edit the Dashboard menu. You can reorder the menus, show/hide specific items, change access rights, and more. The plugin is still a bit rough around the edges, so a good understading of WP internals is recommended (but not required).

Features

  • Sort menu items any way you want by simple drag & drop.
  • Move a menu item to a different submenu via cut & paste. Note that if you move an item that belongs to a plugin, you will need to modify the “File” attribute to point to the right parent file (e.g. instead of “akismet-key-config” use “options-general.php?page=akismet-key-config”).
  • Edit any existing menu – change the title, access rights, menu icon and so on. Note that you can’t lower the required access rights, but you can change them to be more restrictive.
  • Hide/show any menu or menu item. A hidden menu is invisible to all users, including administrators.
  • Create custom menus that point to any part of the Dashboard. For example, you could create a new menu leading directly to the “Pending comments” page.

Here’s a screenshot :

Admin Menu Editor screenshot

Download

admin-menu-editor.zip (33 KB)

Requirements :

  • WordPress 2.7 or later
  • PHP 5 or later

Known Issues

The basic idea for the plugin was suggested by several commenters way back in October. However, the internal menu system that WordPress uses is obscure and unsuitable for direct manipulation, so I spent quite a while inventing workarounds. And even after a few weeks of pondering, there are some things I haven’t quite fixed.

  • If you delete any of the default menus they will reappear after saving. This is not a bug, it’s a feature ;)
  • As I mentioned before, the access rights required for using a particular menu item can’t be lowered, but can be made more strict. I think.
  • Also, a plugin’s menu that is moved to a different submenu will not work unless you also include the parent file in the “File” field. This is because WP “ties” the menu item to it’s parent menu and won’t recognize it in a different submenu.
  • If you create a custom menu (or change the “File” setting of an existing menu), be sure to tick the “Custom” checkbox. Otherwise that item will not show up in the final Dashboard menu.

Merry Christmas, by the way :)

Share :
  • Reddit
  • del.icio.us
  • Digg
  • StumbleUpon
  • DZone
  • Ping.fm
  • Sphinn
  • Twitter
Related posts :

271 Responses to “Admin Menu Editor For WordPress”

Pages: « 1 [2] 3 4 5 6 7 8 9 10 » Show All

  1. 2
    White Shadow says:

    Fixed. I thought about adding sort buttons, but decided to leave them out in the first release. So it’s probable I’ll add this feature eventually.

  2. [...] att passa in på eyesx.com. Klicka på “Läs mer” för att se hela listan av tillägg. Admin Menu Editor – Ett meny tillägg för att arrangera ordningen av de nya menyn i 2.7. Av Janis [...]

  3. 4
    ts says:

    Hi, I’m getting a syntax error when I’m trying to activate the plugin

    “Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /var/www/…/wordpress/wp-content/plugins/menu-editor/menu-editor.php on line 26″

  4. 5
    White Shadow says:

    You probably have an old version of PHP. This plugin requires PHP 5 or later.

  5. 6
    bambi says:

    hi!
    many thanks for this plugin.
    unfortunately i get a fatal error while activating this plugin:
    Fatal error: Cannot redeclare class Services_JSON in /var/www/stpa/wp-content/plugins/menu-editor/JSON.php on line 116

  6. 7
    White Shadow says:

    Should be fixed now. Download again from the same link.

  7. [...] Admin Menu Editor [...]

  8. 9
    bambi says:

    it works now! many thanks!

  9. 10
    Dorian says:

    Could this plug-in be extended to hide menus on the post page such as:

    Tags
    Categories
    Excerpt
    Send Trackbacks
    Custom Fields
    Discussion
    Post Arthur

    An example would be greatly appreciated!

  10. 11
    Dorian says:

    Nevermind, found this great plugin:

    http://wordpress.org/extend/plugins/wp-cms-post-control/

    THANKS!

  11. 12
    Jeffro2pt0 says:

    @Dorian – That type of functionality is provided by WordPress 2.7 as part of the major UI changes/redesign they did. Sounds like you are not using WordPress 2.7 which I highly encourage you to do so.

  12. 13
    Ed Nailor says:

    I have installed the plugin and get the buttons at the top, however I am not getting any of the menu items below. I did not see any readme file, so I am assuming its as easy as uploading and activating. Any ideas?

  13. 14
    White Shadow says:

    That’s probably some kind of JavaScript error. I’ll need to know the error message to find the exact problem.

    Various browsers have different ways to view JS error messages. AFAIK, Firefox has multiple addons that will let you do that (Firebug, Web Developer, etc). In Opera, it’s Tools -> Advanced -> Error Console. As for IE… I think there’s a little “error” icon in the lower-left corner of the status bar that you can double-click to show the last error message.

  14. 15
    Tobias says:

    Hi.

    Great Plugin! One question though – is it possible to change the level of menus? I try to move “posts” into “pages” (just as a couple of custom post types created by flutter) and that doesn’t seem to work. If it’s not currently possible, that would be really useful (hopefully not just for me, but for everyone using WP as a CMS).

    Thanks again!

  15. 16
    White Shadow says:

    @Tobias : You can’t directly change the level – make a top menu a submenu or vice versa – but you could create a new custom (sub)menu that has the same properties as the menu you would like to move.

    I’m not entirely sure what you’re trying to do there, but if you want to move some submenus to a different toplevel menu (e.g. move “Add New [Post]” to the “Pages” menu), you can do that via cut & paste.

  16. 17
    Ben says:

    This plugin is the magic bullet if you are trying to setup WordPress as a CMS with limited admin views for your clients!!! Use this plug-in. It works great!

  17. 18
    Benjamin Allison says:

    This is the best plugin for WP, period. Elegant execution, and amazingly powerful.

    One question: how can I hack this bad boy to have the menu links to point to root admin pages when inside a sub-blog on a WordPress Multi User (WPMU) install?

    I’ll explain what I mean.

    Let’s say I’m the admin of a WPMU install, and I decide to edit or write a post on a sub-blog. Well, in doing I so I actually enter the sub-blog’s admin section. This means that all the menu URL’s are based on the sub-blog that I’m now inside of.

    So instead of: wp/wp-admin/edit.php

    the menu links are wp/subblog/wp-admin/edit.php

    What can I do inside the plugin to have the urls in the custom menu point to the root admin?

    FWIW, no users will have access to admin whatsoever. One admin, and the sub-blogs are for readers only.

  18. 19
    White Shadow says:

    Hmm, I don’t have a WPMU install to test this, but have you tried starting the link with a slash?

    For example, if the your full root URL is “http://domain.com/wp/wp-admin/edit.php”, enter “/wp/wp-admin/edit.php”. This seems to work on my single-user testblog.

  19. 20
    Benjamin Allison says:

    WUNDERBAR!

    This works perfectly. So for anyone who cares:

    If using WPMU and you want the menu links for admin to be based on the root installation, even when you have clicked-down into a sub-blog’s admin, adding a slash and the folder name of your install (for example: /wp/) will get er done.

    This is important if you;re using WPMU as a CMS, with only one admin presiding over all the sub-blogs (like one might do with a membership/subscription site).

    There’s still some buggy behaviour wither certain menu items, and in order for it to work, you need to edit the menu BEFORE you create sub-blogs, but it’s regardless, it’s worth a shot.

    White Shadow for president.

  20. 21
    Benjamin Allison says:

    I said buggy in my last comment. What I meant was:

    when changing links to a default menu, it creates a duplicate item. So what you need to do is create a new item (from scratch or via copy/paste), HIDE the original menu item, then make the desired modifications to the new menu item.

  21. 22
    White Shadow says:

    Mhm, that’s a known issue – the plugin identifies menu items based on their URL, so if you change the URL the menu item will be treated as a new item. At the moment there’s no way to change this without making the already hacky “plugin menu <— > WP menu” interface an even greater mess.

  22. 23
    Benjamin Allison says:

    As you said, it’s not a but it’s a feature!

    It’s a very issue considering how powerful this plugin is.

    And, fwiw, it seems to be working 100% on WPMU. Again, excellent work.

  23. 25
    Tad says:

    Hi im experiencing a problem where the menu items are not dragging or dropping or anything. is this a javascript problem?

  24. 26
    White Shadow says:

    Yep, probably a JS issue. Try a different browser. Also, there might be a conflict with another plugin that uses JS (I haven’t encountered any conflicting plugins myself, but it’s possible).

  25. 27
    danf says:

    I knew it would have been too good to be true to expect this to work with the fluency2 admin interface – and it was. If you want brownie points, it would be awesome to use both your plugin and the fluency2 one. (upon saving any changes in your interface and refreshing, the entire page goes blank) Otherwise, great plugin. Here is fluency2 in case your interested:

    http://deanjrobinson.com/projects/fluency-admin/

  26. 28
    danf says:

    Actually, I spoke too soon, I get an error even when that plugin is not installed. Here is the error:
    PHP Fatal error: Cannot use object of type stdClass as array in /home/dev-coding411/public_html/wp-content/plugins/menu-editor/menu-editor.php on line 395

    The code is as follows:
    //Add the new entry to the menu tree
    $tree[$topfile] = $entry;

    Any ideas? Maybe it will work after all once this is resolved.

  27. 29
    White Shadow says:

    Hmm, apparently my “backwards-compatible” JSON decoding function wasn’t really all that “compatible”. It would return an object even when an associative array was requested. This should be fixed now.

  28. 30
    danf says:

    Same issue – It doesnt look like there are any changes in the new download. Has it been updated?

  29. 31
    White Shadow says:

    Should be 0.1.2 now, was 0.1.1 before.

    In any case, I’m still pretty sure it’s the JSON thing. I’ll run more tests tomorrow.

Pages: « 1 [2] 3 4 5 6 7 8 9 10 » Show All

Leave a Reply