WordPress.org

Make WordPress Core

Changeset 12399


Ignore:
Timestamp:
12/15/2009 04:33:16 AM (11 years ago)
Author:
azaozz
Message:

Properly update pagination links when moderating comments for a particular post or page.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-admin/admin-ajax.php

    r12394 r12399  
    163163        die( (string) time() );
    164164
     165    $post_id = 0;
    165166    $status = 'total_comments'; // What type of comment count are we looking for?
    166167    $parsed = parse_url( $url );
     
    169170        if ( !empty( $query_vars['comment_status'] ) )
    170171            $status = $query_vars['comment_status'];
    171     }
    172 
    173     $comment_count = wp_count_comments();
     172        if ( !empty( $query_vars['p'] ) )
     173            $post_id = (int) $query_vars['p'];
     174    }
     175
     176    $comment_count = wp_count_comments($post_id);
    174177    $time = time(); // The time since the last comment count
    175178
Note: See TracChangeset for help on using the changeset viewer.