Changeset 37664 for trunk/src/wp-admin/includes/ajax-actions.php
- Timestamp:
- 06/09/2016 02:21:27 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/ajax-actions.php
r37584 r37664 396 396 if ( !empty( $query_vars['p'] ) ) 397 397 $post_id = (int) $query_vars['p']; 398 } 399 400 $comment_count = wp_count_comments($post_id); 401 402 // We're looking for a known type of comment count. 403 if ( isset( $comment_count->$status ) ) 404 $total = $comment_count->$status; 405 // Else use the decremented value from above. 398 if ( ! empty( $query_vars['comment_type'] ) ) 399 $type = $query_vars['comment_type']; 400 } 401 402 if ( empty( $type ) ) { 403 // Only use the comment count if not filtering by a comment_type. 404 $comment_count = wp_count_comments($post_id); 405 406 // We're looking for a known type of comment count. 407 if ( isset( $comment_count->$status ) ) { 408 $total = $comment_count->$status; 409 } 410 } 411 // Else use the decremented value from above. 406 412 } 407 413
Note: See TracChangeset
for help on using the changeset viewer.