I am trying to find a way of altering the output of a hook_field_insert. In my exact example, I'm trying to hook into the link_field_insert hook, in the Link module:
/**
* Implements hook_field_insert().
*/
function link_field_insert($entity_type, $entity, $field, $instance, $langcode, &$items) {
foreach ($items as $delta => $value) {
_link_process($items[$delta], $delta, $field, $entity);
}
}
and make a modification to the _link_process function, without actually having to hack the Link module. Is thi possible?
Just to have some background, what my end goal is to add a new form field on the node page for the user to enter link classes, and these classes would be autmatically applied to the link. I have already overridden the theme_link_field to add this form field and its value shows up in the $items array in the above function, so I just need to know how to override the above function.