gform_advancedpostcreation_editable_fields

Description

The gform_advancedpostcreation_editable_fields filter modifies the list of editable field IDs used by the Gravity Forms Advanced Post Creation Add-On when updating an existing post.

Usage

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

Parameters

NameTypeDescription
$editable_fieldsarrayAn array of field IDs that can be edited.
$feedarrayThe feed being processed.

Examples

Allow only specific fields to be editable.

add_filter( 'gform_advancedpostcreation_editable_fields', function( $editable_fields, $feed ) {
    // Restrict editable fields to field IDs 2 and 4.
    return array( 2, 4 );
}, 10, 2 );

Placement

This code can be used in the functions.php file of the active theme, a custom functions plugin, a custom add-on, or with a code snippets plugin.

See also the PHP section in this article: Where Do I Put This Code?

Since

Added in Gravity Forms Advanced Post Creation Add-On v1.6.0.

Source Code

This filter is located in includes/post-update-handler.php.