You are here

function feeds_alter in Feeds 7

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

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

4 calls to feeds_alter()
FeedsNodeProcessor::getMappingTargets in plugins/FeedsNodeProcessor.inc
Return available mapping targets.
FeedsParser::getMappingSources in plugins/FeedsParser.inc
Declare the possible mapping sources that this parser produces.
FeedsTermProcessor::getMappingTargets in plugins/FeedsTermProcessor.inc
Return available mapping targets.
FeedsUserProcessor::getMappingTargets in plugins/FeedsUserProcessor.inc
Return available mapping targets.

File

./feeds.module, line 834
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);
  $list = module_list();
  foreach (module_list() as $module) {
    $function = $module . '_' . $type . '_alter';
    if (function_exists($function)) {
      call_user_func_array($function, $args);
    }
  }
}