function hook_comment_update

The comment is being updated.

Parameters

$comment: The comment object.

Related topics

7 functions implement hook_comment_update()

Note: the procedural functions in this list are found by pattern matching, so the list may include some functions that are not actually implementations of this hook.

EntityCrudHookTestHooks::commentUpdate in core/modules/system/tests/modules/entity_crud_hook_test/src/Hook/EntityCrudHookTestHooks.php
Implements hook_ENTITY_TYPE_update() for comment entities.
entity_crud_hook_test_comment_update in modules/simpletest/tests/entity_crud_hook_test.module
Implements hook_comment_update().
forum_comment_update in modules/forum/forum.module
Implements hook_comment_update().
NodeHooks1::commentUpdate in core/modules/node/src/Hook/NodeHooks1.php
Implements hook_ENTITY_TYPE_update() for comment entities.
search_comment_update in modules/search/search.module
Implements hook_comment_update().

... See full list

1 invocation of hook_comment_update()
comment_save in modules/comment/comment.module
Accepts a submission of new or changed comment content.

File

modules/comment/comment.api.php, line 43

Code

function hook_comment_update($comment) {
    // Reindex the node when comments are updated.
    search_touch_node($comment->nid);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.