You are here

function _themekey_ui_pathalias in ThemeKey 6

Function _themekey_ui_pathalias().

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

File

./themekey_ui_admin.inc, line 141

Code

function _themekey_ui_pathalias(&$form, &$form_state) {
  if (!isset($form['#alias'])) {
    return;
  }
  $pathalias_form['pathalias_theme']['theme'] = array(
    '#type' => 'select',
    '#title' => t('Theme'),
    '#default_value' => themekey_ui_get_path_theme($form['#alias']['src']),
    '#options' => _themekey_theme_options(),
    '#description' => t('Theme to be assigned to current path'),
  );
  $pathalias_form['pathalias_theme']['themekey_submit'] = array(
    '#type' => 'value',
    '#value' => '_themekey_ui_pathalias_submit',
  );
  array_splice($form, 4, 0, $pathalias_form);
  array_unshift($form['#submit'], 'themekey_ui_form_submit');
}