You are here

function nodeblock_features_pipe_node_alter in Nodeblock 7

Implements hook_features_pipe_COMPONENT_alter().

Autodetect Nodeblock settings when creating a Feature.

File

./nodeblock.module, line 1006
Enables use of specified node types as custom blocks.

Code

function nodeblock_features_pipe_node_alter(&$pipe, $data, $export) {
  foreach ($data as $type) {
    if (variable_get('nodeblock_' . $type, 0)) {
      $pipe['variable'][] = 'nodeblock_' . $type;
      $pipe['variable'][] = 'nodeblock_comment_link_' . $type;
      $pipe['variable'][] = 'nodeblock_node_link_' . $type;
      $pipe['variable'][] = 'nodeblock_view_mode_' . $type;
      $pipe['variable'][] = 'nodeblock_node_overrides_' . $type;
      $pipe['variable'][] = 'nodeblock_node_override_block_available_' . $type;
      $pipe['variable'][] = 'nodeblock_node_override_block_title_field_' . $type;
    }
  }
}