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. 32
    danf says:

    Ah – maybe it was fixed, but the download is still showing 0.1.1 – just downloaded again to verify.

    may just need to update download link. Or is there some otherplace to download betas that I am missing?

  2. 33
    White Shadow says:

    I tried the link just now and it’s showing 0.1.2 for me. Perhaps some kind of web cache on your end?

  3. 34
    danf says:

    Sweet – I had to download it in IE to get latest. Not sure why caching in Firefox.

    Loaded it and it works! Thanks!

  4. 35
    Hannes says:

    a simple name, but a plugin with decent effects – it works great and is capable of a lot more than I need at the moment, and above all so sweet in ajax!

    BUT ) :
    only on my localhost! (Ubuntu Intrepid)
    When I moved the things to my server, the javascript breaks “somehow”:

    Firefox’ Error Console sez:
    Error: menu.defaults is undefined
    Source File: http://…/wp-content/plugins/menu-editor/menu-editor.js?ver=2.7
    Line: 110
    (note: I don’t get this error on my localhost)

    Server is: Apache/2.2.3 (Debian) mod_python/3.2.10 Python/2.4.4 PHP/5.2.0-8+etch7 mod_perl/2.0.2 Perl/v5.8.8 Server at … Port 80

    I also tried different browsers and a windows box but it didn’t work out…

  5. 36
    White Shadow says:

    I’ve thought about this and got nowhere. I’d need to see the problem firsthand to figure it out.

    You might try debugging the script yourself; I’d be happy to help with that ;) The first thing I’d check is whether the JSON-encoded menu structure (on the editor’s page) contains the “defaults” array for each menu item. If yes, there might be something wrong with the jQuery JSON plugin I use. If no, the next thing to check is the wp2tree() function in the .php file…

  6. 37
    David says:

    Awesome plugin!

    Is there any way to transfer the settings that I’ve made on one blog to another blog or installation of wordpress? Can it be exported or something?

    Thanks!

    David

  7. 38
    White Shadow says:

    Not in this version, but thanks for the idea.

  8. 39
    Sarah says:

    This is a wonderful idea for a plugin and exactly the kind of thing I was searching for. I see above that you’re aware of the issue with the broken links when an item is moved over. It would definitely be nice if at least the path can be automatically included in the file field so that there aren’t so many broken links. I think that’s the biggest downside to this plugin.

    I’m a PHP developer, but never created any WordPress Plugin so I’m not sure if that’s even possible with the way WordPress is setup. Just saying. :)

    However, you have done a great job so far and I will eagerly be awaiting updates! Thank you for making this plugin!

    Another suggestion for the future that would be really nice is the ability to drag menu items between one menu and another instead of having to cut and paste.

    Thanks again for the plugin!

  9. 40
    Hannes says:

    My problem got solved somehow – I don’t know what changed but now it works without bugs. It even stoped duplicating the qTranslate Language Buttons!

    I’m perfectly happy now! Thanks for your work and efforts and your quick reply!

  10. 41
    Hannes says:

    ups – the duplicate qTranslate buttons reappeared. But as they all work I don’t mind (:

  11. 42
    Steve says:

    White Shadow,

    I want to thank you for creating this plugin! It’s just what I was looking for. It’s working perfectly so far. Well designed UI as well.

    I’m excited to watch Admin Menu Editor evolve as you add functionality.

    Thank you again,

    Steve

  12. 43
    Steve says:

    I too would love to see the ability to save custom menu configurations for use in other blogs or within the same site. This would save a lot of time and effort.

    Any thoughts on adding functionality for menu link color and icon mods?

  13. 44
    White Shadow says:

    You can already change the icons for top-level menus (i.e. the “Icon URL” field), though you’d have to manually upload the right icons to wp-admin/images/ for that to work. Changing colors would require a custom stylesheet. Hmm.

    Eh, so that’s another item on my huge idea list. The suggestions wouldn’t be too hard to implement, but there’s so much other stuff I could/should work on that I can’t say when/if I’ll get to updating plugin.

  14. 45
    Jonny says:

    Hi there

    Great work on the plugin!!! but after upgrading to WP 2.7.1 it’s stopped working!! I’m now getting a blank screen when I try to activate the plugin, with the error

    “PHP Fatal error: Cannot use object of type stdClass as array in /****/*******/public_html/wp-content/plugins/menu-editor/menu-editor.php on line 395″

    I noticed in the comments that you’ve released version 0.1.2 which fixes this, but the download link still seems to be for 0.1.1?!?

    Any help would be greatly appreciated!!

  15. 46
    White Shadow says:

    Hmm, I see. Apparently this problem is caused by a conflict with Simple Tags. It has the same bug as this plugin had prior to 0.1.2 and it happens to define the buggy function before Admin Menu Editor can create the correct one. I’ve uploaded a new version (0.1.3) that should fix this issue.

  16. 47
    Jonny says:

    White Shadow

    Thanks for getting back so quickly. I disabled all my other plugins and installed the new 0.1.3 version but still getting the blank screen once it’s activated!!!

  17. 48
    White Shadow says:

    Try this : manually delete this plugin and reinstall it anew. Maybe there’s an old file somewhere that creates problems.

  18. 49
    Jonny says:

    Nope still no luck unfortunately

  19. 50
    White Shadow says:

    Well, are you still getting the same error message (which should be impossible as there is no line 395 in that file anymore)?

  20. 51
    Jonny says:

    The error is now on line 380 as follows:

    Cannot use object of type stdClass as array in /****/*******/public_html/wp-content/plugins/menu-editor/menu-editor-core.php on line 380

  21. 52
    White Shadow says:

    I’m out of ideas for the time being.

  22. 53
    Michelle says:

    Hi,

    I’ve just installed WP 2.7.1 and don’t have any other plugins installed yet. When I try to activate Admin Menu Editor v 0.1.3 I get this “fatal error”:

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /homepages/18/d90242274/htdocs/themetest/wp-content/plugins/menu-editor/menu-editor-core.php on line 13

    Any ideas? thank you so much! :-)

    Michelle

  23. 54
    White Shadow says:

    You probably have an old version of PHP. You will need at least PHP 5 to use this plugin.

  24. 55
    Michelle says:

    I’m using PHP 5, hosted on 1and1.

    I am running two different WP sites in this database, however, using different – what’s the opposite of extension? pretension? lol – different pre-something-or-others for the table names: wp_tt_ and wp_zz_. Would that make any difference?

    Thanks again for your help!

    Michelle

  25. 56
    White Shadow says:

    It’s called the “prefix”, and that shouldn’t make a difference.

    The error is on a line that declares a protected class variable. Protected variables were introduced in PHP 5. If they don’t work I can only conclude that you don’t in fact have PHP 5 :P

  26. 57
    Michelle says:

    I bow to you; I am an idiot. Whatever brand of dyslexia I have had me reading “PHP 5″ and thinking “MySQL 5″. I have upgraded to PHP 5 and all now works perfectly.

    Apologies for the stupid user error and thank you a hundred times for your patience. And for coming up with the word “prefix”. Sheesh. I am so glad yesterday is over. :)

  27. 59
    Erick says:

    I like your plugin. It installed and functions perfectly except for the moving links issue. Someone mentioned it on the wordpress.org/support page.

    side note: Is it possible to be able to select the dashboard modules specifically for a user level? It seems that what ever is seen on my dashboard is also seen on all users.

  28. 60
    White Shadow says:

    User levels are obsolete and wouldn’t work this way, but you could use user capabilities. For example, if you put “edit_plugins” in the “Access level” field for a menu item, only user with that capability will be able to see/access that menu.

  29. 61
    mike says:

    I am having some trouble with the user permissions. The plugin is letting me block access for certain parts of the admin but not others.

    I am simply adding edit_plugins to the access field of any area that I dont want the user to be able to access. For some reason it is not working for tools and users and possibly others.

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

Leave a Reply