Changeset 21107
- Timestamp:
- 06/25/2012 07:56:48 PM (14 years ago)
- File:
-
- 1 edited
-
trunk/wp-admin/includes/meta-boxes.php (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/includes/meta-boxes.php
r20896 r21107 477 477 <?php 478 478 479 $total = $wpdb->get_var($wpdb->prepare("SELECT count(1) FROM $wpdb->comments WHERE comment_post_ID = '%d' AND ( comment_approved = '0' OR comment_approved = '1')", $post_ID));479 $total = get_comments( array( 'post_id' => $post_ID, 'number' => 1, 'count' => true ) ); 480 480 $wp_list_table = _get_list_table('WP_Post_Comments_List_Table'); 481 481 $wp_list_table->display( true ); … … 484 484 echo '<p id="no-comments">' . __('No comments yet.') . '</p>'; 485 485 } else { 486 $hidden = get_hidden_meta_boxes( 'post');486 $hidden = get_hidden_meta_boxes( get_current_screen() ); 487 487 if ( ! in_array('commentsdiv', $hidden) ) { 488 488 ?> … … 490 490 <?php 491 491 } 492 493 ?> 494 <p class="hide-if-no-js" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p> 495 <?php 492 496 } 493 494 ?>495 <p class="hide-if-no-js hidden" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.get(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <img class="waiting" style="display:none;" src="<?php echo esc_url( admin_url( 'images/wpspin_light.gif' ) ); ?>" alt="" /></p>496 <?php497 497 498 498 wp_comment_trashnotice();
Note: See TracChangeset
for help on using the changeset viewer.