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
This commit is contained in:
Rachel Baker 2016-05-12 15:36:58 +00:00
parent ab3afd670d
commit 8f14aed705
1 changed files with 4 additions and 2 deletions

View File

@ -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;