function media_browser_plus_menu in Media Browser Plus 7.3
Same name and namespace in other branches
- 7 media_browser_plus.module \media_browser_plus_menu()
- 7.2 media_browser_plus.module \media_browser_plus_menu()
Implements hook_menu().
See also
File
- ./
media_browser_plus.module, line 22 - Media Browser Plus - enhanced file management functions.
Code
function media_browser_plus_menu() {
$path = drupal_get_path('module', 'media_browser_plus');
$items['admin/content/file/%file/move-to-folder/%taxonomy_term'] = array(
'title' => 'Load Media Entities',
'page callback' => 'media_browser_plus_move_file_callback',
'page arguments' => array(
3,
5,
),
'access callback' => 'file_entity_access',
'access arguments' => array(
'update',
3,
),
'delivery callback' => 'drupal_json_output',
'type' => MENU_CALLBACK,
);
$items['admin/config/media/media_browser_plus_settings'] = array(
'title' => 'Media Browser Plus Settings',
'description' => 'Change the behaviour and layout of the media browser plus UI',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'media_browser_plus_media_settings',
),
'access arguments' => array(
'administer media browser',
),
'file path' => $path . '/includes',
'file' => 'media_browser_plus.admin.inc',
);
// Expose further "Mutliple" actions.
if (module_exists('multiform')) {
// Following approach comes from the media module.
// @todo Investigate passing file IDs in query string rather than a menu
// argument and then deprecate media_multi_load().
// @TODO Version compatibility cleanup.
$callback_function = '%media_multi';
if (module_exists('media_bulk_upload')) {
$callback_function = '%media_bulk_upload_multi';
}
$items['admin/content/file/delete-multiple/' . $callback_function] = array(
'title' => 'Delete multiple files',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'file_entity_multiple_delete_confirm',
4,
),
'access callback' => 'media_browser_plus_file_entity_access_wrapper',
'access arguments' => array(
'delete',
4,
),
'file' => 'file_entity.admin.inc',
'file path' => drupal_get_path('module', 'file_entity'),
);
}
// If there's an archiver available provide the multi download.
if (count(archiver_get_info())) {
// @TODO Version compatibility cleanup.
$callback_function = '%media_multi';
if (module_exists('media_bulk_upload')) {
$callback_function = '%media_bulk_upload_multi';
}
$items['admin/content/file/download-multiple/' . $callback_function] = array(
'title' => 'Download multiple files',
'page callback' => 'media_browser_plus_download_multiple_files',
'page arguments' => array(
4,
),
'access callback' => 'media_browser_plus_file_entity_access_wrapper',
'access arguments' => array(
'view',
4,
),
'file' => 'file_entity.admin.inc',
'file path' => drupal_get_path('module', 'file_entity'),
);
}
return $items;
}