You are here

function pathauto_menu in Pathauto 5

Same name and namespace in other branches
  1. 5.2 pathauto.module \pathauto_menu()
  2. 6.2 pathauto.module \pathauto_menu()
  3. 6 pathauto.module \pathauto_menu()
  4. 7 pathauto.module \pathauto_menu()

File

./pathauto.module, line 464

Code

function pathauto_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'path' => 'admin/settings/pathauto',
      'title' => t('Pathauto'),
      'description' => t('Configure how pathauto generates clean URLs for your content.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'pathauto_admin_settings',
      ),
      'access' => user_access('administer site configuration'),
      'type' => MENU_NORMAL_ITEM,
    );
  }
  $modulelist = variable_get('pathauto_modulelist', array());
  if (is_array($modulelist)) {
    foreach ($modulelist as $module) {
      $indexfunc = $module . '_pathauto_page';
      if (function_exists($indexfunc)) {
        $items[] = array(
          'path' => 'pathauto/' . $module,
          'title' => t('Pathauto'),
          'callback' => $indexfunc,
          'access' => 1,
          'type' => MENU_CALLBACK,
        );
      }
    }
  }
  return $items;
}