diff options
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); } /** |