You are here

function image_hotspots_db_save in Image Hotspots 7.2

Save hotspot data in database.

Parameters

int $fid: File id.

string $language: Language.

string $data: Information about hotspots (JSON).

1 call to image_hotspots_db_save()
image_hotspots_node_submit in ./image_hotspots.module
Implements hook_node_submit().

File

includes/image_hotspots.db.inc, line 18
Functions for database interactions.

Code

function image_hotspots_db_save($fid, $language, $data) {
  if (empty($data)) {
    return;
  }
  $fields = array(
    'fid' => $fid,
    'language' => $language,
    'coordinates' => $data,
  );
  drupal_write_record('image_hotspot', $fields);
}