diff options
author | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-23 15:30:34 +0000 |
---|---|---|
committer | Angie Byron <webchick@24967.no-reply.drupal.org> | 2010-10-23 15:30:34 +0000 |
commit | 435585012c75bd5073d36cf6e7500864c6332bf8 (patch) | |
tree | ecbe63762742194192f4fcb1cc4b3a6d1b629b95 /modules/comment | |
parent | f914aef21b8801bf9a81ca3a4cd69484e12198c2 (diff) | |
download | brdo-435585012c75bd5073d36cf6e7500864c6332bf8.tar.gz brdo-435585012c75bd5073d36cf6e7500864c6332bf8.tar.bz2 |
#949576 by sun: Add missing hook_entity_view() and hook_entity_view_alter().
Diffstat (limited to 'modules/comment')
-rw-r--r-- | modules/comment/comment.api.php | 3 | ||||
-rw-r--r-- | modules/comment/comment.module | 4 |
2 files changed, 6 insertions, 1 deletions
diff --git a/modules/comment/comment.api.php b/modules/comment/comment.api.php index d2b03911c..987d04673 100644 --- a/modules/comment/comment.api.php +++ b/modules/comment/comment.api.php @@ -68,6 +68,8 @@ function hook_comment_load($comments) { * View mode, e.g. 'full', 'teaser'... * @param $langcode * The language code used for rendering. + * + * @see hook_entity_view() */ function hook_comment_view($comment, $view_mode, $langcode) { // how old is the comment @@ -90,6 +92,7 @@ function hook_comment_view($comment, $view_mode, $langcode) { * A renderable array representing the comment. * * @see comment_view() + * @see hook_entity_view_alter() */ function hook_comment_view_alter(&$build) { // Check for the existence of a field added by another module. diff --git a/modules/comment/comment.module b/modules/comment/comment.module index 70789b794..52549f974 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -939,7 +939,8 @@ function comment_view($comment, $node, $view_mode = 'full', $langcode = NULL) { } // Allow modules to modify the structured comment. - drupal_alter('comment_view', $build); + $type = 'comment'; + drupal_alter(array('comment_view', 'entity_view'), $build, $type); return $build; } @@ -983,6 +984,7 @@ function comment_build_content($comment, $node, $view_mode = 'full', $langcode = // Allow modules to make their own additions to the comment. module_invoke_all('comment_view', $comment, $view_mode, $langcode); + module_invoke_all('entity_view', $comment, 'comment', $view_mode, $langcode); } /** |