1.20.x node.module node_build_tempstore_id()

Build tempstore ID.

@since 1.11.0

Return value

string $node_tempstore_id: A unique string, or the current tempstore ID if set in the URL.

File

modules/node/node.module, line 3878
The core module that allows content to be submitted to the site.

Code

function node_build_tempstore_id() {
  if (isset($_GET['node_tempstore_id'])) {
    $node_tempstore_id = $_GET['node_tempstore_id'];
  }
  else {
    $uuid = new Uuid();
    $node_tempstore_id = $uuid->generate();
  }
  return $node_tempstore_id;
}