Ensure the `wp_set_comment_status` action hook is only documented once.

See #26869.


git-svn-id: https://develop.svn.wordpress.org/trunk@28214 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Drew Jaynes (DrewAPicture) 2014-04-25 06:54:33 +00:00
parent 379f725bde
commit 9c66e66ac5
1 changed files with 8 additions and 14 deletions

View File

@ -1187,15 +1187,9 @@ function wp_delete_comment($comment_id, $force_delete = false) {
clean_comment_cache($comment_id);
/**
* Fires immediately before changing the comment's status to 'delete'.
*
* @since 1.5.0
*
* @param int $comment_id The comment ID.
* @param string $status The new 'delete' comment status.
*/
/** This action is documented in wp-includes/comment.php */
do_action( 'wp_set_comment_status', $comment_id, 'delete' );
wp_transition_comment_status('delete', $comment->comment_approved, $comment);
return true;
}
@ -1777,17 +1771,17 @@ function wp_set_comment_status($comment_id, $comment_status, $wp_error = false)
$comment = get_comment($comment_id);
/**
* Fires after a comment status has been updated in the database.
*
* The hook also fires immediately before comment status transition hooks are fired.
* Fires immediately before transitioning a comment's status from one to another
* in the database.
*
* @since 1.5.0
*
* @param int $comment_id The comment ID.
* @param string|bool $comment_status The comment status. Possible values include 'hold',
* 'approve', 'spam', 'trash', or false.
* @param int $comment_id Comment ID.
* @param string|bool $comment_status Current comment status. Possible values include
* 'hold', 'approve', 'spam', 'trash', or false.
*/
do_action( 'wp_set_comment_status', $comment_id, $comment_status );
wp_transition_comment_status($comment_status, $comment_old->comment_approved, $comment);
wp_update_comment_count($comment->comment_post_ID);