gform_userregistration_feed_settings_fields

gform_userregistration_feed_settings_fields

DescriptionUsageParametersExamplesPlacementSinceSource Code

Description
This filter can be used to modify the setting fields that appear on the feed page.
Usage
1add_filter( 'gform_userregistration_feed_settings_fields', 'your_function_name', 10, 2 );

Parameters

$fields array
An array of fields, with the name property corresponding with the property which appears in the User Registration Feed Meta. See the Settings API for more details.

$form Form Object
The form currently being processed.

Examples
1234567891011121314151617181920212223add_filter( 'gform_userregistration_feed_settings_fields', 'add_custom_user_registration_setting', 10, 2 );function add_custom_user_registration_setting( $fields, $form ) {    // adding my custom setting to the Additional Settings section    $fields['additional_settings']['fields'][] = array(        'name'      => 'myCustomSetting',        'label'     => __( 'My Custom Setting', 'my-text-domain' ),        'type'      => 'checkbox',        'choices'   => array(            array(                'label'         => __( 'This is the checkbox label', 'my-text-domain' ),                'value'         => 1,                'name'          => 'myCustomSetting'            )        ),        'tooltip' => sprintf( '

%s

%s', __( 'Tooltip Header', 'my-text-domain' ), __( 'This is the tooltip description', 'my-text-domain' ) ),        // this setting should only be visible for "create" feeds (and not "update" feeds)        'dependency'  => array(            'field'   => 'feedType',            'values'  => 'create'        )    );    return $fields;}
Placement
Your code snippet should be placed in the functions.php file of your active theme.
Since
This filter was added in version 3.0.
Source Code
1$fields = apply_filters( 'gform_userregistration_feed_settings_fields', $fields, $form );
This filter is located in GF_User_Registration::feed_settings_fields() in class-gf-user-registration.php.

发表回复

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