#69403 by webchick, adoid overriding #theme set by hook_form_alter().
parent
8d70d932b1
commit
c21db64ae8
|
@ -145,11 +145,14 @@ function drupal_get_form($form_id, &$form, $callback = NULL) {
|
|||
}
|
||||
}
|
||||
|
||||
if (theme_get_function($form_id)) {
|
||||
$form['#theme'] = $form_id;
|
||||
}
|
||||
elseif (theme_get_function($callback)) {
|
||||
$form['#theme'] = $callback;
|
||||
// Don't override #theme if someone already set it.
|
||||
if (!isset($form['#theme'])) {
|
||||
if (theme_get_function($form_id)) {
|
||||
$form['#theme'] = $form_id;
|
||||
}
|
||||
elseif (theme_get_function($callback)) {
|
||||
$form['#theme'] = $callback;
|
||||
}
|
||||
}
|
||||
|
||||
if (isset($form['#pre_render'])) {
|
||||
|
|
Loading…
Reference in New Issue