You are here

function _themekey_ui_nodeform in ThemeKey 6

Function _themekey_ui_nodeform().

1 call to _themekey_ui_nodeform()
themekey_ui_form_alter in ./themekey_ui.module
Implementation of hook_form_alter().

File

./themekey_ui_admin.inc, line 85

Code

function _themekey_ui_nodeform(&$form, &$form_state) {
  $form['nodeform_theme'] = array(
    '#type' => 'fieldset',
    '#title' => t('Theme'),
    '#collapsible' => TRUE,
    '#collapsed' => TRUE,
  );
  $theme = 'default';
  if (isset($form['#node']->nid)) {
    $theme = variable_get('themekey_nodeaspath', 0) ? themekey_ui_get_path_theme('node/' . $form['#node']->nid) : themekey_ui_get_node_theme($form['#node']->nid);
  }
  $form['nodeform_theme']['theme'] = array(
    '#type' => 'select',
    '#default_value' => $theme,
    '#options' => _themekey_theme_options(),
    '#description' => t('Theme to be assigned to current path/node'),
  );
  $form['nodeform_theme']['themekey_submit'] = array(
    '#type' => 'value',
    '#value' => '_themekey_ui_nodeform_submit',
  );
  $form['#submit'][] = 'themekey_ui_form_submit';
}