You are here

function feeds_alter in Feeds 8.2

Same name and namespace in other branches
  1. 7 feeds.module \feeds_alter()

@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

./feeds.module, line 1030
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);
    }
  }
}