mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 12:20:22 +00:00
In _wp_ajax_delete_comment_response(), read the new 'all' prop returned by get_comment_count() via wp_count_comments() when setting $total. 'all' doesn't include spam in its count.
Updates unit tests. Props dipesh.kakadiya. Fixes #32362. git-svn-id: https://develop.svn.wordpress.org/trunk@34161 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -371,7 +371,8 @@ function _wp_ajax_delete_comment_response( $comment_id, $delta = -1 ) {
|
||||
// Only do the expensive stuff on a page-break, and about 1 other time per page
|
||||
if ( 0 == $total % $per_page || 1 == mt_rand( 1, $per_page ) ) {
|
||||
$post_id = 0;
|
||||
$status = 'total_comments'; // What type of comment count are we looking for?
|
||||
// What type of comment count are we looking for?
|
||||
$status = 'all';
|
||||
$parsed = parse_url( $url );
|
||||
if ( isset( $parsed['query'] ) ) {
|
||||
parse_str( $parsed['query'], $query_vars );
|
||||
|
||||
Reference in New Issue
Block a user