WordPress.org

Ready to get started?Download WordPress

Plugin Directory

Comment Attachment

Allow your visitors to attach files with their comments!

This plugin allows your visitors to attach files with their comments, such as documents and images. It uses only built in wordpress hooks, and provides you with multiple settings in you admin (using native WP_Settings API). With these you can:

  • Select if the upload field is before or after the default comment fields.
  • Make attachment a required field.
  • Select a label of upload field (default is 'Upload Attachment')
  • Select a label of attachment in comment text (default is 'Attachment:')
  • Select which file types are allowed to be attached.
  • Select if attachment is visible in the the actual comment.
  • Select if attachment should be attached to post your visitor comments on, or not.
  • Select position of attachment in comment, either before the main comment, or after it.
  • Decide whether attachment can be downloaded.
  • Decide if the attachment image should be displayed in a comment and select image size (it automatically loads all image sizes set up in your wordpress installation and by your theme using 'add_image_size')
  • Restrict file size of uploaded attachment.
  • Try WordPress 3.6^ experimental audio / video player.

All attachments are inserted in your main wordpress media gallery, and are attached (if set in settings) to current commented post. (if set in settings). Upon comment deletion the attachment in that comment is deleted as well (if set in settings).

If an error occurs, like required attachment, or visitor trying to upload not allowed file type, plugin uses native wp_die() to handle the error, which can play nicely, if you use some other plugin for handeling comment form errors in a different way, like this one.

To control the output, in your css, you can use these classes and id's. For form elements:

.comment-form-attachment {}
.comment-form-attachment label .attachmentRules {}
.comment-form-attachment input#attachment {}

and for inner comment elements:

.attachmentFile {}
.attachmentFile p {}
.attachmentLink {}
.attachmentLink img {}

It should be easy peasy for you to style it! :)

Requires: 3.0 or higher
Compatible up to: 3.8.3
Last Updated: 2014-2-28
Downloads: 3,643

Ratings

5 stars
5 out of 5 stars

Support

2 of 6 support threads in the last two months have been resolved.

Got something to say? Need help?

Compatibility

+
=
Not enough data

0 people say it works.
0 people say it's broken.

100,1,1
100,1,1