You are here

function conditional_fields_menu in Conditional Fields 6.2

Same name and namespace in other branches
  1. 5 conditional_fields.module \conditional_fields_menu()
  2. 6 conditional_fields.module \conditional_fields_menu()
  3. 7.3 conditional_fields.module \conditional_fields_menu()

Implementation of hook_menu().

File

./conditional_fields.module, line 48
Content fields and groups visibility based on the values of user defined 'trigger' fields.

Code

function conditional_fields_menu() {
  $items = array();
  foreach (node_get_types() as $type) {
    $content_type = content_types($type->type);
    $items['admin/content/node-type/' . $content_type['url_str'] . '/conditional'] = array(
      'title' => 'Conditional fields',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        '_conditional_fields_admin',
        $content_type['type'],
      ),
      'access arguments' => array(
        'administer conditional fields',
      ),
      'type' => MENU_LOCAL_TASK,
      'weight' => 5,
    );
  }
  return $items;
}