I'm working on a plugin that would create four new fields for each item in the media library: Creator Name, Creator URL, License Name, and License URL. It strings these all together to make a nice credit for the media item.
I have the meta fields setup and working thanks to this tutorial. I've also successfully used the the_content filter to display the new fields on attachment pages. Therefore, I know the data is being stored and can be referenced in filters.
I'm just stuck on the implementation to get media credits showing below images embedded in posts. I think I should be using the get_image_tag filter, but am not 100% sure.
I get the feeling I'm not handling the arguments on get_image_tag correctly, but I don't know what is going wrong. I'm still pretty new with filters/actions, so this may be something really obvious that I'm missing. I have neither any output nor errors with wp_debug enabled.
Here's my code:
[Code moderated as per the Forum Rules. Please use the pastebin]
Any help is greatly appreciated.