Description
Use this filter to add a sub-menu item under the “Forms” menu.
Usage
add_filter( 'gform_addon_navigation', 'add_menu_item' );
Parameters
- $menu_items array
Current list of menu items to be filtered, in the following format:
array( array( "name" => "gf_campaignmonitor", "label" => "Campaign Monitor", "callback" => "campaignmonitor_page", "permission" => "gravityforms_campaignmonitor"); );
Examples
This example adds a new sub-menu item under “Forms”.
add_filter( 'gform_addon_navigation', 'add_menu_item' ); function add_menu_item( $menu_items ) { $menu_items[] = array( "name" => "new_submenu_name", "label" => "New Submenu", "callback" => "submenu_handler", "permission" => "edit_posts" ); return $menu_items; }
Source Code
This filter is located in GFForms::create_menu() in gravityforms.php