You are here

function hook_comment_alter_node_postsave in Comment Alter 7

Respond to comment-triggered node updates.

This hook is invoked from _comment_alter_submit_node_fields() after the updated node got saved to let modules act upon altering node values from comments.

Parameters

$node: The updated node.

$comment: The comment that was submitted with this change.

1 function implements hook_comment_alter_node_postsave()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

comment_alter_comment_alter_node_postsave in ./comment_alter.module
Implements hook_comment_alter_node_postsave().
1 invocation of hook_comment_alter_node_postsave()
_comment_alter_submit_node_fields in ./comment_alter.module
Submit callback for the altered comment form.

File

./comment_alter.api.php, line 20

Code

function hook_comment_alter_node_postsave($node, $comment) {
  drupal_set_message(t('%user has updated !node by submitting a comment.', array(
    '%user' => $comment->name,
    '!node' => l($node->title, 'node/' . $node->nid),
  )));
}