function ctools_node_form_author_content_type_render

File

plugins/content_types/node_form/node_form_author.inc, line 18

Code

function ctools_node_form_author_content_type_render($subtype, $conf, $panel_args, &$context) {
    $block = new stdClass();
    $block->module = 'node_form';
    $block->title = t('Authoring information');
    $block->delta = 'author-options';
    if (isset($context->form)) {
        if (!empty($context->form['author'])) {
            $block->content['author'] = $context->form['author'];
            if (isset($block->content['author']['#group'])) {
                unset($block->content['author']['#pre_render']);
                unset($block->content['author']['#theme_wrappers']);
                $block->content['author']['#type'] = '';
                $block->content['author']['name']['#size'] /= 2;
                $block->content['author']['date']['#size'] /= 2;
            }
            // 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['author']['#access'] = FALSE;
        }
    }
    else {
        $block->content = t('Authoring information.');
    }
    return $block;
}