Skip to:
Content
Pages
Categories
Search
Top
Bottom

New file notification

  • @sand06

    Participant

    Hi,

    I would like receive a notification or an e-mail when a new file is uploaded. Is it possible ?

    Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • @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).

    @sand06

    Participant

    Hi Henry,

    I am not a specialist in php. So I didn’t understand where past this code and if I need to personnalize the code. I tried to past it in post.php (changing the email) but it doesn’t work.
    Maybe is there a plugin which handle this ?

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.
Skip to toolbar