• Hi
    As the title suggests i, being the only super-admin on my network, would like to get an email notification when any standard-admin on a sub-site uploads media. This function works to do this but on the main domain so its no good in my case i need to be notified via my super-admin email when any subsite administrator uploads. BTW: all subsites have admin accounts only able to upload media.

    Any ideas guys … ?

Viewing 4 replies - 1 through 4 (of 4 total)
  • You could upload a (it could be very) small MU plugin to each sub-site in the network that sends the e-mail to an address you specify.
    You could hook on to something like media_upload_file – more options here:

    Home

    Thread Starter girl_number_5

    (@trutherone)

    Yes its the age old issue with MU i.e. trying to avoid repetition and duplication especially if your subsites run into the hundreds or thousands. I believe the hard part is accessing parent-site level data from subsites. Ive hacked the solution to see if i can do it and (removed the error supression ‘@’) and i get no errors, if i hardcode my Super-admin email in and avoid deriving it via code just to see if i get a response it still doesnt work so i presume i need to find the common hook in all subsites that taps into the ‘upload attachment’ function.

    • This reply was modified 4 years, 7 months ago by girl_number_5.

    Yes, you would need to find a specific hook that executes during your specific upload process (and you need to be sure that e-mail notifications are currently working for other circumstances, of course).
    Try media_handle_upload?
    It is included under wp-admin -> includes -> media.php

    If you don’t want to hard-code your e-mail, you can include it as a new option under wp_options for each sub-site.

    Thread Starter girl_number_5

    (@trutherone)

    Ive found a plugin which notifies super-admins of any content changes in their subsites i think i can get it working from this. Although your hook suggestion media_handle_upload is good it only does the same (but with more coding required) as, add_attachment – there aren’t many hooks around the media upload function and i think add_attachment is the better choice – anywhoos ill give this a shot and see where it goes,

    Thanks for the input …
    Cheers

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘How do we get a notification upon media upload from any subsite’ is closed to new replies.