You are here

function resmushit_menu in reSmush.it image style optimizer 7.2

Same name and namespace in other branches
  1. 7 resmushit.module \resmushit_menu()

Menu for this module.

Return value

array An array with this module's settings.

File

./resmushit.module, line 24
Main file of the module.

Code

function resmushit_menu() {
  $items = array();
  $items['admin/config/media/resmushit'] = array(
    'title' => 'reSmush.it',
    'description' => 'Settings for the reSmush.it image style effect',
    'page callback' => 'drupal_get_form',
    'page arguments' => array(
      'resmushit_admin',
    ),
    'access arguments' => array(
      'administer resmushit',
    ),
    // 'type' => MENU_NORMAL_ITEM,  // Not necessary since this is the default.
    'weight' => 0,
  );

  // For the default local task, we need very little configuration, as the callback and other conditions are handled by the parent callback.
  $items['admin/config/media/resmushit/settings'] = array(
    'title' => 'Settings',
    // 'description' => 'General settings',
    'type' => MENU_DEFAULT_LOCAL_TASK,
    'weight' => 1,
  );
  $items['admin/config/media/resmushit/dashboard'] = array(
    'title' => 'Dashboard',
    'description' => 'Information relevant to the reSmush.it module activity on this site.',
    'page callback' => 'resmushit_dashboard',
    'access arguments' => array(
      'administer resmushit',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 2,
  );

  // A shortcut to the permissions settings for this module.
  $items['admin/config/media/resmushit/permissions'] = array(
    'title' => 'Permissions',
    'description' => 'Configure access permissions',
    'page callback' => 'resmushit_perms',
    'access arguments' => array(
      'administer resmushit',
    ),
    'type' => MENU_LOCAL_TASK,
    'weight' => 5,
  );
  return $items;
}