function feeds_alter

nittany7 feeds.module feeds_alter($type, &$data)
cis7 feeds.module feeds_alter($type, &$data)
mooc7 feeds.module feeds_alter($type, &$data)

@todo This needs to be removed and drupal_alter() used. This is crazy dumb.

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/).

Related topics

File

modules/contrib/feeds/feeds.module, line 1073
Feeds - basic API functions and hook implementations.

Code

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);
    }
  }
}