mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-03-31 10:44:26 +00:00
More comment functions can accept a full object instead of comment_ID to reduce cache/db lookups.
See ##33638. git-svn-id: https://develop.svn.wordpress.org/trunk@34129 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -278,11 +278,11 @@ case 'unapprovecomment' :
|
||||
$redir = add_query_arg( array('unspammed' => '1'), $redir );
|
||||
break;
|
||||
case 'approvecomment' :
|
||||
wp_set_comment_status( $comment_id, 'approve' );
|
||||
wp_set_comment_status( $comment, 'approve' );
|
||||
$redir = add_query_arg( array( 'approved' => 1 ), $redir );
|
||||
break;
|
||||
case 'unapprovecomment' :
|
||||
wp_set_comment_status( $comment_id, 'hold' );
|
||||
wp_set_comment_status( $comment, 'hold' );
|
||||
$redir = add_query_arg( array( 'unapproved' => 1 ), $redir );
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user