PLEASE NOTE: These forums are no longer utilized and are provided as an archive for informational purposes only. All support issues will be handled via email using our support ticket system. For more detailed information on this change, please see this blog post.

Unset Submenu Registration

  1. Hi All,

    I have scored the forums and have not bee able to find any information on "Unsetting" GF Submenu items, especially the gf_user_registration, gf_campaignmonitor & gf_help

    Generally I would add these into my "Unset" function, in my functions.php:

    function remove_submenus() {
    	global $submenu;
    	unset($submenu['themes.php'][5]); // Removes 'Themes'.
    }
    add_action('admin_menu', 'remove_submenus');

    This doesn't work though :( I need to stop my editors from viewing these options, removing their capabilities is not enough.

    Any help would be great!

    Posted 12 years ago on Wednesday December 14, 2011 | Permalink
  2. No one else has wanted to do this before? wow

    Posted 12 years ago on Monday December 19, 2011 | Permalink
  3. Is there any reason why WordPress capabilities and role management isn't an option? This is what is used to show/hide elements, role management. If they don't have the capability they shouldn't see the menu item. Why is removing the capabilities not enough in this situation?

    Posted 12 years ago on Monday December 19, 2011 | Permalink
  4. Hi Carl,

    I agree, I think it should be enough, but for some reason the code that I am using does not hide options that I want to.

    Have you got any examples of working functions that hide these items?

    Posted 12 years ago on Monday December 19, 2011 | Permalink
  5. I would suggest looking at this plugin, it works great with Gravity Forms and allows you to easily edit existing roles as well as create new ones and customize the capabilities that each have:

    http://wordpress.org/extend/plugins/members/

    Posted 12 years ago on Monday December 19, 2011 | Permalink