Révision 7e72b748
Ajouté par Assos Assos il y a plus de 6 ans
drupal7/sites/all/modules/ctools/plugins/relationships/terms_from_node.inc | ||
---|---|---|
43 | 43 |
} |
44 | 44 |
} |
45 | 45 |
} |
46 |
elseif ($field_info['type'] == 'entityreference' && $field_info['settings']['target_type'] == 'taxonomy_term') { |
|
47 |
$items = field_get_items('node', $node, $name); |
|
48 |
if (is_array($items)) { |
|
49 |
$tids = array(); |
|
50 |
foreach ($items AS $item) { |
|
51 |
$tids[] = $item['target_id']; |
|
52 |
} |
|
53 |
|
|
54 |
$term_objects = taxonomy_term_load_multiple($tids); |
|
55 |
foreach ($term_objects as $term) { |
|
56 |
if (empty($conf['vocabulary']) || in_array($term->vocabulary_machine_name, $conf['vocabulary'])) { |
|
57 |
$terms[] = $term->tid; |
|
58 |
} |
|
59 |
} |
|
60 |
} |
|
61 |
} |
|
46 | 62 |
} |
47 | 63 |
|
48 | 64 |
if (!empty($terms)) { |
Formats disponibles : Unified diff
Weekly update of contrib modules