function ctools_comment_created_content_type_render

Render the custom content type.

File

plugins/content_types/comment/comment_created.inc, line 24

Code

function ctools_comment_created_content_type_render($subtype, $conf, $panel_args, $context) {
    if (empty($context) || empty($context->data)) {
        return;
    }
    // Get a shortcut to the comment.
    $comment = $context->data;
    // Build the content type block.
    $block = new stdClass();
    $block->module = 'comment_created';
    $block->title = t('Created date');
    $block->content = format_date($comment->created, $conf['format']);
    $block->delta = $comment->cid;
    return $block;
}