function page_theme_admin_edit in Page Theme 6
Same name and namespace in other branches
- 7.2 page_theme.admin.inc \page_theme_admin_edit()
- 7 page_theme.admin.inc \page_theme_admin_edit()
Menu callback; edits a theme.
1 string reference to 'page_theme_admin_edit'
- page_theme_menu in ./
page_theme.module - Implementation of hook_menu().
File
- ./
page_theme.admin.inc, line 185 - Admin page callbacks for the page_theme module.
Code
function page_theme_admin_edit(&$form_state, $page_theme) {
$form = array();
$form['theme'] = array(
'#type' => 'value',
'#value' => $page_theme->theme,
);
$form['theme_name'] = array(
'#type' => 'item',
'#title' => t('Theme'),
'#value' => page_theme_get_theme_name($page_theme->theme),
);
$form['pages'] = array(
'#type' => 'textarea',
'#title' => t('Pages'),
'#description' => t("Enter one page per line as Drupal paths. The '*' character is a wildcard. Example paths are %blog for the blog page and %blog-wildcard for every personal blog. %front is the front page.", array(
'%blog' => 'blog',
'%blog-wildcard' => 'blog/*',
'%front' => '<front>',
)),
'#default_value' => $page_theme->pages,
'#required' => TRUE,
);
$form['status'] = array(
'#type' => 'checkboxes',
'#title' => t('Status'),
'#default_value' => $page_theme->status ? array(
'enabled',
) : array(),
'#options' => array(
'enabled' => t('Enabled'),
),
);
$form['weight'] = array(
'#type' => 'weight',
'#title' => t('Weight'),
'#default_value' => $page_theme->weight,
'#delta' => 50,
);
$form['actions']['submit'] = array(
'#type' => 'submit',
'#value' => t('Update theme'),
);
$form['actions']['cancel'] = array(
'#value' => l(t('Cancel'), 'admin/build/page-theme'),
);
return $form;
}