gform_export_menu

Description

Add new or modify default menu items which will appear in the Import/Export section menu.

Usage

Apply to all forms:

add_filter( 'gform_export_menu', 'my_custom_function' );

Parameters

  • $menu_items array

    An array of menu items to be displayed on the Import/Export page menu.

Examples

This example demonstrates how you can add a custom menu item to the Import/Export page menu. It also demonstrates (with the use of the gform_export_page_view filter) how to display content for this page when selected.

// add custom menu item
add_filter( 'gform_export_menu', 'my_custom_export_menu_item' );
function my_custom_export_menu_item( $menu_items ) {

$menu_items[] = array(
'name' => 'my_custom_export_page',
'label' => __( 'My Custom Export Page' )
);

return $menu_items;
}

// display content for custom menu item when selected
add_action( 'gform_export_page_my_custom_export_page', 'my_custom_export_page' );
function my_custom_export_page() {

GFExport::page_header();

echo 'My Custom Export Page Settings!';

GFExport::page_footer();

}

Source Code

This filter is located in GFExport::get_tabs() in export.php.