You are here

function defaultcontent_block_view_alter in Default Content 7.2

Same name and namespace in other branches
  1. 7 defaultcontent.module \defaultcontent_block_view_alter()

Implements hook_block_view_alter().

we turn all nodeblock blocks that use machine name to use nid

File

./defaultcontent.module, line 516
Module file for the Default content module which allow export and import of default content in a Drupal site.

Code

function defaultcontent_block_view_alter(&$data, $block) {
  if ($block->module == 'nodeblock' && !is_numeric($block->delta) && ($nid = defaultcontent_get_default($block->delta))) {
    $data = nodeblock_block_view($nid);
  }
}