function ctools_node_created_content_type_render

Render the custom content type.

File

plugins/content_types/node_context/node_created.inc, line 24

Code

function ctools_node_created_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_created';
    $block->title = t('Created date');
    $block->content = format_date($node->created, $conf['format']);
    $block->delta = $node->nid;
    return $block;
}