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
76f35b4e
Commit
76f35b4e
authored
May 09, 2009
by
Dries Buytaert
Browse files
- Patch
#367525
by zzolo: drupal_alter instead of hook_field_attach_view().
parent
e2178373
Changes
2
Hide whitespace changes
Inline
Side-by-side
modules/field/field.api.php
View file @
76f35b4e
...
...
@@ -586,7 +586,7 @@ function hook_field_attach_delete_revision($obj_type, $object) {
* @param $teaser
* Whether to display the teaser only, as on the main page.
*/
function
hook_field_attach_view
(
$output
,
$obj_type
,
$object
,
$teaser
)
{
function
hook_field_attach_view
_alter
(
$output
,
$obj_type
,
$object
,
$teaser
)
{
}
/**
...
...
modules/field/field.attach.inc
View file @
76f35b4e
...
...
@@ -102,7 +102,7 @@ function __construct($errors) {
* for any object after the operation is complete, and access or
* modify all the field, form, or display data for that object and
* operation. For example, field_attach_view() invokes
* hook_field_attach_view(). These all-module hooks are distinct from
* hook_field_attach_view
_alter
(). These all-module hooks are distinct from
* those of the Field Types API, such as hook_field_load(), that are
* only invoked for the module that defines a specific field type.
*
...
...
@@ -636,10 +636,7 @@ function _field_attach_view($obj_type, &$object, $teaser = FALSE) {
$output
=
_field_invoke_default
(
'view'
,
$obj_type
,
$object
,
$teaser
);
// Let other modules make changes after rendering the view.
foreach
(
module_implements
(
'field_attach_view'
)
as
$module
)
{
$function
=
$module
.
'_field_attach_view'
;
$function
(
$output
,
$obj_type
,
$object
,
$teaser
);
}
drupal_alter
(
'field_attach_view'
,
$output
,
$obj_type
,
$object
,
$teaser
);
return
$output
;
...
...
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