You are here

function feeds_plugin_type in Feeds 6

Determines the type of a plugin.

Parameters

$plugin_key: String that identifies a Feeds plugin key.

Return value

One of the following values: 'fetcher' if the plugin is a fetcher 'parser' if the plugin is a parser 'processor' if the plugin is a processor FALSE otherwise.

Related topics

3 calls to feeds_plugin_type()
FeedsImporter::setPlugin in includes/FeedsImporter.inc
Set plugin.
FeedsWebTestCase::setPlugin in tests/feeds.test
Choose a plugin for a importer configuration and assert it.
feeds_get_plugins_by_type in ./feeds.module
Gets all available plugins of a particular type.

File

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

Code

function feeds_plugin_type($plugin_key) {
  if (feeds_plugin_child($plugin_key, 'FeedsFetcher')) {
    return 'fetcher';
  }
  elseif (feeds_plugin_child($plugin_key, 'FeedsParser')) {
    return 'parser';
  }
  elseif (feeds_plugin_child($plugin_key, 'FeedsProcessor')) {
    return 'processor';
  }
  return FALSE;
}