WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Notifications of uploads from Frontend Uploader

[Resolved] Notifications of uploads from Frontend Uploader

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Author Rinat Khaziev
    Participant

    @rinatkhaziev

    Are you familiar with WordPress filters? If yes, there’s a fu_after_upload filter

    Here’s a sample to place in your functions.php (not tested)

    add_action( 'fu_after_upload',  'my_notify_fu_after_upload' );
    
    function my_notify_fu_after_upload( $attachment_ids ) {
        wp_mail( 'admin@example.com', 'new upload', 'somebody uploaded a new file, please moderate' );
    }

    Depending on your PHP skills you can craft the message as you like.

    mmmmagnus
    Member

    @mmmmagnus

    Thanks!

    I’m not familiar with WordPress filters or have that good PHP skills but succeeded in setting up the notifications e-mail 🙂

    Great plugin and awesome support Rinat!!

    Btw, is it possible to change the required message “This field is required.” I can’t find it in any of the files and have the rest of the form translated.

    Plugin Author Rinat Khaziev
    Participant

    @rinatkhaziev

    You’re welcome,

    “This field is required” comes from jquery.validate plugin:

    Take a look at ./lib/js/frontend-uploader.js, there’s a call for validation plugin, refer to documentation at http://bassistance.de/jquery-plugins/jquery-plugin-validation/ .
    You will need to dequeue bundled frontend-uploader.js with
    wp_dequeue_script( 'frontend-uploader' ); and then enqueue your custom script.

    I’m marking this topic as resolved since the original issue is resolved.

    mmmmagnus
    Member

    @mmmmagnus

    Oh, that’s too advanced for me.

    Thanks for resolving my notification issue!

    Plugin Author Rinat Khaziev
    Participant

    @rinatkhaziev

    There’s nothing too serious, just read the documentation.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] Notifications of uploads from Frontend Uploader’ is closed to new replies.