Skip to content
Snippets Groups Projects
Commit c1fb8e2e authored by Dave Reid's avatar Dave Reid
Browse files

Issue #1139676 by Dave Reid, cosmicdreams: Fixed feeds_alter() doesn't support...

Issue #1139676 by Dave Reid, cosmicdreams: Fixed feeds_alter() doesn't support modulename.feeds.inc files supported by feeds_hook_info().
parent 70b618e6
No related branches found
No related tags found
No related merge requests found
......@@ -943,6 +943,8 @@ function feeds_library_exists($file, $library) {
* - 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);
......@@ -951,10 +953,10 @@ function feeds_alter($type, &$data) {
array_shift($additional_args);
$args = array_merge($args, $additional_args);
$hook = $type . '_alter';
foreach (module_list() as $module) {
$function = "{$module}_{$type}_alter";
if (function_exists($function)) {
call_user_func_array($function, $args);
if (module_hook($module, $hook)) {
call_user_func_array($module . '_' . $hook, $args);
}
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment