gform_postimage_file

gform_postimage_file

DescriptionUsageParametersExamplesSource Code

Description
This filter is executed when creating the Post Image File field and can be used to modify the 「File」 label.
Usage
Applies to all forms.
1add_filter( 'gform_postimage_file', 'your_function_name', 10, 2 );
To target a specific form append the form id to the hook name. (format: gform_postimage_file_FORMID)
1add_filter( 'gform_postimage_file_5', 'your_function_name', 10, 2 );

Parameters

$label string
The label to be filtered.

$form_id integer
The current form』s id.

Examples
This example changes the default Post Image File label:
1234add_filter( 'gform_postimage_file', 'change_postimage_file', 10, 2 );function change_postimage_file( $label, $form_id ) {    return 'Image File';}
Source Code
This filter is located in GF_Field_Post_Image::get_field_input() in includes/fields/class-gf-field-post-image.php.

发表回复

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