function panels_admin_edit_node_comments in Panels 5.2
Same name and namespace in other branches
- 6.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 62
Code
function panels_admin_edit_node_comments($id, $parents, $conf = array()) {
if (empty($conf)) {
$conf = array(
'mode' => _comment_get_display_setting('mode'),
'order' => _comment_get_display_setting('sort'),
'comments_per_page' => _comment_get_display_setting('comments_per_page'),
);
}
$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;
}