You are here

function compact_forms_menu in Compact Forms 5

Same name and namespace in other branches
  1. 6 compact_forms.module \compact_forms_menu()
  2. 7 compact_forms.module \compact_forms_menu()

Implementation of hook_menu().

File

./compact_forms.module, line 28
Compact Forms Drupal module.

Code

function compact_forms_menu($may_cache) {
  $items = array();
  if ($may_cache) {
    $items[] = array(
      'title' => t('Compact Forms'),
      'path' => 'admin/settings/compact_forms',
      'description' => t('Configure Compact Forms settings.'),
      'callback' => 'drupal_get_form',
      'callback arguments' => array(
        'compact_forms_admin_form',
      ),
      'access' => user_access('administer Compact Forms'),
    );
  }
  else {
    if (strpos($_GET['q'], 'admin/settings/compact_forms') === 0) {
      require_once drupal_get_path('module', 'compact_forms') . '/compact_forms.admin.inc';
    }
  }
  return $items;
}