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 :

199 Responses to “Admin Menu Editor For WordPress”

  1. 2
    Jeffro2pt0 says:

    Wanted to let you know that the plugin author URL links back to http://w-shadow.com/blog/2008/12/20/admin-menu-edi%EF%BF%BD-for-wordpress/ which doesn’t exist. Also, I think it would be cool if you provided 1-3 options of sorting menus. For instance, I’d simply like the menu to be rearranged in alphabetical order. Other than that, I’m having fun dragging and dropping.

  2. [...] Admin Menu Editor – Lets you directly edit the WordPress admin menu. You can re-order, hide or rename existing menus, add custom menus and more. Beta. By Janis Elsts. [...]

  3. [...] Administração do Menu e Dashboard do Wordpress (tags: menu dashboard wordpress CMS PLUGINS admin wpmu) [...]

  4. 5
    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.

  5. [...] 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 [...]

  6. 7
    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″

  7. 8
    White Shadow says:

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

  8. 9
    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

  9. 10
    White Shadow says:

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

  10. [...] Admin Menu Editor [...]

  11. 12
    bambi says:

    it works now! many thanks!

  12. 14
    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!

  13. 15
    Dorian says:

    Nevermind, found this great plugin:

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

    THANKS!

  14. 16
    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.

  15. 18
    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?

  16. 19
    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.

  17. 20
    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!

  18. [...] as there are no enhancements filed, nor is it in the features survey. Additionally, there is already a plugin to do so, making this exceedingly unlikely. As for the syntax highlighting, there has been [...]

  19. 22
    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.

  20. 23
    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!

  21. 24
    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.

  22. 25
    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.

  23. 26
    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.

  24. 27
    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.

  25. 28
    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.

  26. 29
    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.

  27. 31
    Tad says:

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

  28. 32
    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).

  29. 33
    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/

  30. 34
    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.

  31. 35
    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.

  32. 36
    danf says:

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

  33. 37
    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.

  34. 38
    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?

  35. 39
    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?

  36. 40
    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!

  37. 41
    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…

  38. 42
    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…

  39. 43
    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

  40. 44
    White Shadow says:

    Not in this version, but thanks for the idea.

  41. 45
    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!

  42. 46
    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!

  43. 47
    Hannes says:

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

  44. 48
    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

  45. 49
    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?

  46. 50
    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.

  47. 51
    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!!

  48. 52
    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.

  49. 53
    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!!!

  50. 54
    White Shadow says:

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

  51. 55
    Jonny says:

    Nope still no luck unfortunately

  52. 56
    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)?

  53. 57
    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

  54. 58
    White Shadow says:

    I’m out of ideas for the time being.

  55. 59
    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

  56. 60
    White Shadow says:

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

  57. 61
    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

  58. 62
    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

  59. 63
    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. :)

  60. 65
    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.

  61. 66
    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.

  62. 67
    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.

  63. 68
    Mike says:

    NVM, I just realized I need to block the sub menus also.

    Now I just have to figure out how to have only EITHER the “users” or the “profile” menu visible. I dont want both to be visible to the user. The problem is the “profile” menu is not in the list of main menu items.

    Thanks for the help and a great plugin. I hope to use it to make a custom admin page eventually.

  64. 69
    Mike says:

    alright I think I have the fix to removing the users menu without interrupting the profile menu. I just removed the profile.php from the profile submenu, and created a new custom main menu and added the profile.php file to that.

    For some reason the profile.php file returned to the original profile menu and the access feild went back to read, but it does appear to be working.

    Thanks again for a great plugin, this looks like it could take the place of the roles plugin when that becomes obsolete.

  65. 70
    White Shadow says:

    I’m glad to hear you got it working.

    Regarding the “Users” and “Profile” menus, WordPress automatically adds or reconfigures them depending on the logged-in user. This is a special case that isn’t handled by the plugin, so you could end up with both menus at the same time when using it.

    I could probably fix it with some inelegant hack, but I’m lazy :)

  66. 71
    Mike says:

    Ya it is a bit hacky as your description says. You can get the users menu to disappear if you change the file and access for my profile under the users menu.

    The hacky part is that when you make another change the change you made to the my profile goes back to normal. So whenever you make a change you have to remember to go back and change the my profile.

    I am also having a similar issue with an email plugin that I want to restrict certain areas. All in all I cant complain tho. As long as it gets the job done that is all that counts.

    With this plugin I was able to hide a few menus and make my admin much less intimidating to users.

    Now I just have to figure out how to make a solid custom menu, which hopefully wont give me any trouble.

  67. 72
    Ross says:

    Hi, i get this error when trying to activate your plugin.

    Fatal error: Class ‘ReflectionClass’ not found in /home/wp/public_html/wordpress/wp-content/plugins/menu-editor/shadow_plugin_framework.php on line 101

    Im using WP 2.7.1 and I have PHP 5.2+, i have tried deactivating all my other plugins.
    Any idea what could be wrong?

  68. 73
    White Shadow says:

    The PHP documentation claims that the reflection API is included in PHP 5 by default, so either it’s been somehow turned off in your PHP configuration (I don’t know if that’s even possible), or you’re not really using PHP 5. Those arep retty much the only causes I can think of.

  69. 74
    Mike says:

    Would you be willing to write up a quick tutorial on how to use your plugin to create a top level menu page?

    I gave it a shot but couldn’t make it happen.

    thanks, MIke

  70. 75
    White Shadow says:

    What exactly is the problem? I just use the “New” button to add a custom top menu, save, add a few menu items to the new menu, and it seems to work.

  71. 76
    Mike says:

    I am looking to add a new php file to the menu. It just needs to have a link with a popout so the php file will be pretty simple. I just cant figure out what exactly needs to be in the php file.

    I have been trying to get my head around this http://codex.wordpress.org/Adding_Administration_Menus

    I have tried a few things but cant seem to get it to work.

    Maybe your plugin is not intended to work in this way…

  72. 77
    White Shadow says:

    I’m still not quite sure what you’re trying to accomplish. Do you want the menu/submenu to point to an URL outside the Dashboard? That would be impossible without writing some kind of custom redirector script or hacking the WP core, as the script that outputs menus would always mangle the external link otherwise. However, a relative URL like “/stuff/foo/bar.php” might work.

    Or maybe I’ve misunderstood your comment and what you actually want is to write a new plugin.

  73. 78
    Mike says:

    I am just trying to add a basic menu, when the user clicks on the menu item, it will bring them to the menu page that I have created. Inside that menu page will be a link, maybe that is where you were confused. I am not trying to redirect the menu to an outside page.

    I tried writing a basic plugin to handle this, but was unsuccessful. I guess I am not sure what needs to be included, the only part I do know is what will be echoed onto the page(some text with a simple popout link)

  74. 79
    White Shadow says:

    Allright, how about this super-simple plugin :

    <?php
    /*
    Plugin Name: Example Plugin
    Plugin URI: http://w-shadow.com/
    Description: Adds a menu item. That's it. 
    Version: 1.0
    Author: Janis Elsts
    Author URI: http://w-shadow.com/
    */
     
    /*
    Created by Janis Elsts (email : whiteshadow@w-shadow.com) 
    It's LGPL.
    */
     
    //Are we running in the Dashboard?
    if ( is_admin() ) {
     
        class MyMiniPlugin {
     
    		function __construct(){
    			add_action('admin_menu', array(&$this, 'hook_admin_menu'));
    		}
     
    		function hook_admin_menu(){
    			//Add a top-level menu.
    			//Note : This menu will also be automatically added as the first
    			//submenu of itself. Might be a bit confusing ;) 			
    			add_menu_page('Example Menu', 'Example Menu', 'manage_options', 
    				'example_top_menu', array(&$this, 'page_example_top_menu'));
    			//Add a submenu. Might be optional in your case. 
    			add_submenu_page('example_top_menu', 'Example Submenu', 'Example Submenu',
    				'manage_options', 'example_submenu', array(&$this, 'page_example_submenu'));
    		}
     
    		//This function outputs the HTML for "Example Menu"
    		function page_example_top_menu(){
    			echo "Top menu page";
    		}
     
    		//This function outputs the HTML for "Example Submenu"
    		function page_example_submenu(){
    			echo "Submenu page";
    		}
     
    	};
     
    	$myplugin = new MyMiniPlugin;
     
    }//is_admin()
    ?>

    It adds a top-level menu and then adds a submenu entry to that new menu. Requires PHP 5 (because I’m lazy) and should work in at least WP 2.5 and up.

  75. 80
    Bryan says:

    Best plugin ever! Thanks for your hard work.

  76. 81
    Mike says:

    Hey, thanks for doing that for me.

    Like Bryan says, this plugin is great.

    One of the biggest grey areas for wordpress modification is modifying the dashboard.

    Thanks again.

  77. 82
    Ross says:

    HI about the Reflection error, I got some sort of wierd PHP version called 5.2.6RC4-pl0-gentoo. Maybe the reflection class isnt included in that version. Im trying to get the admin to update PHP but if he wont, is there any possibility to work around this problem??

  78. 83
    White Shadow says:

    In principle, it is possible to rewrite the plugin so that it doesn’t require the reflection API, but that would take some careful editing. I’d prefer to explore other possibilities first.

  79. 84
    Mike says:

    Hey its me again, back to bother you some more.

    I finally finished up on the site that I want to link to from the admin, however when I went to change the permissions for your plugin above it gave me an error.

    The page displays for the admin but not for other users. I am wondering if it has to do with the array in there, which makes it not act like http://codex.wordpress.org/Adding_Administration_Menus.

    Hopefully its a simple change and not a trip back to the drawing board.

    THANKS.

  80. 85
    White Shadow says:

    Yes, the example plugin above is set to display the menus only for admin users (and it has nothing to do with the arrays; the arrays are how you pass an object’s method as a user-defined callback… if that makes sense).

    To allow other users to see them, you’ll need to change the capability parameter (currently set to “manage_options”) in the lines that call add_menu_page() and add_submenu_page(). See Roles and Capabilities for a list of capabilities.

    For example, if you replace ‘manage_options’ with ‘read’ then any logged-in user will see the menu.

  81. 86
    mike says:

    I should have known that. I tried using the capability instead of the role number, but for some reason I dident remove the manage_options.

    Thanks for helping with this, I hope this helps others with adding a custom menu.

  82. 87
    Ross says:

    Apparently the Reflection class wasnt included in my version of PHP. But now it is and everything is working! Great stuff!

  83. 88
    Mike says:

    I am back for more. I am trying to add the custom icon to our custom admin page, yes I am a perfectionist, and yes sometimes I wonder if I will ever understand php. I have tried so many different things to no avail. Maybe someday it will click.

    By the way nice post on the mozilla addons. I like the autopager.

  84. 89
    White Shadow says:

    Well, the documentation says you can simply add the icon URL as the last parameter when calling add_menu_page, e.g. :

    add_menu_page(
    	'Example Menu', 'Example Menu', 
    	'manage_options', 'example_top_menu', 
    	array(&$this, 'page_example_top_menu'),
    	'your-icon-URL-here'
     );

    I imagine you could use a relative URL there, like “/wp-content/plugins/myplugin/icon.png” (though hardcoding the path isn’t always a good idea).

  85. 90
    Mike says:

    I tried that approach with /images/icon.png and public_html/images/icon.png

    I then get this error: Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in /home/aquacult/public_html/wp-content/plugins/exchangemenu.php on line 30

    this is officially my code:
    add_menu_page(‘Example Menu’, ‘Jobs Aquatic’, ‘read’,
    ‘example_top_menu’, array(&$this, ‘page_example_top_menu’)'public_html/images/icon.png’);

    You dont have to bother with this as it is not really necessary, but when I try and do something and I cant make it happen it tends to make me want to conquer and defeat the problem.

  86. 91
    White Shadow says:

    It looks like you’re missing a comma before the icon URL. And I think you don’t need the “public_html” bit.

  87. 92
    Mike says:

    Right on, that reminds me of what I read about php someplace. “Commas and semi-colons can be your worst enemy.”

    Also when I was trying this I was putting the full image url. That is the way a few of the other plugins I use work.

    Anyway thsi is what it should look like:
    add_menu_page(‘Example Menu’, ‘Jobs Aquatic’, ‘read’,
    ‘example_top_menu’, array(&$this, ‘page_example_top_menu’),’/images/icon.png’)

    Thanks for helping out with the custom wordpress admin menu.

  88. 93
    scribu says:

    Hello,

    your plugin is very useful, but if I set different access level for a top level menu, the menu is still visible to users who don’t have that capability.

  89. 94
    scribu says:

    Here is the function (simplified) which deals with capabilities:

    http://wordpress.pastebin.ca/1389987

    The problem is that it only filters submenus and leaves menus intact.

  90. 95
    scribu says:

    Sorry, this is the working version: http://wordpress.pastebin.ca/1389993

  91. 96
    White Shadow says:

    I seem to hazily remember that there was some specific reason for not filtering out top-level menus, but I don’t recall what it was. Anyway, if you also set the different access level for the submenus, WP should hide the top-level menu as it will have no visible submenus.

  92. 97
    scribu says:

    Ok, I guess that’s a solution.

    BTW, have you considered submitting this plugin to wordpress.org so that we can get automatic updates?

  93. 98
    White Shadow says:

    Yes, but I’m very lazy in this respect :P

  94. 99
    Bryan says:

    Anyway to make this work with PHP4?

  95. 100
    White Shadow says:

    One could try, but it would take a lot of rewriting.

    You’d need to set all hooks manually – the “magic” self-installing hooks of my makeshift plugin framework depend on the Reflection API, which is PHP5-specific. Class constructions would need to be renamed. Some variable initializers might not work in PHP 4 (arrays?). There’s probably a foreach() loop or two that use the iterator by reference (also not supported in PHP4). And so on.

  96. 101
    sbdesign says:

    Thanks for this great plugin! I looked for ages to find something to simplify the administration menus for my clients. Good work!

  97. 102
    phpworker says:

    Well, it does just what I need – great plug! Thanks a lot :)

  98. 103
    Robert Neuschul says:

    First, thanks for what is a really useful plugin.

    Second, the problem [you just knew there had to /be/ a problem :-) ]: not sure if this comes about from trying to do too much with ME, or as a result of an interaction with other plugins. It _only_ happens on one site where there are some 20 or so plugins installed [it's a very complex "private" members-only site]

    Problem Description: open menu editor from Settings menu, go to “settings” sub-menu, sort all plugins [not default WP items] into alphabetical order below the default WP elements. Save. Refresh page. Go to Settings menu: Menu Editor itself has vanished from the Settings menu and one or more other plugins may also have vanished, whilst one or more plugins may be duplicated in the Settings at odd non-alphabetical places in that settings menu. Duplicate items _are_ functional.

    Go back to Menu Editor via the installed plugins page or via direct URL and ME shows everything correctly as last saved: not as shown on the settings menu.

    Clearing the WP Cache makes no difference. Clearing the browser cache makes no difference. Indeed the problem is visible from different machines on different OSs and using several different browsers etc etc.

    Reset menus to default order, save and refresh and everything instantly works as expected.

    Have tried deactivating Menu Editor, cleaning out the options table and then reactivating, but the problem reappears fairly quickly once one starts sorting entries.
    I’ve not yet had the courage to deactivate all other plugins and/or reset the WP options table to defaults in order to do a ‘clean’ test because this is such a complex site.

    NB: this problem does _not_ arise on other less complex sites running on the same configuration of Apache/Linux with PHP5.n and MySQL5.n and WP 2.7.1 [they're all virtual hosts on the same physical box], although many of them do share several of the same plugins.

    Having to run with default order in the Settings menu isn’t a major issue, but missing and/or duplicate items could become a problem. Most of all it’s an irritant which is puzzling me.

    Any thoughts or suggestions?

  99. 104
    White Shadow says:

    Yep, this might really be a compatibility issue. So muster up the courage and test that idea :) – First, save the sorted configuration. Then deactivate/reactivate your other plugins one by one. Reload the page aftear each deactivated plugin and see if the menu is OK. That should help you find the conflicting one.

    Personally, I’m pretty sure it is a plugin conflict. Sorting works fine even in WP 2.8 beta, though there are some glitches with separators.

  100. 105
    Gianfranco says:

    Hi, with the purpose to check plugin compatibility behaviour with 2.0, I duplicated my WordPress site and upgraded. Strangely all my settings in the Menu Editor were resetted to default.
    Tha means I should go and re-arrange everything again after upgraded to 2.8. Is this normal? Anybody else met the same issue? If yes, are there any fixes to this?

    By the way, this is the bes plugin ever! Letting you customize your admin is someting that should be considered as a default option in any CMS. Luckly, White Shadow did a great work with this. Thanks.

  101. 106
    White Shadow says:

    For what it’s worth, upgrading to WP 2.8 worked fine for me – the settings were retained and the plugin still worked as expected. Perhaps in your case the settings were actually lost in the duplication process?

  102. 107
    Gianfranco says:

    I got a question.

    I finished the development for a site (on local) and now I need to put it on the live server. Even without upgrading to 2.8, whenever I copy all my files to the server and I import the databse, the Menu Editor plugin doesn’t keep its settings I set up on local.

    Well, actually, I even made a test from local to local (copy files + export/import databse) and I got the same result.

    I got the default admin menus and I need to re-arrange them all with Menu Editor again. Is there a reason why that happens. Is it a normal behaviour or a bug?

    You say, “perhaps in your case the settings were actually lost in the duplication process?”. How is that possible? Where and what should I look to see where the problem might be?

    Thanks for letting me know.

  103. 108
    White Shadow says:

    All settings pertaining to this plugin are stored in the “ws_menu_editor” option. Options are, in turn, saved in the wp_options table in the WordPress DB. You can view the database with something like phpMyAdmin (or whatever other tool your host has).

    You could check the “ws_menu_editor” option before and after copying, and try to figure out when/why it changes or gets deleted.

  104. 109
    Robert Neuschul says:

    One can view the stored options without the use of phpMyAdmin or the MySQL Administrator Toolkit.

    http://my_site_url/wp-admin/options.php

    It’s not guaranteed to be true but it’s my observation that where other plugins are using the now deprecated get_settings call in their coding, instead of the get_options call, such plugins will interfere with the correct deployment of menu editor.

    I’ve seen exactly the behaviour you describe. The only way I’ve found to force menu editor to behave correctly thereafter is to export all WP content, de-activate all plugins, drop and then recreate the DB tables and then reimport the WP content and re-activate ONLY the menu editor plugin and set it as one wishes it to behave. Once that’s been done one can reactivate the other plugins one at a time until one finds which plugin or combination of plugins causes the menu editor to stop functioning. At that point it’s a case of hacking through the code of the problem plugin and replacing any get_settings calls.

  105. 110
    White Shadow says:

    Could you name at least one of the problematic plugins? I’d like to test those plugins myself and, if possible, make the menu editor coexist peacefully with them. Right now I just don’t see how get_settings could be a problem, because internally it’s just a wrapper for get_option (at least in newer versions of WordPress).

  106. 111
    Robert Neuschul says:

    I may have expressed myself badly; as far as I can tell it’s not your code that’s the problem, it’s the code in the other plugins that’s the problem.

    For example using the WP CMS Post Control plugin in conjunction with SarahG’s Page Menu Editor and OZH Admin Drop Down Menu seems quite frequently to cause problems for ME, especially if a] there are a lot of plugins and b] during the process of site development one is adding and then removing and then re-adding various plugins for testing purposes to discover which combinations of plugin do work together in a friendly manner.

    One of the issues I’ve noted with some dismay is that not all plugin authors use a sensible cleanup option when their plugin is deactivated; in other words they leave their junk behind in the options table when the plugin is deactivated. What a well-behaved plugin _should_ do on deactivation is offer to export the current settings to a suitable file in the plugin directory, and then remove all of its current settings: if one then reactivates the plugin one should then be able to import the old settings. As we all know, over time the WP options table can get very messy. Yes I know there are plugins to inspect and clean the options table, but that’s beside the point: by and large with well-designed plugins one should not have to go cleaning out the options in the first place.

    In my case, one of the common things I’ve found is that at a certain point, having added/removed and possibly re-added various plugins ME simply will not show on the menus one or more plugin items that are actively installed and functional and there’s no way back from that except to drop the WP tables, recreate and reinstall the plugins. Cleaning out the options table doesn’t help.
    Right now I have one site in development which has the Upload+ plugin installed, [together with quite a few other plugins] but Upload+ isn’t showing up in ME or on any of the admin menus. Clearing the WP and browser caches isn’t going to change that visibility issue.

  107. 112
    White Shadow says:

    I see. I’ll test some of the plugins you mentioned later.

    However, I disagree with the idea that a plugin should clean up it’s options/database records when it is deactivated. There are lots of situations where plugins are deactivated only temporarily, like when upgrading the plugin or updating the WordPress core itself. It would be impractical to make the user explicitly import the old settings every time.

    Instead, I think plugins should clean up when they’re uninstalled, which is both more intuitive and easier to implement. WP 2.7 even introduced an uninstallation API, though most plugin authors still haven’t updated their plugins to make use of it (I’m quite guilty of this myself).

  108. 113
    Robert Neuschul says:

    That is, if you’ll forgive me, a semantic argument rather than a real or meaningful argument; deactivating and uninstalling are functionally the same thing as far as both the site administrator and users are concerned. Deactivate a plugin and the users will be deprived of its benefits – whatever they are; wordpress performs exactly as if the plugin is uninstalled.

    Yes we all of us have to deactivate [some] plugins during the course of upgrades etc, or for other temporary reasons; but the fact remains that too many plugins habitually leave dross in the options table and elsewhere after an uninstall. This is simply bad coding. Just as hardly any plugins allow one to view or export ALL of their current settings.

    Giving the admin the *option* to export/delete settings before deactivating is the key to what I said: which you elected to ignore.

    The new uninstall API is good, as far as it goes.

  109. 114
    White Shadow says:

    I’ll concede that having an option to export/import a plugin’s settings would be a useful feature, yet I must insist that deactivating and uninstalling a plugin are two distinct actions. And, judging from how the uninstall API works, the people working on the WordPress core would agree with that.

  110. 115
    Robert Neuschul says:

    Of course uninstalling and deactivating are two distinct “actions” on the part of the admin – I’ve not said otherwise.

    However *functionally* as far as the use and deployment of WP is concerned they’re identical: there is absolutely no difference between a WP site with a deactivated plugin and the same WP site where the plugin has been entirely uninstalled through the WP UI, or indeed a WP site where one simply deletes the relevant plugin directory in the file system.
    All of these methods produce identical functional results.

    Take a common addon: TinyMCE Advanced; deactivate it and the *effect* for all users is exactly the same as uninstalling it, and vice versa.

    The WP Uninstall API is irrelevant in this context: it’s merely a cleaner more logical means for achieving those functional changes.

    It seems to me that you’re far more of my comments than they warrant.

  111. 116
    m.e. says:

    @ Robert Neuschul:

    As it is best practice, to deactivate plugins before doing an update on WP, there’s a big logical difference between uninstalling and deactivating. And I wouldn’t want to import all my settings after a (maybe even minor) update on all the sites i’m working for.

    Therefore the uninstall API is highly relevant and i wish more plugin authors would use it.

    If you updated your blog to 2.8 with plugins left active, you probably ran into severe problems.

  112. 117
    Robert Neuschul says:

    @ m.e

    Logical and functional aren’t the same thing: I wasn’t discussing the logical or even the best practice: I was describing the functional EFFECTS of two different actions.

    If you disagree with my statement that uninstall and deactivation are functionally equivalent then show me a single instance where uninstall and deactivation have different functional effects on the ongoing operation of a WP site as far as either users or sysadmin are concerned.

    As for the u/g to 2.8: for some values of “severe problems” you’re correct. If plugins are already 2.8 compatible then deactivation is not required. Best practice tells one to deactivate; and it is indeed a good idea in almost all instances, but if a specific plugin is already and genuinely 2.8 compatible then it isn’t essential.
    However the issues surrounding the uninstall API still are not relevant to a description or discussion of functional effects until one comes to a discussion of reinstallation or reactivation of a plugin.

    Again: you’re making the same mistake as White Shadow: making more of my comments than they warrant.

  113. 118
    brucem says:

    This does not appear to work, at least with wp v 2.8 and my collection of plugins. I’ve tried from FF and Safari (Mac) and the menu does not seem to permit cut/copy/paste, or drag/drop. Is there a place I can report the issue more fully? Can I assist by providing more information?

    Thanks.

  114. 119
    White Shadow says:

    I suspect it’s a plugin conflict of some kind. I’ve tested the menu editor in a relatively “clean” install of WP 2.8 (using FF and Opera) and drag & drop and the menu items still work as expected.

    The quickest way to test if it really is a plugin conflict is to temporarily deactivate all other plugins (this should be pretty easy to do via the “Bulk Actions” dropdown.) and try using the menu editor again. If you find out the editor works with other plugins deactivated, re-activate your other plugins one-by-one to find the conflicting one.

    You could also check the Error Console in Firefox for some clues (Tools -> Error Console).

  115. [...] Admin Menu Editor – used to hide menus from my client’s user account and “keep things simple” [...]

  116. 121
    nenya says:

    Hi,

    I accidently set my “Settings” menu to invisible with Menu Editor – now I can’t access it via the direct URL lnik, it says I don’t have enough user rights. How can I access Menu Editor now to make “Settings” visible again?? Wehre in the DB can this be done?

    Thanks!!

  117. 122
    White Shadow says:

    Go to the wp_options table and delete the row that has the “option_name” column set to “ws_menu_editor”. This will reset the menu configuration and let you access the “Settings” page again. Note that any other changes you made to the dashboard menus will also be lost.

  118. 123
    Alex Hackbunker says:

    LOVE U! <3

  119. [...] In: Wordpress plugins 13 Aug 2009 Go to Source [...]

  120. 125
    Dave Redfern says:

    Hello,

    I am trying to add a new seperator so I copy and paste an existing one but when I save it disappears. Any ideas how to stop this?

    Thanks

    Dave.

  121. 126
    White Shadow says:

    Strange, I’m not seeing that behaviour in my test setup. Have you tried moving the copied separator to a different place before saving? Maybe you could instead copy a normal menu and then change it’s properties so that it becomes a separator (as a workaround).

  122. 127
    Alexia says:

    Hi,
    I don’t understand my problem. I configure my dashboard menu with your plugin. And all is ok. But when, for example, I change the theme of my website, the submenu of the previous theme is always present and it isn’t hidden (And when, i click on this link,of course, I have an error like “The requested URL /htmlv3/wordpress/wp-admin/fusion-settings was not found on this server.”
    Can you help me please?

  123. 128
    White Shadow says:

    This is a known issue. The plugin errs on the side of caution and doesn’t automatically remove menu items that point to a non-existent page.

    I’ll put this on my to-do list, but I can’t promise it will get fixed soon – there are other things that take priority right now.

  124. 129
    Cas says:

    Just FYI – I love this plugin, but now it has a conflict with Disqus that renders this plugin completely unconfigurable while Disqus is activated. When I deactivate Disqus, I can change the settings on Menu Editor, and thank goodness they seem to stick even when I re-activate Disqus. My guess is that it happened with the latest Disqus update and is a javascript conflict. :(

  125. 130
    White Shadow says:

    Hmm, I installed Disqus in my test blog and the menu editor still worked fine… So I’ve got no idea what the conflict might be.

    Assuming it really is a JS conflict, check your browser’s error console for the specific error message.

    • Firefox : Tools -> Error Console
    • Opera : Tools -> Advanced -> Error Console
    • Internet Explorer : Double-click the error icon in the left corner of the status bar (I think)
  126. 131
    Shawn Tucker says:

    Benjamin Allison, I am also running a WPMU website.
    The Site Admin menu seems to be getting added to every blogs admin area.
    Although users cannot access the pages on it.

    Are you finding this too? Were you able to overcome it?

  127. 132
    ovidiu says:

    I am looking for a similar plugin, I rememebr having seen it somewhere, where one could specify what menus are available for what users/roles/etc…

    i.e. excluding the TAGS menu for everyone, etc…

  128. 133
    Mike says:

    Hi,

    I have noticed that the Admin Menu Editor plugin does not work when the WPML plugin (http://wpml.org) is activated also. (WP 2.8.4)

    Once WPML activated, if I go to the Menu Editor option in the admin, I cannot drag the items around or click any option. It seems to be a JS issue. It gives the error “menu.defaults is undefined” in menu-editor.js line 110.

    Other users seem to have the “menu.defaults is undefined” error issue. Is there any solution to this ?

  129. 134
    White Shadow says:

    I don’t have a solution as of yet. The problem is I can’t replicate the bug – when I activate WPML the menu editor continues to work without a hitch.

  130. [...] önskade innehållstyper är skapade installerar du pluginet Admin Menu Editor som ger dig fria händer att möblera om (och dölja saker) i [...]

  131. 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

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

  133. 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.

  134. 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.

  135. 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).

  136. 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 ?

  137. 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.

  138. 143
    Andy Cook says:

    YEEEEEEEEEEEEEEEEEEEEEEEEEEESSSSSS! :)

  139. 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.

  140. 145
    bengo says:

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

  141. 146
    White Shadow says:

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

  142. 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

  143. 148
    White Shadow says:

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

  144. 149
    RamEEz says:

    damnit :(

  145. 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 :)

  146. 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?

  147. 152
    White Shadow says:

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

  148. 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!!

  149. 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!

  150. 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.

  151. 156
    James says:

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

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

  152. 157
    White Shadow says:

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

  153. 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.

  154. 159
    White Shadow says:

    You’re welcome :)

  155. 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?

  156. 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.

  157. 162
    Roy says:

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

  158. 163
    White Shadow says:

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

  159. 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!

  160. 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.

  161. 166
    eilia says:

    Thank you for creating this great plugin.
    me too ! I need it however for a wpmu install and need it to modify admin menus across all blog owners . plz plz ! :D

  162. 167
    White Shadow says:

    Actually, I’ve already implemented WPMU compatibility – I just need to update the readme.txt and other docs before I release the new version. It should be out sometime this week :)

  163. 168
    ایلیا says:

    yessssssss . thank you :)

  164. 169
    Hikari says:

    That really a great plugin, should go to core :D

    Could you better explain “parent file in the ‘File’ field”? A detailed exemple would be nice!

  165. 170
    White Shadow says:

    Here’s an example : Say you want to move a plugin’s page from the “Settings” menu to the “Tools” menu. If you look at the “Settings” menu in the editor, you will see that its file field is set to “options-general.php”. This is the “parent file”. After you cuty & paste the plugin’s menu entry to the “Tools” menu, you will need to edit its “File” field to say “options-general.php?page=my_plugin” (replace “my_plugin” with whatever value was in the plugin page’s “File” field originally).

    I’ve looked into automating this, but the internal menu structure that WP uses is so messy that it’s not really practical.

  166. 171
    eilia says:

    hi
    How can I reset all settings?
    I did a few mistakes in edit menus and now menu editor page Is not fully loaded … Please see the picture :
    http://i.imgur.com/8sWNG.jpg
    ::: reset default menu button and reset menu button and other buttons do not work too :(

  167. 172
    White Shadow says:

    You can reset the settings by deactivating the plugin, then uninstalling it using the appropriate “Delete” link in the “Plugins” tab. This will remove the plugin’s settings.

    That said, the plugin really shouldn’t have stopped working just because you made a mistake while editing a menu; it’s probably a bug. If you could check your browser’s error console (FF – Tools -> Error Console, IE – double-click the exclamation icon in the status bar) for any JavaScript-related error messages that might show inthe editor’s tab, I might be able to fix it.

  168. 173
    eilia says:

    I use this plugin for MU and I can’t use delet link :)
    I removed it from my server and upload it again. But the settings did not reset.

    and error :
    in FF :
    Error: entry.defaults is undefined
    Source File: http://…/wp-content/mu-plugins/admin-menu-editor/menu-editor.js?ver=2.8.3
    Line: 184

    in IE:
    Message: ‘defaults’ is null or not an object
    Line: 182
    Char: 2
    Code: 0
    URI: http://…/wp-content/mu-plugins/admin-menu-editor/menu-editor.js?ver=2.8.3

  169. 174
    White Shadow says:

    In that case, you need to manually delete the “ws_menu_editor” option from your wp_options table.

    I’ll see what I can do about that error.

  170. 175
    White Shadow says:

    Err, I mean the wp_sitemeta table.

  171. 176
    eilia says:

    thank you very much ! :)

  172. 177
    Dux says:

    This plugin is amazing.. If I were to make changes to menus will it maintained after updates of WP?

    Also, If I am going to create new admin views is it better to duplicate an existing and then make the changes or just make the changes on the original?

    Not exaclty sure how the WP updates impact my changes/ additions.

    How do I make menu’s to be user level specific?

    thanks again!

  173. 178
    White Shadow says:

    In general, your changes should be retained when you update WP. With the obvious exception that if the new WP version removes a menu then that menu will no longer work even if you still have it in the custom menu structure.

    User levels are deprecated. I would recommend using capabilities instead. For example, you can make a menu item be only visible to administrators by entering “manage_options” in the “Access level” field.

  174. 179
    Paco says:

    Hi!

    Your plugin is just simply amazing!.

    I have the same problem as Elia (173). How can I reset plugin settings? I deleted the plugin files from Wp-content and uploaded again, but settings still are the same. I can’t see the Options menu to acces the plugin. Thanks.

  175. 180
    White Shadow says:

    See my responses to Elia, then.

    In short:
    * WP : Delete the plugin via the Delete link in the Plugins tab. Manually removing it from /wp-content/ will not help.
    * WPMU : Delete ws_menu_editor from wp_sitemeta.

  176. 181
    Joseph Spurling says:

    Absolutely one of the best plugins available for wordpress. Totally invaluable, thank you very much! :-)

  177. 182
    jack says:

    This is a *great* plugin, but I have a problem. I am running a wpmu installation. I want to edit the menus and have all sites show what I set. Right now, I am logging into each site backend, making changes, then making the menu editor link not visible. Is there a way to make global changes to the admin menu?

  178. 183
    White Shadow says:

    Have you installed it in /mu-plugins/ (and according to the instructions in readme.txt)? That should allow you to edit the menu for all blogs at once.

  179. 184
    jack says:

    sorry, I should have read the readme.txt
    I had installed it like a regular plugin and activated it sitewide.
    Thanks for your help – it works perfect! This plugin is a major help to those running wpmu!

  180. 185
    Dulce says:

    I hid the whole menu and now I can’t get it back. I deleted the whole plugin from mu-plugin but when I upload a fresh plugin it hides it again automatically. I think I must manually uninstall it but how do i that without the menu?

  181. 186
    White Shadow says:

    Delete “ws_menu_editor” from the wp_sitemeta table.

  182. 187
    Dulce says:

    Thanks bro, and thanks for getting back so quickly. Just threw ya a few bucks. Excellent mod.

  183. 188
    Cristián says:

    Im having this problem:
    http://wordpress.org/support/topic/165717?replies=5

    Which is solved deactivating the Admin Menu Editor.

    I’ dont’t know if it’s because white spaces, utf-8 ascii or what… :S

    The plug-in is great!!! Unfortunately I can’t use it on my blog now…

  184. 189
    White Shadow says:

    Hmm, if that thread is anything to go by, the real cause of the problem is probably either WP itself or a botched plugin install/upgrade. It seems very unlikely that half a dozen wildly different plugins would all cause the same mysterious bug (and only on specific blogs).

  185. 190
    johnny says:

    I’m having trouble with access levels. I tried “10″, but no matter what blow owners are able to see the whole menu. How do you change it so that blog owners can’t see a menu item but the site administrator is the only one who can see it?

  186. 191
    johnny says:

    Ok, it seems I can’t change the access levels for any of the default menu items. I’m using “10″ and “edit_plugins” in the access field, and I also changed the users to editors and it still shows up. Is there any way to do that using this plugin?

  187. 192
    White Shadow says:

    AFAIK, this is a limitation of the WordPress capability system – there is no capability or access level that is specific to the site administrator. Both site admins and blog admins are treated as equal, capability-wise.

    If you don’t want the blog owners to see a particular menu item, try placing it in the “Site Admin” menu.

  188. 194
    Andrew Burleson says:

    Wow. I have to say this might be the best plugin I’ve ever downloaded. You should contribute this to the WP core! This is an absolutely invaluable tool for running Wordpress as a CMS!

  189. 195
    Cathy says:

    Thank you so much for this plugin! I hope that you can help me with a weird thing that’s happening when I create a new/custom menu.

    I can cut/paste items from other menus into the custom menu, but the custom menu displays oddly. The menu name doesn’t show up, and the items on the menu only go about half way across (then wrap).

    When it’s above another menu, it overlaps. When it’s by itself at the bottom, it of course doesn’t overlap, but it’s easier to see the “half width” display.

    I’ve viewed it using Firefox and IE6 (at work) and it still looks the same. I’ve deactivated all my plugins and reactivated ME and it still looks the same. I switched to the default theme, and still the same weird menu display. Any idea what this is?

    Thanks again!

  190. 196
    White Shadow says:

    Hmm, I’ve never seen anything like that. How about a screenshot?

    Also, what are the CSS class and CSS id of that menu set to? For reference, the defaults are “menu-top” for CSS class and “custom_menu_1″ for CSS ID.

  191. 197
    Cathy says:

    Thanks for getting back to me. :)

    Here’s the screenshot: http://www.ripplesofimprovement.com/articles/menu-editor-screen-shot/

    As for the CSS class and CSS id of the menu, I didn’t change them. The CSS class is listed as: wp-menu-separator-last

    And the CSS id box is empty.

    Is that the problem? Should I change them to “menu-top” and “custom_menu_1″?

    Thanks!

    Cathy

  192. 198
    Cathy says:

    Well, heck! Whatya know? I did change them and suddenly it works now. I don’t know why they said something else. I know I didn’t change them deliberately.

    Cool! I’m off to add more to the menu. Thanks again!

  193. 199
    Cathy says:

    Umm…dumb question…can you only add 2 custom menus? Whenever I try to add a 3rd, it replaces the 2nd.

Leave a Reply