menu_node_edit_user_create_content($plid, $account = NULL)Get the node types that this user can create..
$plid The parent menu item (i.e. the section) we are looking at.
$account The user account being checked.
HTML links to create content in this section.
./menu_node_edit.page.inc, line 126
<?php
function menu_node_edit_user_create_content($plid, $account = NULL) {
$allowed = array();
$types = node_get_types();
$options = array('query' => array('section' => $plid));
foreach ($types as $type => $value) {
if (user_access('administer nodes') || user_access('create '. $type .' content', $account)) {
$allowed[] = l(t('Create new !type', array('!type' => $value->name)), 'node/add/'. str_replace('_', '-', $type), $options);
}
}
if (empty($allowed)) {
return;
}
return theme('item_list', $allowed, t('Create content'));
}
?>