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 (29 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 ;)
  • You can’t use arbitrary URLs as menu targets because WordPress will automatically strip off the “http:/”.
  • 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.

Merry Christmas, by the way :)

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

165 Responses to “Admin Menu Editor For WordPress”

Pages: « 1 2 3 4 5 [6] Show All

  1. 136
    White Shadow says:

    Someone emailed me about how they solved the “menu.defaults is undefined” problem; I’m posting their comment here (with permission) as it might help other users :

    Hi, thanks for the great plugin !
    A colleague has recommended it and I look forward to using it.
    I was getting the “menu.defaults is undefined” error and found a (nasty) solution.
    The line I changed is line 110 and now it looks like:

    ((menu.menu_title!=null)?menu.menu_title:(menu.defaults != undefined ? menu.defaults.menu_title : “Undefined item”))+

    For those who can’t read Javascript, it just ignores the undefined element.
    What you will see in the Editor is a few entries with “Undefined item” label. I can confirm it has somwthing to do with WPML but I am not sure of the cause.

    Hope this can help those needing it !

    Regards,

    Lic. Adrián P. Eidelman

  2. [...] Admin Menu Editor Permet de personnaliser les éléments du menu et de ses sous-menus d’administration. [...]

  3. 138
    Gianfranco says:

    White Shadow, this might have been asked already before, but is there a reason why this AMAZING plugin of yours is not listed in the official WP plugin repository?

    It’d be nice to get noticed about updates and stuff. Plus, I am sure you’re cutting off quiet a big piece of potential new users by not having it listed in there, and that will never find out such a useful plugin. To me Menu Editor is a must-have for each and every WP installation.

  4. 139
    White Shadow says:

    It’s mainly due to my laziness. Nevertheless, listing in in the wp.org repository is on my Cthulhu-forsaken to-do list.

  5. 140
    Gianfranco says:

    Just do it, man! The plugin deserves it. Your work deserverves it!

    (When my blog’s up, I’ll write a review on Menu Editor).

  6. 141
    Suz says:

    Any chance you added this plugin to the WP.org repository ?
    Also is there a way to change visibility to menus by user-roles ?

  7. 142
    White Shadow says:

    Oh very well. It’ll be up on wordpress.org in a few days (provided they process the inclusion request quickly).

    There’s no way to change visibility by role yet, maybe someday.

  8. 143
    Andy Cook says:

    YEEEEEEEEEEEEEEEEEEEEEEEEEEESSSSSS! :)

  9. 144
    White Shadow says:

    It’s alive!

    You will probably need to (re)install it from the link above to make the automated updating feature work. This is because the directory name has changed.

  10. 145
    bengo says:

    Hi, this plugin don’t work in WP 2.9. Please help. Thank you.

  11. 146
    White Shadow says:

    Could you elaborate? I’ve used it with WP 2.9 and it seemed to work fine.

  12. 147
    RamEEz says:

    getting this error

    Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home4/plugins/admin-menu-editor/menu-editor-core.php on line 13

  13. 148
    White Shadow says:

    It seems your server has an older version of PHP. This plugin requires PHP 5 or later.

  14. 149
    RamEEz says:

    damnit :(

  15. 150
    dains says:

    Hi, I’d just like to say that this is incredibly useful for setting up non-technical people with the ability to post and edit content. Thank you for giving this a try!

    If you keep having difficulties with coding, please consider focusing on how we can provide views for basic functions like editing, categorizing, comments, and the like? These are the things that we need to provide for non-technical people, and since they’re the proverbial bulk of the iceberg, any help we can get is – really helpful :)

  16. 151
    james says:

    This looks great i ahve installed it but am a bit baffled by all the options, are there any instructions or a manual for this plugin?

  17. 152
    White Shadow says:

    Not really. But if you need help with anything specific, feel free to ask.

  18. 153
    JS72 says:

    Just wanted to say a massive thank you for this plug-in.

    I’ve been after this functionality ever since I started using WP.

    Cheers!!

  19. 154
    James says:

    >>>> “Not really. But if you need help with anything specific, feel free to ask.”

    I don’t quite understand the ‘file’, ‘access level’, ‘theme’, ‘page title’ and ‘icon’ options.

    Most importantly i’d like to remove certain menus for certain users, is this possible?

    Which CSS file would i use to style each menu?

    Thanks!

  20. 155
    White Shadow says:

    File identifies the page that will be opened when you click the menu. It can be an actual file or relative URL – like “index.php” for the front page of the Dashboard – or a plugin page ID – like “menu_editor” for this same plugin. When the menu is displayed, WordPress will automatically generate the actual URL for the plugin page. Typically, a plugin page URL looks like this – “main-menu-file.php?page=plugin_page_id”.

    Access level determines who can see/access the menu item. Only users who have the “capability” set in the Access level field will be able to use that menu. See the in-depth discussion of user capabilities for details.

    There is no “theme” field in the menu editor. I’ll assume you were referring to the CSS fields.

    CSS class is the CSS class of the link that represents that particular menu item. It’s probably best to leave this one alone.

    CSS ID is the ID of the list item that represents that particular menu item (in terms of HTML, the menu is rendered as an unsorted list). You could use this ID in the /wp-admin/css/wp-admin.css stylesheet to alter the look of the menu item.

    Page title is just what it sounds like. It’s what you’ll see in your browsers title bar when you click on the menu in question. This allows you to have different captions for the menu itself and for the page it leads to. Useful if the full page title is too long to fit in the menu without looking broken up.

    Icon is an internal WP setting that indicates what icon the top-level menu will have. I would advise not messing with this one.

  21. 156
    James says:

    Awesome, thanks man. No idea where i got ‘themes’ from….

    Would i add styles to ‘wp-admin.css’ ?

  22. 157
    White Shadow says:

    I think that would work, though there probably is a separate plugin for this kind of thing.

  23. 158
    Rick Larson says:

    A GEM, Janis! Got rid of ALL my other plugins that make the site “look” like a CMS especially on the administrators and editors menus. A little understanding of WordPress’ internals and your module replaced them all (ie, overhead). Awesome! Thanks for your time and efforts in sharing this with the open-source community.

  24. 159
    White Shadow says:

    You’re welcome :)

  25. 160
    ChuckS says:

    Thank you for creating this great plugin. What would I have to do to use it in WPMU to create sitewide menu items for all blogs?

  26. 161
    White Shadow says:

    Frankly, I don’t have the faintest idea. I’ll check the WP docs, but I doubt making a sitewide menu will be easy.

  27. 162
    Roy says:

    Great Plugin idea. Would this make it possible to change the text on the “current theme options” tab under Appearance?

  28. 163
    White Shadow says:

    I haven’t tried that, but I believe it would.

  29. 164
    J says:

    Amigo. I emailed you via the contact link on your website but I thought I’d post here too. This plugin is perfect and exactly what I need. I need it however for a wpmu install and need it to modify admin menus across all blog owners (same menu setup for all except for the wpmu admin who will have full admin menu). I don’t even know if it’s possible (it likely is because I found a modded version of adminimize to work with MU).

    Please contact me to discuss, am willing to pay for dev.

    Thanks!

  30. 165
    White Shadow says:

    Aye, I got your email. It’s probably doable, but I need to research how WPMU handles the plugins & menus before I can say for sure. I’ll reply via email when I’ve looked into that.

Pages: « 1 2 3 4 5 [6] Show All

Leave a Reply