You are here

function feeds_get_feed_nid_entity_callback in Feeds 8.2

Gets the feed_nid for an entity for use in entity metadata.

1 string reference to 'feeds_get_feed_nid_entity_callback'
feeds_entity_property_info_alter in ./feeds.module
Implements hook_entity_property_info_alter().

File

./feeds.module, line 1143
Feeds - basic API functions and hook implementations.

Code

function feeds_get_feed_nid_entity_callback($entity, array $options, $name, $entity_type) {
  list($entity_id, , ) = entity_extract_ids($entity_type, $entity);
  $feed_nid = feeds_get_feed_nid($entity_id, $entity_type);
  if ($feed_nid === FALSE) {
    return NULL;
  }
  return $feed_nid;
}