edit_comment WordPress Action Hook

The edit_comment hook is triggered whenever a comment is edited. It allows you to perform custom actions when a comment is edited, such as notifying the comment author or updating a custom database table.

do_action( 'edit_comment', int $comment_ID, array $data ) #

Fires immediately after a comment is updated in the database.


Description

The hook also fires immediately before comment status transition hooks are fired.


Top ↑

Parameters

$comment_ID

(int)The comment ID.

$data

(array)Comment data.


Top ↑

Source

File: wp-includes/comment.php

View on Trac



Top ↑

Changelog

Changelog
VersionDescription
4.6.0Added the $data parameter.
1.2.0Introduced.

The content displayed on this page has been created in part by processing WordPress source code files which are made available under the GPLv2 (or a later version) license by theĀ Free Software Foundation. In addition to this, the content includes user-written examples and information. All material is subject to review and curation by the WPPaste.com community.

Show More
Show More