gform_postimage_description

Description

This filter is executed when creating the Post Image Description field and can be used to modify the “Description” label.

Usage

This would apply your function to all forms.

add_filter( 'gform_postimage_description', 'your_function_name', 10, 2 );

To target a specific form append the form id to the hook name. (format: gform_postimage_description_FORMID)

add_filter( 'gform_postimage_description_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 Description label:

add_filter( 'gform_postimage_description', 'change_postimage_description', 10, 2 );
function change_postimage_description( $label, $form_id ) {
    return 'Image Description';
}

Source Code

This filter is located in GF_Field_Post_Image::get_field_input() in includes/fields/class-gf-field-post-image.php.