Hi, Imaginate,
You can do this using WordPress' "admin_menu" hook and place the code in your theme file's functions.php. In the example below, the call to the "admin_menu" hook needs to have its priority set to a higher number so it fires after the menu has been built; otherwise Gravity Forms would build the menu again.
Also, when calling "remove_submenu_page" within your function, the parent menu name is the first parameter; the example is using "gf_edit_forms". This will be the name of the first menu item under the Forms menu header. This may be different if you are using Roles Management and have items turned off. To figure out what the name would be of your first menu item, you can mouse-over the name in the admin and review the link that displays. In the link's querystring, you will see "page=". The parameter after "page=" is the name of the menu so you would use that as your first parameter to the "remove_submenu_page" function.
//set the priority so this is called after the menu had been built
add_action('admin_menu', 'remove_help', 11);
function remove_help()
{
//the first parameter is the parent name of the first item in the Forms menu
remove_submenu_page("gf_edit_forms","gf_help");
}
Posted 12 years ago on Thursday February 16, 2012 |
Permalink