Projet

Général

Profil

Paste
Télécharger (492 octets) Statistiques
| Branche: | Révision:

root / htmltest / sites / all / modules / link / link.diff.inc @ a5572547

1 85ad3d82 Assos Assos
<?php
2
3
/**
4
 * @file
5
 * Provide diff field functions for the Link module.
6
 */
7
8
/**
9
 * Diff field callback for parsing link fields comparative values.
10
 */
11
function link_field_diff_view($items, $context) {
12
  $diff_items = array();
13
  foreach ($items as $delta => $item) {
14
    if ($item['url'] && $item['title']) {
15
      $diff_items[$delta] = $item['title'] . ' (' . $item['url'] . ')';
16
    }
17
    else {
18
      $diff_items[$delta] = $item['title'] . $item['url'];
19
    }
20
  }
21
  return $diff_items;
22
}