You are here

function suggestion_node_insert in Autocomplete Search Suggestions 7

Same name and namespace in other branches
  1. 8.2 suggestion.module \suggestion_node_insert()
  2. 8 suggestion.module \suggestion_node_insert()
  3. 3.0.x suggestion.module \suggestion_node_insert()

Implements hook_node_insert().

File

./suggestion.module, line 156
Autocomplete suggestions.

Code

function suggestion_node_insert($node) {
  $types = SuggestionHelper::types();
  if (!empty($node->status) && !empty($node->type) && in_array($node->type, $types)) {
    SuggestionHelper::insert($node->title, SuggestionStorage::CONTENT_BIT);
  }
}