We have a form that let's users create content on our site. The form adds to a custom post type via:
add_filter("gform_post_data", "update_post_type", 10, 2);
function update_post_type($post_data, $form){
if($form["id"] == '7'){
$post_data["post_type"] = "found-birds";
} else if($form["id"] == '5'){
$post_data["post_type"] = "lost-birds";
}
return $post_data;
}
When users upload a photo, it does not get attached to the post. It isn't even added to the uploads folder (organized by month/date).
This just suddenly stopped working, probably after a recent update (site owners do plugin updates so not sure if this is true). We had this form working for a long time without issue.