gform_form_settings_page_VIEW

gform_form_settings_page_VIEW

DescriptionUsageParametersExamplesSource Code

Description
The gform_form_settings_page_{VIEW} action in Gravity Forms adds custom pages (i.e. 「views」) to the Form Settings section. This hook is used by Gravity Forms add-ons to add their settings pages.
Usage
Specify the view name after the gform_form_settings_page_ part of the hook name:
1add_action( 'gform_form_settings_page_VIEW', 'my_custom_function' );
Parameters
There are no parameters for this action.

Examples
This example demonstrates how to display page content for menu items added via the gform_form_settings_menu filter using the gform_form_settings_page_view hook. Note that the VIEW in the hook name is variable and should be replaced by your page name.
1234567891011121314151617181920212223// add a custom menu item to the Form Settings page menuadd_filter( 'gform_form_settings_menu', 'my_custom_form_settings_menu_item' );function my_custom_form_settings_menu_item( $menu_items ) {     $menu_items[] = array(        'name' => 'my_custom_form_settings_page',        'label' => __( 'My Custom Form Settings Page' )        );     return $menu_items;} // handle displaying content for our custom menu when selectedadd_action( 'gform_form_settings_page_my_custom_form_settings_page', 'my_custom_form_settings_page' );function my_custom_form_settings_page() {     GFFormSettings::page_header();     echo 'My Custom Form Settings!';     GFFormSettings::page_footer(); }
Source Code
This filter is located in GFFormSettings::form_settings_page() form_settings.php.

发表回复

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