WordPress.org

Ready to get started?Download WordPress

Codex

Plugin API/Action Reference/wp insert comment

Usage

<?php
add_action('wp_insert_comment','comment_inserted',99,2);

function comment_inserted($comment_id, $comment_object) {
    if ($comment_object->comment_parent > 0) {
        //do something
    }
}
?>

Source File

wp_insert_comment action hook is located in wp-includes/comment.php

See also

This page is marked as incomplete. You can help Codex by expanding it.