You are here

public static function ShareaholicContentSettings::insert in Share Buttons, Related Posts, Content Analytics - Shareaholic 7.3

Same name and namespace in other branches
  1. 8 content_settings.php \ShareaholicContentSettings::insert()

Inserts the content settings for a node in the database with values selected in the form

Parameters

Object $node the newly created node object:

2 calls to ShareaholicContentSettings::insert()
ShareaholicContentSettings::update in ./content_settings.php
Updates the content settings in the database with values selected in the content type form
shareaholic_node_insert in includes/node.php
Implements hook_node_insert(). When a node is created, notify CM to scrape its details and clear FB cache

File

./content_settings.php, line 80

Class

ShareaholicContentSettings
An interface to the Shareaholic Content Settings database table

Code

public static function insert($node) {
  if (!db_table_exists('shareaholic_content_settings')) {
    return;
  }
  if (isset($node->shareaholic_options)) {
    db_insert('shareaholic_content_settings')
      ->fields(array(
      'nid' => $node->nid,
      'settings' => self::serialize_settings($node),
    ))
      ->execute();
  }
}