You are here

function hs_content_taxonomy_menu in Hierarchical Select 5.3

Same name and namespace in other branches
  1. 6.3 modules/hs_content_taxonomy.module \hs_content_taxonomy_menu()

Implementation of hook_menu().

File

modules/hs_content_taxonomy.module, line 28
Implementation of the Hierarchical Select API for the Content Taxonomy module.

Code

function hs_content_taxonomy_menu($may_cache) {
  $items = array();
  if (!$may_cache) {
    $context = _hs_content_taxonomy_parse_context_from_url();
    if (is_array($context)) {
      list($content_type_name, $field_name) = $context;
      $content_type = content_types($content_type_name);
      $items[] = array(
        'path' => 'admin/content/types/' . $content_type['url_str'] . '/fields/' . $field_name . '/hs_config',
        'title' => t('Hierarchical Select configuration for !field', array(
          '!field' => $content_type['fields'][$field_name]['widget']['label'],
        )),
        'callback' => 'drupal_get_form',
        'callback arguments' => array(
          'hs_content_taxonomy_config_form',
          $content_type['type'],
          $field_name,
        ),
        'access' => user_access('administer content types'),
        'type' => MENU_CALLBACK,
      );
    }
  }
  return $items;
}