function ctools_node_updated_content_type_render
Render the custom content type.
File
-
plugins/
content_types/ node_context/ node_updated.inc, line 24
Code
function ctools_node_updated_content_type_render($subtype, $conf, $panel_args, $context) {
if (empty($context) || empty($context->data) || empty($context->data->nid)) {
return;
}
// Get a shortcut to the node.
$node = $context->data;
// Build the content type block.
$block = new stdClass();
$block->module = 'node_updated';
$block->title = t('Last updated date');
$block->content = format_date(!empty($node->changed) ? $node->changed : $node->created, $conf['format']);
$block->delta = $node->nid;
return $block;
}