function bulk_photo_nodes_menu in Bulk File Nodes 7
Implements hook_menu().
File
- ./
bulk_photo_nodes.module, line 21 - hooks and helper functions for bulk photo node.
Code
function bulk_photo_nodes_menu() {
$items = array();
$bpn_var = variable_get('bulk_photo_node_types');
if (!empty($bpn_var)) {
// Taken from node.module
node_type_cache_reset();
foreach (node_type_get_types() as $type) {
if (!empty($bpn_var[$type->type]) && $bpn_var[$type->type] !== 'none') {
$type_url_str = str_replace('_', '-', $type->type);
$items['node/add/' . $type_url_str . '/bulk'] = array(
'title' => 'Upload Images',
'title callback' => 'check_plain',
'page callback' => 'bulk_photo_nodes_page_get',
'page arguments' => array(
$type->type,
),
'access callback' => 'user_access',
'access arguments' => array(
'create bulk photo nodes',
),
'description' => $type->description,
'file' => 'node.pages.inc',
'file path' => drupal_get_path('module', 'node'),
);
}
}
}
return $items;
}