Custom Submenu Items
-
It would be good if you allowed the addition of custom submenu items. Or am I missing something?
-
The plugin read all items, also custom submenu items. If is not automatically in the list, after update of the Adminimize settings, you should add this via custom options. See the wiki – https://github.com/bueltge/adminimize/wiki
Hey,
1. The plugin does see the submenu, however it gives it a custom ID of
woocommerce__100008
. When Adminimize actually checks which menus to hide it uses a different IDwoocommerce__08
, so the menu item isn’t hidden.2. I’ve added the custom menu no problem. However, it adds it as a top-level menu, so it isn’t found/hidden when the plugin compares it to available sub pages.
The ID is not helpful, only the slug is necessary to hiding a menu item, it works for Sub- and Parent item in the same context. If you will get the slug active the debug function of Adminimize, login as User with the role, there you will hide and read inside the console (F12 in Browser) for the slugs.
It’s not working as expected:
Debug info regarding submenus:
https://www.dropbox.com/s/9pcplgbwiqw0i6e/Screenshot%202018-04-19%2014.40.41.png?dl=0My custom settings:
https://www.dropbox.com/s/6jjzs8waqrcn5a5/Screenshot%202018-04-19%2014.41.27.png?dl=0The menu item still there:
https://www.dropbox.com/s/i0p3wqji7ke6d23/Screenshot%202018-04-19%2014.41.44.png?dl=0The ID I mentioned is what it’s meant to use by default, but that does not work either:
Settings:
https://www.dropbox.com/s/n07xmgz32g0c9wg/Screenshot%202018-04-19%2014.43.17.png?dl=0When it comes to checking which submenus to disable, you can see the settings here:
https://www.dropbox.com/s/g3a8rvrmlw52zl8/Screenshot%202018-04-19%2014.46.19.png?dl=0My custom options only show in the top level menu variable
$mw_adminimize_menu
, so they are never checked here.The built in submenu choices have IDs of
woocommerce__10006
andwoocommerce__10007
. However, when we look the ID that’s being created for the item using$menu_slug . '__' . $subindex
You can see it actually creates:woocommerce__10
:
https://www.dropbox.com/s/rwgn5q3hcuhalla/Screenshot%202018-04-19%2014.49.55.png?dl=0This means neither option matches and the menu is not removed!
The debug in Storm is not necessary, but helpful. The debug function in the plugin list the same topic.
I’m wonder that the submenu-pages are stored in the menu variable. But be note that all custom settings will add to the menu var. It is possible to see this live, get access? maybe a mail to me. Is not easy to debug for me, because I haven’t the plugins, themes that create this menu items.The plugins are my own, so I could send you one with a licence for you to test? What email address is best to use?
Also, I appreciate the help in getting this working. Thanks!
Hey, were you still happy to look into this for me?
(Logged into the wrong account, but I’m also iconicwp)
- This reply was modified 6 years, 5 months ago by jamesckemp.
Please see here for an contact bueltge.de/impressum
Please a little bid patience, I have a lot of topics.
- The topic ‘Custom Submenu Items’ is closed to new replies.