Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
drupal
Commits
63f61838
Commit
63f61838
authored
Nov 09, 2011
by
Nathaniel Catchpole
Browse files
Issue
#1333346
by claudiu.cristea: Fixed hook_field_extra_fields_alter() example code.
parent
b1d41a52
Changes
1
Hide whitespace changes
Inline
Side-by-side
core/modules/field/field.api.php
View file @
63f61838
...
...
@@ -74,8 +74,8 @@ function hook_field_extra_fields() {
function
hook_field_extra_fields_alter
(
&
$info
)
{
// Force node title to always be at the top of the list by default.
foreach
(
node_type_get_types
()
as
$bundle
)
{
if
(
isset
(
$info
[
'node'
][
$bundle
->
type
][
'title'
]))
{
$info
[
'node'
][
$bundle
->
type
][
'title'
][
'weight'
]
=
-
20
;
if
(
isset
(
$info
[
'node'
][
$bundle
->
type
][
'
form'
][
'
title'
]))
{
$info
[
'node'
][
$bundle
->
type
][
'
form'
][
'
title'
][
'weight'
]
=
-
20
;
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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