function microdata_menu in Microdata 7
Implements hook_menu().
File
- ./
microdata.module, line 42
Code
function microdata_menu() {
// Set up default values for different kinds of callbacks.
$config_base = array(
'access arguments' => array(
'administer microdata',
),
'file' => 'microdata.admin.inc',
);
$autocomplete_base = array(
'access arguments' => array(
'access content',
),
'type' => MENU_CALLBACK,
'file' => 'microdata.pages.inc',
);
// Admin pages.
$items['admin/config/services/microdata'] = array(
'title' => 'Microdata settings',
'description' => 'Configure how site content gets published in Microdata.',
'page callback' => 'microdata_mapping_overview',
) + $config_base;
$items['admin/config/services/microdata/mappings'] = array(
'title' => 'Mappings',
'description' => 'Configure microdata mappings for bundles.',
'page callback' => 'microdata_mapping_overview',
'type' => MENU_DEFAULT_LOCAL_TASK,
) + $config_base;
$items['admin/config/services/microdata/vocabularies'] = array(
'title' => 'Vocabularies',
'description' => 'Configure vocabularies to use in autocomplete dropdown.',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'microdata_vocabulary_settings',
),
'type' => MENU_LOCAL_TASK,
) + $config_base;
// CTools modal.
$items['admin/config/services/microdata/mappings/manage/%/%/%ctools_js'] = array(
'title' => 'Edit microdata mapping',
'description' => 'Configure the microdata mapping for a bundle and its fields.',
'page callback' => 'microdata_ajax_bundle_mapping',
'page arguments' => array(
6,
7,
8,
),
) + $config_base;
// Autocomplete.
// I would prefer to use microdata/autocomplete, but for some reason it
// completely borks my server every time.
$items['microdata_autocomplete/itemtype'] = array(
'title' => 'Itemtype autocomplete',
'description' => 'Vocabulary autocomplete for itemtypes.',
'page callback' => 'microdata_autocomplete_itemtype',
) + $autocomplete_base;
$items['microdata_autocomplete/itemprop/%'] = array(
'title' => 'Itemprop autocomplete',
'description' => 'Vocabulary autocomplete for itemprops.',
'page callback' => 'microdata_autocomplete_itemprop',
'page arguments' => array(
2,
3,
),
) + $autocomplete_base;
return $items;
}