Commit c21db64a authored by drumm's avatar drumm

#69403 by webchick, adoid overriding #theme set by hook_form_alter().

parent 8d70d932
......@@ -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'])) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment