I'm having a custom post type (vehicle) and i attached a gallery (post) with image attachments in it.
Through my custom frontend form, I set all the post and postmeta details right, as i want to, so my theme handles them well.
When I try to edit a post through my form, all work well.But when I try to edit a post through wp-admin, the gallery images gets the post_id as the post_parent, and not the gallery_id I have set in my custom code.
The question is: How can i call a wp action / hook / function, when a post is been edit through the wp-admin and correct the post_parent of the post_id ? Is there any wp reference to help fix this and set the gallery_id as it is
Thank you in advance.