function panels_admin_edit_node_comments in Panels 6.2
Same name and namespace in other branches
- 5.2 content_types/node_comments.inc \panels_admin_edit_node_comments()
1 string reference to 'panels_admin_edit_node_comments'
- panels_node_comments_panels_content_types in content_types/
node_comments.inc - Plugin declaration function - returns a plugin definition array that describes the content type.
File
- content_types/
node_comments.inc, line 58
Code
function panels_admin_edit_node_comments($id, $parents, $conf = array()) {
if (empty($conf)) {
$conf = array(
'mode' => variable_get('comment_default_mode', COMMENT_MODE_THREADED_EXPANDED),
'order' => variable_get('comment_default_order', COMMENT_ORDER_NEWEST_FIRST),
'comments_per_page' => variable_get('comment_default_per_page', '50'),
);
}
$form['mode'] = array(
'#type' => 'select',
'#title' => t('Mode'),
'#default_value' => $conf['mode'],
'#options' => _comment_get_modes(),
'#weight' => 1,
);
$form['order'] = array(
'#type' => 'select',
'#title' => t('Sort'),
'#default_value' => $conf['order'],
'#options' => _comment_get_orders(),
'#weight' => 2,
);
foreach (_comment_per_page() as $i) {
$options[$i] = t('!a comments per page', array(
'!a' => $i,
));
}
$form['comments_per_page'] = array(
'#type' => 'select',
'#title' => t('Pager'),
'#default_value' => $conf['comments_per_page'],
'#options' => $options,
'#weight' => 3,
);
return $form;
}