function cck_blocks_preprocess_block in CCK Blocks 7
Implements hook_preprocess_block().
@todo add contextual links for other entity types here (user, taxonomy term, etc).
File
- ./
cck_blocks.module, line 256
Code
function cck_blocks_preprocess_block(&$vars) {
// Set up contextual links for this CCK Block if the entity type is supported.
if ($vars['block']->module == 'cck_blocks' && !empty($vars['block']->entity_type)) {
switch ($vars['block']->entity_type) {
case 'node':
// Borrow node.modules contextual local tasks for the parent node
$vars['elements']['#contextual_links']['cck_blocks'] = array(
'node',
array(
$vars['block']->nid,
),
);
break;
}
}
}