function panels_admin_edit_custom in Panels 6.2
Same name and namespace in other branches
- 5.2 content_types/custom.inc \panels_admin_edit_custom()
Returns an edit form for the custom type.
1 string reference to 'panels_admin_edit_custom'
- panels_custom_panels_content_types in content_types/
custom.inc - Callback function to supply a list of content types.
File
- content_types/
custom.inc, line 83
Code
function panels_admin_edit_custom($id, $parents, $conf = NULL) {
if (empty($conf)) {
$conf = array(
'title' => '',
'body' => '',
'format' => FILTER_FORMAT_DEFAULT,
);
}
$form['title'] = array(
'#type' => 'textfield',
'#default_value' => $conf['title'],
'#title' => t('Title'),
);
$form['body'] = array(
'#title' => t('Body'),
'#type' => 'textarea',
'#default_value' => $conf['body'],
);
$parents[] = 'format';
$form['format'] = filter_form($conf['format'], 1, $parents);
return $form;
}