Skip to:
Content
Pages
Categories
Search
Top
Bottom

Reply To: New file notification

@henrywright

Moderator

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).

Skip to toolbar