function wikitools_create_url in Wikitools 7
Same name and namespace in other branches
- 5 wikitools.module \wikitools_create_url()
 - 6.2 wikitools.module \wikitools_create_url()
 - 6 wikitools.module \wikitools_create_url()
 
Build an url to create a new node.
Parameters
$type: type of new node
$title: title of new node
1 call to wikitools_create_url()
- theme_wikitools_create_notice in ./
wikitools.pages.inc  - @todo Please document this function.
 
File
- ./
wikitools.module, line 295  - A non-intrusive module to have some wiki-like behaviour.
 
Code
function wikitools_create_url($type, $title) {
  if (is_object($type)) {
    $type_url_str = str_replace('_', '-', $type->type);
  }
  else {
    $type_url_str = str_replace('_', '-', $type);
  }
  return url("node/add/{$type_url_str}", array(
    'query' => array(
      'edit[title]' => $title,
    ),
  ));
}