Commit b11c5076 authored by Jody Lynn's avatar Jody Lynn

Adding new tab to admin/content for media

parent 8111718b
......@@ -24,7 +24,7 @@ define('MEDIA_TYPES_DEFAULT', '*');
/* ***************************************** */
/**
* Implementation of hook_menu().
* Implement hook_menu().
*/
function media_menu() {
// AJAX formatter. This page is used to create the formatter form
......@@ -37,7 +37,15 @@ function media_menu() {
'page callback' => 'media_ahah_metadata_ahah',
'access arguments' => array('access content'),
);
$items['admin/content/media'] = array(
'title' => 'Media',
'description' => 'Manage files used on your site.',
'page callback' => 'drupal_get_form',
'page arguments' => array('media_admin'),
'access arguments' => array('administer media'),
'type' => MENU_LOCAL_TASK,
'file' => 'media_settings.inc',
);
// Default settings, for content types that do not have their own.
$items['admin/config/media/media'] = array(
'title' => 'Media settings',
......@@ -52,6 +60,18 @@ function media_menu() {
return $items;
}
/**
* Implement hook_permission().
*/
function media_permission() {
return array(
'administer media' => array(
'title' => t('Administer media'),
'description' => t('Add, edit or delete media.'),
),
);
}
/**
* Implementation of hook_form_alter().
* @param $form
......
......@@ -100,4 +100,8 @@ function media_settings_global($form) {
);
return system_settings_form($settings_form);
}
function media_admin($form) {
return $form;
}
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment