You are here

function panels_node_load in Panels 5.2

Same name and namespace in other branches
  1. 6.3 panels_node/panels_node.module \panels_node_load()
  2. 6.2 panels_node/panels_node.module \panels_node_load()

Implementation of hook_load().

Panels does not use revisions for nodes because that would open us up to have completely separate displays, and we'd have to copy them, and that's going to be a LOT of data.

File

panels_node/panels_node.module, line 256
panels_node.module

Code

function panels_node_load($node) {

  // We shortcut this because only in some really drastic corruption circumstance will this
  // not work.
  $additions['panels_node'] = db_fetch_array(db_query("SELECT * FROM {panels_node} WHERE nid = %d", $node->nid));
  $additions['panels_node']['contexts'] = !empty($additions['panels_node']['contexts']) ? unserialize($additions['panels_node']['contexts']) : array();
  $additions['panels_node']['relationships'] = !empty($additions['panels_node']['relationships']) ? unserialize($additions['panels_node']['relationships']) : array();
  return $additions;
}