Here’s a quick mod:
Open up wp-content/plugins/file-away/lib/cls/class.fileaway_management.php
go to about line 1118 and change this:
if(move_uploaded_file(strip_tags($_FILES['upload_file']['tmp_name']), $location)) echo $file_id;
to this:
if(move_uploaded_file(strip_tags($_FILES['upload_file']['tmp_name']), $location))
{
do_action('fileup_after_upload', $location);
echo $file_id;
}
Then, in your theme’s functions.php, add this little class and modify the notification function as desired:
class my_custom_fileup_hook
{
public function __construct()
{
add_action('fileup_after_upload', array($this, 'upload_notification'));
}
public function upload_notification($location)
{
global $current_user;
$recipients = '[email protected]';
// $recipients = get_option('admin_email');
$name = $current_user->ID ? $current_user->display_name : 'Guest';
$timestamp = current_time('mysql');
$subject = $name.' uploaded a file on '.$timestamp;
$body = $name.' (user '.$current_user->ID.') uploaded a file.';
$body .= "\n";
$body .= 'Timestamp: '.$timestamp;
$body .= "\n";
$body .= 'Location: '.$location;
mail($recipients, $subject, $body);
return;
}
}
new my_custom_fileup_hook;
I’ve commented out $recipients = get_option('admin_email');
If you want the recipient to just be the current admin email, uncomment that line. Otherwise, hard code the email as exampled.