Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
c21db64a
Commit
c21db64a
authored
Jul 04, 2006
by
drumm
Browse files
#69403
by webchick, adoid overriding #theme set by hook_form_alter().
parent
8d70d932
Changes
1
Hide whitespace changes
Inline
Side-by-side
includes/form.inc
View file @
c21db64a
...
...
@@ -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'
]))
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment