Description
This filter is executed when creating the Post Image Title field and can be used to modify the “Title” label.
Usage
This would apply the function to all forms.
1 | add_filter( 'gform_postimage_title' , 'your_function_name' , 10, 2 ); |
To target a specific form append the form id to the hook name. (format: gform_postimage_title_FORMID)
1 | add_filter( 'gform_postimage_title_5' , 'your_function_name' , 10, 2 ); |
Examples
This example changes the default Post Image Title label;
1 2 3 4 | add_filter( 'gform_postimage_title' , 'change_postimage_title' , 10, 2 ); function change_postimage_title( $label , $form_id ) { return 'Image Title' ; } |
Source Code
This filter is located in GF_Field_Post_Image::get_field_input() in includes/fields/class-gf-field-post-image.php.