Description
Allows modifying the post data before updating it.
Usage
The following would apply to all forms:
add_filter( 'gform_advancedpostcreation_update_post_data', 'your_function_name', 10, 3 );
To target a specific form, append the form id to the hook name. (format: gform_advancedpostcreation_update_post_data_FORMID)
add_filter( 'gform_advancedpostcreation_update_post_data_1', 'your_function_name', 10, 3 );
Note that only files that were uploaded using the Gravity Forms File Upload field will be updated.
Parameters
- $post array
The post array being updated. Array returned is the WP get_post function. - $feed Feed Object
The feed being processed. - $entry Entry Object
The entry linked to the post.
Examples
add_filter( 'gform_advancedpostcreation_update_post_data', 'your_update_post_data', 10, 3 );
function your_update_post_data ($post, $feed, $entry) {
// do something
}
Placement
This code should be placed in the functions.php file of your active theme.
Since
This filter was added in the Gravity Forms Advanced Post Creation add-on version 1.0.
Source Code
This filter is located in GF_AdvancedPost_Creation::update() in class-post-update-handler.php