mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-06-28 14:20:15 +00:00
Introduce $wpdb->delete(). props justindgivens, scribu. fixes #18948.
git-svn-id: https://develop.svn.wordpress.org/trunk@20287 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -988,7 +988,7 @@ function wp_delete_comment($comment_id, $force_delete = false) {
|
||||
do_action( 'deleted_commentmeta', $meta_ids );
|
||||
}
|
||||
|
||||
if ( ! $wpdb->query( $wpdb->prepare("DELETE FROM $wpdb->comments WHERE comment_ID = %d LIMIT 1", $comment_id) ) )
|
||||
if ( ! $wpdb->delete( $wpdb->comments, array( 'comment_ID' => $comment_id ) ) )
|
||||
return false;
|
||||
do_action('deleted_comment', $comment_id);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user