Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
project
drupal
Commits
a2c946e5
Commit
a2c946e5
authored
Feb 09, 2010
by
Dries
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Patch
#709000
by Pasqualle: fixed param in hook_x_view_alter() function passed by reference.
parent
6a9475ec
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
modules/comment/comment.api.php
modules/comment/comment.api.php
+1
-1
modules/node/node.api.php
modules/node/node.api.php
+1
-1
modules/user/user.api.php
modules/user/user.api.php
+1
-1
No files found.
modules/comment/comment.api.php
View file @
a2c946e5
...
...
@@ -89,7 +89,7 @@ function hook_comment_view($comment) {
*
* @see comment_view()
*/
function
hook_comment_view_alter
(
$build
)
{
function
hook_comment_view_alter
(
&
$build
)
{
// Check for the existence of a field added by another module.
if
(
$build
[
'#view_mode'
]
==
'full'
&&
isset
(
$build
[
'an_additional_field'
]))
{
// Change its weight.
...
...
modules/node/node.api.php
View file @
a2c946e5
...
...
@@ -591,7 +591,7 @@ function hook_node_view($node, $view_mode) {
*
* @see node_view()
*/
function
hook_node_view_alter
(
$build
)
{
function
hook_node_view_alter
(
&
$build
)
{
if
(
$build
[
'#view_mode'
]
==
'full'
&&
isset
(
$build
[
'an_additional_field'
]))
{
// Change its weight.
$build
[
'an_additional_field'
][
'#weight'
]
=
-
10
;
...
...
modules/user/user.api.php
View file @
a2c946e5
...
...
@@ -345,7 +345,7 @@ function hook_user_view($account, $view_mode) {
*
* @see user_view()
*/
function
hook_user_view_alter
(
$build
)
{
function
hook_user_view_alter
(
&
$build
)
{
// Check for the existence of a field added by another module.
if
(
isset
(
$build
[
'an_additional_field'
]))
{
// Change its weight.
...
...
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