When clicking "Show More Comments" in the Comments meta box on the Edit Post screen, change the click behavior to call a new class method on commentsBox, ->load(), that resets st (cool name) to the number of visible <tr>s before calling ->get(). This will account for spam'd and trash'd comments when returning comments at the proper offset.
Props utkarshpatel. Fixes #33829. Built from https://develop.svn.wordpress.org/trunk@34069 git-svn-id: http://core.svn.wordpress.org/trunk@34037 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -690,7 +690,7 @@ function post_comment_meta_box( $post ) {
|
||||
}
|
||||
|
||||
?>
|
||||
<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> <span class="spinner"></span></p>
|
||||
<p class="hide-if-no-js" id="show-comments"><a href="#commentstatusdiv" onclick="commentsBox.load(<?php echo $total; ?>);return false;"><?php _e('Show comments'); ?></a> <span class="spinner"></span></p>
|
||||
<?php
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user