function widgets_block_view in Widgets 7
Same name and namespace in other branches
- 6 widgets.block.inc \widgets_block_view()
Implements hook_block_view().
File
- ./
widgets.module, line 1453 - Exposes global functionality for creating widget sets.
Code
function widgets_block_view($delta = '') {
$a = explode('_', $delta, 2);
if ($a[0] == 's') {
$set = widgets_set_load($a[1]);
include_once drupal_get_path('module', 'widgets') . '/widgets.admin.inc';
//$block['content'] = theme('widgets_set_view', array('set' => $set));
$contextual_links = array(
'admin/structure/widgets/sets/edit/' . $a[1],
array(
'widgets',
),
);
$block['content'] = array(
'#theme' => 'widgets_set_view',
'#set' => $set,
'#contextual_links' => array(
'widgets' => $contextual_links,
),
);
return $block;
}
}