In the media library every attachment post has an "Attached to" column. I've developed a plugin that adds author profile and a facebook like banner image.
I now discovered that the attachment posts, that are used as profile pictures, are not marked as "attached to".
I used a wordpress console plugin to get
WP_Post objects of a linked and of an unlinked attachment. But I couldn't find any difference between them that I could use to set it manually.
Is there any way to set the attached ststus of attachment posts?