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 :
Download
menu-editor.zip (27 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

[...] Admin Menu Editor [...]
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.
[...] 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. [...]
[...] Administração do Menu e Dashboard do Wordpress (tags: menu dashboard wordpress CMS PLUGINS admin wpmu) [...]
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.
[...] 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 [...]
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″
You probably have an old version of PHP. This plugin requires PHP 5 or later.
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
Should be fixed now. Download again from the same link.
[...] Admin Menu Editor [...]
it works now! many thanks!
[...] Admin Menu Editor [...]
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!
Nevermind, found this great plugin:
http://wordpress.org/extend/plugins/wp-cms-post-control/
THANKS!
@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.
[...] Admin Menu Editor [...]
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?
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.
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!
[...] 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 [...]
@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.
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!
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.
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.
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.
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.
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.
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.
Thanks
Hi im experiencing a problem where the menu items are not dragging or dropping or anything. is this a javascript problem?
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).
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/
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.
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.
Same issue – It doesnt look like there are any changes in the new download. Has it been updated?
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.
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?
I tried the link just now and it’s showing 0.1.2 for me. Perhaps some kind of web cache on your end?
Sweet – I had to download it in IE to get latest. Not sure why caching in Firefox.
Loaded it and it works! Thanks!
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…
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…
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
Not in this version, but thanks for the idea.
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!
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!
ups – the duplicate qTranslate buttons reappeared. But as they all work I don’t mind (:
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
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?
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.
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!!
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.
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!!!
Try this : manually delete this plugin and reinstall it anew. Maybe there’s an old file somewhere that creates problems.
Nope still no luck unfortunately
Well, are you still getting the same error message (which should be impossible as there is no line 395 in that file anymore)?
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
I’m out of ideas for the time being.
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
You probably have an old version of PHP. You will need at least PHP 5 to use this plugin.
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
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
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.
No problem
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.
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.
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.
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.
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.
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
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.
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?
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.
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
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.
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…
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.
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)
Allright, how about this super-simple plugin :
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.
Best plugin ever! Thanks for your hard work.
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.
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??
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.
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.
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.
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.
Apparently the Reflection class wasnt included in my version of PHP. But now it is and everything is working! Great stuff!
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.
Well, the documentation says you can simply add the icon URL as the last parameter when calling add_menu_page, e.g. :
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).
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.
It looks like you’re missing a comma before the icon URL. And I think you don’t need the “public_html” bit.
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.
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.
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.
Sorry, this is the working version: http://wordpress.pastebin.ca/1389993
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.
Ok, I guess that’s a solution.
BTW, have you considered submitting this plugin to wordpress.org so that we can get automatic updates?
Yes, but I’m very lazy in this respect
Anyway to make this work with PHP4?
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.
Thanks for this great plugin! I looked for ages to find something to simplify the administration menus for my clients. Good work!
Well, it does just what I need – great plug! Thanks a lot
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?
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.
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.
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?
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.
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.
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.
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_settingscould be a problem, because internally it’s just a wrapper forget_option(at least in newer versions of WordPress).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.
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).
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.
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.
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.
@ 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.
@ 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.
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.
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).
[...] Admin Menu Editor – used to hide menus from my client’s user account and “keep things simple” [...]
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!!
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.
LOVE U! <3
[...] In: Wordpress plugins 13 Aug 2009 Go to Source [...]
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.
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).
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?
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.
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.
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.
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?
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…
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 ?
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.
[...] ö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 [...]
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 :
[...] Admin Menu Editor Permet de personnaliser les éléments du menu et de ses sous-menus d’administration. [...]
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.
It’s mainly due to my laziness. Nevertheless, listing in in the wp.org repository is on my Cthulhu-forsaken to-do list.