I am the maintainer of the Image field caption module and a request to support the caption was requested. I tried to look how I can provide this. Token was an option and only because you are sending the entity item as a file object (which is a nice hack) but I don't want to just rely on that.

Trying a few approaches I thought of giving other modules the option to alter the captions and I come up with this idea which, although I am not sure it is the best for my case or use it at all, it doesn't add complexity to your module and it adds flexibility for other modules.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

hanoii’s picture

Status: Active » Needs review
FileSize
1.75 KB

Attached is a patch that adds a couple of drupal_alter() hooks as well as a hook_hook_info() implementation that allows modules to add hooks to a MODULE.colorbox.inc besides the usual module file.

hanoii’s picture

Issue summary: View changes

Updated issue summary.

Neslee Canil Pinto’s picture

Issue summary: View changes
Status: Needs review » Needs work

Patch Failed to apply.

Neslee Canil Pinto’s picture

Status: Needs work » Closed (outdated)