Commit 799bca2a authored by John C. Fiala's avatar John C. Fiala
Browse files

Issue #1686024 by Alan D.: Added implementation of hook_field_diff_view().

parent 986d1ecc
<?php
/**
* @file
* Provide diff field functions for the Link module.
*/
/**
* Diff field callback for parsing link fields comparative values.
*/
function link_field_diff_view($items, $context) {
$diff_items = array();
foreach ($items as $delta => $item) {
if ($item['url'] && $item['title']) {
$diff_items[$delta] = $item['title'] . ' (' . $item['url'] . ')';
}
else {
$diff_items[$delta] = $item['title'] . $item['url'];
}
}
return $diff_items;
}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment