function themekey_ui_form_alter in ThemeKey 6
Same name and namespace in other branches
- 6.4 themekey_ui.module \themekey_ui_form_alter()
- 6.2 themekey_ui.module \themekey_ui_form_alter()
- 6.3 themekey_ui.module \themekey_ui_form_alter()
- 7.3 themekey_ui.module \themekey_ui_form_alter()
- 7 themekey_ui.module \themekey_ui_form_alter()
- 7.2 themekey_ui.module \themekey_ui_form_alter()
Implementation of hook_form_alter().
File
- ./
themekey_ui.module, line 43
Code
function themekey_ui_form_alter(&$form, $form_state, $form_id) {
// Node form
if (variable_get('themekey_ui_nodeform', 0) && user_access('assign node themes')) {
$type = isset($form['type']['#value']) ? $form['type']['#value'] : FALSE;
if ($form_id == $type . '_node_form' && variable_get('themekey_ui_nodeform|' . $type, 1)) {
require_once drupal_get_path('module', 'themekey_ui') . '/themekey_ui_admin.inc';
_themekey_ui_nodeform($form, $form_state);
}
}
// Path aliases
if ($form_id == 'path_admin_form' && variable_get('themekey_ui_pathalias', 0)) {
require_once drupal_get_path('module', 'themekey_ui') . '/themekey_ui_admin.inc';
_themekey_ui_pathalias($form, $form_state);
}
// Views
if ($form_id == 'views_ui_edit_display_form' && $form_state['#section'] == 'page-path' && variable_get('themekey_ui_views', 0) && user_access('administer views')) {
require_once drupal_get_path('module', 'themekey_ui') . '/themekey_ui_admin.inc';
_themekey_ui_views($form, $form_state);
}
}