You are here

function onlyone_node_insert in Allow a content type only once (Only One) 7

Implements hook_node_insert().

File

./onlyone.module, line 265
Allows to define if a content type must have more than one node in the site.

Code

function onlyone_node_insert($node) {

  // Loading the helper functions file.
  module_load_include('inc', 'onlyone', 'onlyone.helpers');

  // Rebuild the menu if needed.
  _onlyone_rebuild_menu($node->type);
}