i have an automated app to add posts to my wp site..
some of the posts have attachments(images) next to it and im supposed to add one as featured image, and the rest as images at the end of the content..
the problem is, i want images to be attached to the post id, and since i upload the images in "wp_insert_post_data" Hook, i can't get the post ID since it's not created yet..
yet, i don't want to make another loop to add the attachments to the posts, i want one loop to add both post and its attachment..
is there any hook/filter to edit the content applied inside wp_insert_post but after it got its new ID?
thanks in advance..