@sand06
Active 7 years, 11 months ago
-
Henry Wright replied to the topic New file notification in the forum How-to & Troubleshooting 7 years, 11 months ago
Hi @sand06
Assuming the file is uploaded (and handled) by WordPress, you will need to hook to
wp_insert_post
https://codex.wordpress.org/Plugin_API/Action_Reference/wp_insert_post
$post
and$update
will be passed to your custom function. You can use those to check if the post is a new file upload (attachment).