You are here

function wikitools_create_url in Wikitools 6

Same name and namespace in other branches
  1. 5 wikitools.module \wikitools_create_url()
  2. 6.2 wikitools.module \wikitools_create_url()
  3. 7 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

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,
    ),
  ));
}