From 8f14aed7059b52b8066a8fb7c46f8980a8f0f269 Mon Sep 17 00:00:00 2001 From: Rachel Baker Date: Thu, 12 May 2016 15:36:58 +0000 Subject: [PATCH] Comments: Add `$data` parameter to include the comment data in the `edit_comment` action. Props dshanske. Fixes #36427. git-svn-id: https://develop.svn.wordpress.org/trunk@37423 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/comment.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/comment.php b/src/wp-includes/comment.php index d00eb7760c..f579e958d5 100644 --- a/src/wp-includes/comment.php +++ b/src/wp-includes/comment.php @@ -2031,10 +2031,12 @@ function wp_update_comment($commentarr) { * The hook also fires immediately before comment status transition hooks are fired. * * @since 1.2.0 + * @since 4.6.0 The `$data` parameter was added. * - * @param int $comment_ID The comment ID. + * @param int $comment_ID The comment ID. + * @param array $data Comment data. */ - do_action( 'edit_comment', $comment_ID ); + do_action( 'edit_comment', $comment_ID, $data ); $comment = get_comment($comment_ID); wp_transition_comment_status($comment->comment_approved, $old_status, $comment); return $rval;