You are here

function _feeds_importer_digest in Feeds 7.2

Same name and namespace in other branches
  1. 8.2 feeds.module \_feeds_importer_digest()
  2. 6 feeds.module \_feeds_importer_digest()
  3. 7 feeds.module \_feeds_importer_digest()

Helper function for feeds_get_importer_id() and feeds_enabled_importers().

Related topics

2 calls to _feeds_importer_digest()
feeds_enabled_importers in ./feeds.module
Gets an array of enabled importer ids.
feeds_get_importer_id in ./feeds.module
Gets an enabled importer configuration by content type.
1 string reference to '_feeds_importer_digest'
feeds_cache_clear in ./feeds.module
Resets importer caches. Call when enabling/disabling importers.

File

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

Code

function _feeds_importer_digest() {
  $importers =& drupal_static(__FUNCTION__);
  if ($importers === NULL) {
    if ($cache = cache_get(__FUNCTION__)) {
      $importers = $cache->data;
    }
    else {
      $importers = array();
      foreach (feeds_importer_load_all() as $importer) {
        $importers[$importer->id] = isset($importer->config['content_type']) ? $importer->config['content_type'] : '';
      }
      cache_set(__FUNCTION__, $importers);
    }
  }
  return $importers;
}