You are here

function taxonomy_feeds_term_lookup_term_by_guid in Feeds 8.2

Same name and namespace in other branches
  1. 7.2 mappers/taxonomy.inc \taxonomy_feeds_term_lookup_term_by_guid()

Looks up a term by GUID, assumes SQL storage backend.

Parameters

string $guid: The Feeds GUID to compare against.

Return value

int|FALSE The term id, or FALSE if one was not found.

1 call to taxonomy_feeds_term_lookup_term_by_guid()
taxonomy_feeds_set_target in mappers/taxonomy.inc
Callback for mapping. Here is where the actual mapping happens.

File

mappers/taxonomy.inc, line 199
On behalf implementation of Feeds mapping API for taxonomy.module.

Code

function taxonomy_feeds_term_lookup_term_by_guid($guid) {
  return db_select('feeds_item')
    ->fields('feeds_item', array(
    'entity_id',
  ))
    ->condition('entity_type', 'taxonomy_term')
    ->condition('guid', $guid)
    ->execute()
    ->fetchField();
}