diff --git a/feeds.module b/feeds.module index 7f483b4083fbdf946b0a70d41ee3c3c5569412e3..4529273ac752515564a68cdb44ca0abeeca89946 100644 --- a/feeds.module +++ b/feeds.module @@ -1044,6 +1044,32 @@ function feeds_include_simplepie() { return FALSE; } +/** + * @deprecated + * + * Simplified drupal_alter(). + * + * - None of that 'multiple parameters by ref' crazyness. + * - Don't use module_implements() to allow hot including on behalf + * implementations (see mappers/). + * + * @todo This needs to be removed and drupal_alter() used. This is crazy dumb. + */ +function feeds_alter($type, &$data) { + $args = array(&$data); + $additional_args = func_get_args(); + array_shift($additional_args); + array_shift($additional_args); + $args = array_merge($args, $additional_args); + + $hook = $type . '_alter'; + foreach (module_list() as $module) { + if (module_hook($module, $hook)) { + call_user_func_array($module . '_' . $hook, $args); + } + } +} + /** * @} */