function menu_block_menu in Menu Block 5.2
Same name and namespace in other branches
- 5 menu_block.module \menu_block_menu()
- 6.2 menu_block.module \menu_block_menu()
- 7.3 menu_block.module \menu_block_menu()
- 7.2 menu_block.module \menu_block_menu()
Implements hook_menu().
File
- ./
menu_block.module, line 15 - Provides configurable blocks of menu items.
Code
function menu_block_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/build/block/add-menu-block',
'title' => t('Add menu block'),
'description' => t('Add a new menu block.'),
'access' => user_access('administer blocks'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_block_add_block_form',
),
'type' => MENU_LOCAL_TASK,
);
$items[] = array(
'path' => 'admin/build/block/delete-menu-block',
'title' => t('Delete menu block'),
'access' => user_access('administer blocks'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'menu_block_delete',
),
'type' => MENU_CALLBACK,
);
$items[] = array(
'path' => 'admin/settings/menu_block',
'title' => t('Menu block'),
'description' => t('Add a new menu block.'),
'access' => user_access('administer blocks'),
'callback' => '_menu_block_by_module_hack',
);
}
return $items;
}