diff --git a/linkchecker.module b/linkchecker.module index 128f0e1..c6d0a7b 100644 --- a/linkchecker.module +++ b/linkchecker.module @@ -278,6 +278,7 @@ function _linkchecker_link_node_ids($link, $node_author_account = NULL) { 'text_long', 'text', 'link_field', + 'field_collection', ); // Only check link and text fields, since those are the only types we @@ -1585,6 +1586,30 @@ function _linkchecker_parse_fields($entity_type, $bundle_name, $entity, $return_ } } break; + + case 'field_collection': + if (module_exists('field_collection')) { + $field_collection_ids = array(); + foreach ($entity_field as $language) { + foreach ($language as $item) { + $field_collection_ids[] = $item['value']; + } + } + if ($field_collection_ids) { + $field_collections = field_collection_item_load_multiple($field_collection_ids); + if ($field_collections) { + foreach ($field_collections as $field_collection) { + $field_collection_text_items = _linkchecker_parse_fields('field_collection_item', $field_name, $field_collection); + if ($field_collection_text_items) { + foreach ($field_collection_text_items as $field_collection_text_item) { + $text_items[] = $text_items_by_field[$field['field_name']][] = $field_collection_text_item; + } + } + } + } + } + } + break; } }