Hook when image is attached
-
Hi,
I’ve written a plugin which uses the edit_attachment hook to do some stuff when an image attached to a post is updated. I’ve noticed that if I update something like the caption, the edit_attachment function gets fired (sorry if my terminology is incorrect; I’m very new to WordPress) correctly.
However, if I create an image using the media library which is not attached to a post, and then use the media library to attach that image to an existing post, my function doesn’t get fired. Is there another hook I should use to detect that scenario?
Thanks
Marta
- The topic ‘Hook when image is attached’ is closed to new replies.