function node_export_menu in Node export 6.3
Same name and namespace in other branches
- 6.2 node_export.module \node_export_menu()
- 7.3 node_export.module \node_export_menu()
Implementation of hook_menu().
File
- ./
node_export.module, line 20 - The Node export module.
Code
function node_export_menu() {
$items['admin/settings/node_export'] = array(
'access arguments' => array(
'administer site configuration',
),
'page callback' => 'drupal_get_form',
'page arguments' => array(
'node_export_settings',
),
'title' => 'Node export',
'description' => 'Configure the settings for Node export.',
'file' => 'node_export.pages.inc',
);
$selected_formats = variable_get('node_export_format', array(
'node_code',
));
if (count(array_filter($selected_formats)) > 1) {
$format_handlers = node_export_format_handlers();
foreach ($format_handlers as $format_handler => $format) {
if (in_array($format_handler, $selected_formats)) {
$items['node/%node/node_export/' . $format_handler] = array(
'access callback' => 'node_export_access_export',
'access arguments' => array(
1,
),
'page callback' => 'node_export_gui',
'page arguments' => array(
1,
$format_handler,
),
'title' => 'Node export (' . $format['#title'] . ')',
'weight' => 5,
'type' => MENU_LOCAL_TASK,
'file' => 'node_export.pages.inc',
);
}
}
}
else {
$items['node/%node/node_export'] = array(
'access callback' => 'node_export_access_export',
'access arguments' => array(
1,
),
'page callback' => 'node_export_gui',
'page arguments' => array(
1,
),
'title' => 'Node export',
'weight' => 5,
'type' => MENU_LOCAL_TASK,
'file' => 'node_export.pages.inc',
);
}
$items['admin/content/node_export'] = array(
'access arguments' => array(
'export nodes',
),
'page callback' => 'node_export_gui',
'page arguments' => array(
NULL,
NULL,
),
'title' => 'Node export',
'type' => MENU_CALLBACK,
'file' => 'node_export.pages.inc',
);
$items['node/add/node_export'] = array(
'title' => 'Node export: import',
'page callback' => 'drupal_get_form',
'page arguments' => array(
'node_export_import_form',
),
'access callback' => 'node_export_access_import',
'description' => 'Import content using <em>Node export</em>.',
'file' => 'node_export.pages.inc',
);
return $items;
}