function ds_extras_revision_node_show in Display Suite 7
Menu callback: show an individual revision node using the revision view mode.
1 string reference to 'ds_extras_revision_node_show'
- _ds_extras_menu_alter in modules/
ds_extras/ ds_extras.registry.inc - Implements hook_menu_alter().
File
- modules/
ds_extras/ ds_extras.pages.inc, line 46 - Display suite Extras page functions.
Code
function ds_extras_revision_node_show($node, $message = NULL) {
drupal_set_title(t('Revision of %title from %date', array(
'%title' => $node->title,
'%date' => format_date($node->revision_timestamp),
)), PASS_THROUGH);
// Update the history table, stating that this user viewed this node.
node_tag_new($node);
// Determine view mode.
$layout = ds_get_layout('node', $node->type, 'revision', FALSE);
$view_mode = $layout ? 'revision' : 'full';
drupal_static('ds_extras_view_mode', $view_mode);
// For markup consistency with other pages, use node_view_multiple() rather than node_view().
return node_view_multiple(array(
$node->nid => $node,
), $view_mode);
}