WordPress.org

Ready to get started?Download WordPress

Forums

Frontend Uploader
[resolved] Notifications of uploads from Frontend Uploader (6 posts)

  1. mmmmagnus
    Member
    Posted 2 years ago #

    Is there a way to get notified of uploads in any way?

    http://wordpress.org/extend/plugins/frontend-uploader/

  2. Rinat Khaziev
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  3. mmmmagnus
    Member
    Posted 2 years ago #

    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.

  4. Rinat Khaziev
    Member
    Plugin Author

    Posted 2 years ago #

    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.

  5. mmmmagnus
    Member
    Posted 2 years ago #

    Oh, that's too advanced for me.

    Thanks for resolving my notification issue!

  6. Rinat Khaziev
    Member
    Plugin Author

    Posted 2 years ago #

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

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic