Make WordPress Core


Ignore:
Timestamp:
09/14/2015 09:39:46 PM (11 years ago)
Author:
wonderboymusic
Message:

More comment functions can accept a full object instead of comment_ID to reduce cache/db lookups.

See ##33638.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-admin/comment.php

    r34042 r34129  
    279279                        break;
    280280                case 'approvecomment' :
    281                         wp_set_comment_status( $comment_id, 'approve' );
     281                        wp_set_comment_status( $comment, 'approve' );
    282282                        $redir = add_query_arg( array( 'approved' => 1 ), $redir );
    283283                        break;
    284284                case 'unapprovecomment' :
    285                         wp_set_comment_status( $comment_id, 'hold' );
     285                        wp_set_comment_status( $comment, 'hold' );
    286286                        $redir = add_query_arg( array( 'unapproved' => 1 ), $redir );
    287287                        break;
Note: See TracChangeset for help on using the changeset viewer.