You are here

function facebook_comments_node_insert in Facebook Comments Social Plugin 7

Implements hook_node_insert().

File

./facebook_comments.module, line 348
Facebook Comments Social Plugin module file.

Code

function facebook_comments_node_insert($node) {
  if (isset($node->facebook_comments_enabled) && !empty($node->facebook_comments_enabled)) {
    db_insert('facebook_comments')
      ->fields(array(
      'nid' => $node->nid,
      'enabled' => $node->facebook_comments_enabled,
      'amount' => $node->facebook_comments_amount,
    ))
      ->execute();
  }
}