You are here

function supersized_get_node_settings in Supersized 8

Same name and namespace in other branches
  1. 7 supersized.module \supersized_get_node_settings()

Get supersized settings by node.

3 calls to supersized_get_node_settings()
supersized_node_settings_form in ./supersized.module
Supersized setting form for node.
supersized_node_settings_form_submit in ./supersized.module
Submit handler for node supersized settings form.
supersized_run in ./supersized.run.inc
Start supersized with Supersized plugin.

File

./supersized.module, line 853
Supersized module file.

Code

function supersized_get_node_settings($node) {
  $nid = is_object($node) ? $node->nid : $node;
  $result = db_select('supersized', 'supersized')
    ->fields('supersized')
    ->condition('nid', $nid)
    ->execute()
    ->fetchAssoc();
  if ($result) {
    return unserialize($result['settings']);
  }
  return array();
}