gform_export_menu

gform_export_menu

DescriptionUsageParametersExamplesSource Code

Description
Add new or modify default menu items which will appear in the Import/Export section menu.
Usage
Apply to all forms:
1add_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.
1234567891011121314151617181920212223// add custom menu itemadd_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 selectedadd_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.

发表回复

您的邮箱地址不会被公开。 必填项已用 * 标注