Title: Adding additional attachment info
Last modified: August 22, 2016

---

# Adding additional attachment info

 *  Resolved [jared_smith](https://wordpress.org/support/users/jared_smith/)
 * (@jared_smith)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-additional-attachment-info/)
 * In previous versions of Document Gallery, I was able to use the dg_doc_icon hook
   to add additional information about the attachments — specifically, the file 
   type (mime type) and size.
 * With the move to dg_icon_template, the hook no longer passes the attachment ID,
   so there’s no way for me to add additional information such as the file size 
   or type.
 * Would it be possible to add additional variables (besides the five that are currently
   exposed), or make it easier to add this information from a hook? If I were to
   send a patch adding this functionality, would you consider adding it?
 * [https://wordpress.org/plugins/document-gallery/](https://wordpress.org/plugins/document-gallery/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Dan Rossiter](https://wordpress.org/support/users/danrossiter/)
 * (@danrossiter)
 * [11 years, 5 months ago](https://wordpress.org/support/topic/adding-additional-attachment-info/#post-5596461)
 * Hi Jared,
 * I absolutely agree that the ID should be passed down to allow for additional 
   functionality. The ID being excluded was a complete oversight on my part. I’ll
   have that available in the next release.
 * Thanks for bringing this to my attention!
 * EDIT: Actually, I was going in to fix the issue and it looks like you do actually
   receive the ID through dg_icon_template. It should be your second parameter, 
   with the first parameter being the boolean indicating whether the user is including
   descriptions. Are you not seeing this on your system?
 * -Dan
 *  Thread Starter [jared_smith](https://wordpress.org/support/users/jared_smith/)
 * (@jared_smith)
 * [11 years, 4 months ago](https://wordpress.org/support/topic/adding-additional-attachment-info/#post-5596759)
 * Yes, I’m getting it now — I accidentally had a value set to low in my call to
   add_filter, so that’s why the argument wasn’t coming through before.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Adding additional attachment info’ is closed to new replies.

 * ![](https://ps.w.org/document-gallery/assets/icon.svg?rev=983329)
 * [Document Gallery](https://wordpress.org/plugins/document-gallery/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/document-gallery/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/document-gallery/)
 * [Active Topics](https://wordpress.org/support/plugin/document-gallery/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/document-gallery/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/document-gallery/reviews/)

## Tags

 * [file size](https://wordpress.org/support/topic-tag/file-size/)

 * 2 replies
 * 2 participants
 * Last reply from: [jared_smith](https://wordpress.org/support/users/jared_smith/)
 * Last activity: [11 years, 4 months ago](https://wordpress.org/support/topic/adding-additional-attachment-info/#post-5596759)
 * Status: resolved