function ctools_node_form_comment_content_type_render
File
-
plugins/
content_types/ node_form/ node_form_comment.inc, line 22
Code
function ctools_node_form_comment_content_type_render($subtype, $conf, $panel_args, &$context) {
$block = new stdClass();
$block->module = 'node_form';
$block->title = t('Comment options');
$block->delta = 'comment-options';
if (isset($context->form)) {
if (isset($context->form['comment_settings'])) {
$block->content['comment_settings'] = $context->form['comment_settings'];
unset($block->content['comment_settings']['#pre_render']);
unset($block->content['comment_settings']['#theme_wrappers']);
$block->content['comment_settings']['#type'] = '';
// Set access to false on the original rather than removing so that
// vertical tabs doesn't clone it. I think this is due to references.
$context->form['comment_settings']['#access'] = FALSE;
}
}
else {
$block->content = t('Comment options.');
}
return $block;
}