function feeds_plugin_child in Feeds 6
Determines whether given plugin is derived from given base plugin.
Parameters
$plugin_key: String that identifies a Feeds plugin key.
$parent_plugin: String that identifies a Feeds plugin key to be tested against.
Return value
TRUE if $parent_plugin is directly *or indirectly* a parent of $plugin, FALSE otherwise.
Related topics
1 call to feeds_plugin_child()
- feeds_plugin_type in ./
feeds.module - Determines the type of a plugin.
File
- ./
feeds.module, line 834 - Feeds - basic API functions and hook implementations.
Code
function feeds_plugin_child($plugin_key, $parent_plugin) {
ctools_include('plugins');
$plugins = ctools_get_plugins('feeds', 'plugins');
$info = $plugins[$plugin_key];
if (empty($info['handler']['parent'])) {
return FALSE;
}
elseif ($info['handler']['parent'] == $parent_plugin) {
return TRUE;
}
else {
return feeds_plugin_child($info['handler']['parent'], $parent_plugin);
}
}