function theme_wikitools_create_notice in Wikitools 7
Same name and namespace in other branches
- 5 wikitools.module \theme_wikitools_create_notice()
- 6 wikitools.pages.inc \theme_wikitools_create_notice()
@todo Please document this function.
See also
3 theme calls to theme_wikitools_create_notice()
- theme_wikitools_page_does_not_exist in ./
wikitools.pages.inc - @todo Please document this function.
- theme_wikitools_page_found in ./
wikitools.pages.inc - @todo Please document this function.
- theme_wikitools_page_moved in ./
wikitools.pages.inc - @todo Please document this function.
File
- ./
wikitools.pages.inc, line 194 - Page callbacks for wikitools pages.
Code
function theme_wikitools_create_notice($variables) {
$page_name = $variables['page_name'];
$output = '';
$node_types = wikitools_node_types();
if (wikitools_node_creation() && count($node_types)) {
$create = '';
$count = 0;
foreach ($node_types as $type) {
$type = node_type_get_type($type);
if ($type && node_access('create', $type->type)) {
$create .= '<dt><a href="' . wikitools_create_url($type, $page_name) . '">' . $type->name . '</a></dt>';
$create .= '<dd>' . filter_xss_admin($type->description) . '</dd>';
}
}
if ($create) {
$output .= '<p>' . t('You can create the page as:') . '</p>';
$output .= '<dl>' . $create . '</dl>';
}
}
return $output;
}