function video_multidownload_menu in Video 5
Same name and namespace in other branches
- 6 plugins/video_multidownload/video_multidownload.module \video_multidownload_menu()
- 6.2 plugins/video_multidownload/video_multidownload.module \video_multidownload_menu()
Implementation of hook_menu().
Parameters
$may_cache: boolean indicating whether cacheable menu items should be returned
Return value
array of menu information
File
- plugins/
video_multidownload/ video_multidownload.module, line 31 - Enable multiple file download in video module.
Code
function video_multidownload_menu($may_cache) {
$items = array();
if ($may_cache) {
$items[] = array(
'path' => 'admin/content/video/multidownload',
'title' => t('Multidownload'),
'description' => t('Administer video_multidownload module settings'),
'callback' => 'drupal_get_form',
'callback arguments' => array(
'video_multidownload_settings_form',
),
'access' => user_access('administer site configuration'),
'type' => MENU_NORMAL_ITEM,
);
}
else {
if (arg(0) == 'node' && is_numeric(arg(1))) {
if ($node = node_load(arg(1)) and $node->type == 'video') {
if (isset($node->disable_multidownload) && !$node->disable_multidownload && ($node->use_play_folder || $node->download_folder != '')) {
$items[] = array(
'path' => 'node/' . arg(1) . '/multidownload',
'title' => t('download other formats'),
'callback' => 'video_multidownload_download',
'access' => user_access('access video'),
'weight' => 7,
'type' => MENU_LOCAL_TASK,
);
}
}
}
}
return $items;
}