WordPress.org

Make WordPress Core


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

wp_unspam_comment() 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

    r34129 r34130  
    259259    switch ( $action ) {
    260260        case 'deletecomment' :
    261             wp_delete_comment( $comment_id );
     261            wp_delete_comment( $comment );
    262262            $redir = add_query_arg( array('deleted' => '1'), $redir );
    263263            break;
    264264        case 'trashcomment' :
    265             wp_trash_comment($comment_id);
     265            wp_trash_comment( $comment );
    266266            $redir = add_query_arg( array('trashed' => '1', 'ids' => $comment_id), $redir );
    267267            break;
    268268        case 'untrashcomment' :
    269             wp_untrash_comment($comment_id);
     269            wp_untrash_comment( $comment );
    270270            $redir = add_query_arg( array('untrashed' => '1'), $redir );
    271271            break;
    272272        case 'spamcomment' :
    273             wp_spam_comment($comment_id);
     273            wp_spam_comment( $comment );
    274274            $redir = add_query_arg( array('spammed' => '1', 'ids' => $comment_id), $redir );
    275275            break;
    276276        case 'unspamcomment' :
    277             wp_unspam_comment($comment_id);
     277            wp_unspam_comment( $comment );
    278278            $redir = add_query_arg( array('unspammed' => '1'), $redir );
    279279            break;
Note: See TracChangeset for help on using the changeset viewer.