mirror of
https://github.com/WordPress/WordPress.git
synced 2025-01-22 08:11:52 +01:00
Fix the Trash quickling in edit-comments.php. See #14637
git-svn-id: http://svn.automattic.com/wordpress/trunk@15508 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
fbca3e400c
commit
071746cc11
@ -639,7 +639,7 @@ case 'add-comment' :
|
||||
foreach ( $table->items as $comment ) {
|
||||
get_comment( $comment );
|
||||
ob_start();
|
||||
$table->single_row( $comment->comment_ID, $mode, $status, true, true );
|
||||
$table->single_row( $comment->comment_ID, $mode, $comment_status, true, true );
|
||||
$comment_list_item = ob_get_contents();
|
||||
ob_end_clean();
|
||||
$x->add( array(
|
||||
|
@ -257,9 +257,9 @@ unset($status_links);
|
||||
<input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" />
|
||||
<input type="hidden" name="pagegen_timestamp" value="<?php echo esc_attr(current_time('mysql', 1)); ?>" />
|
||||
|
||||
<input type="hidden" name="_total" value="<?php echo esc_attr($total); ?>" />
|
||||
<input type="hidden" name="_per_page" value="<?php echo esc_attr($comments_per_page); ?>" />
|
||||
<input type="hidden" name="_page" value="<?php echo esc_attr($page); ?>" />
|
||||
<input type="hidden" name="_total" value="<?php echo esc_attr( $table->get_pagination_arg('total_items') ); ?>" />
|
||||
<input type="hidden" name="_per_page" value="<?php echo esc_attr( $table->get_pagination_arg('per_page') ); ?>" />
|
||||
<input type="hidden" name="_page" value="<?php echo esc_attr( $table->get_pagination_arg('page') ); ?>" />
|
||||
|
||||
<?php if ( isset($_REQUEST['paged']) ) { ?>
|
||||
<input type="hidden" name="paged" value="<?php echo esc_attr( absint( $_REQUEST['paged'] ) ); ?>" />
|
||||
@ -278,8 +278,8 @@ unset($status_links);
|
||||
<input type="hidden" name="s" value="<?php echo esc_attr($search); ?>" />
|
||||
<input type="hidden" name="mode" value="<?php echo esc_attr($mode); ?>" />
|
||||
<input type="hidden" name="comment_status" value="<?php echo esc_attr($comment_status); ?>" />
|
||||
<input type="hidden" name="page" value="<?php echo esc_attr($page); ?>" />
|
||||
<input type="hidden" name="per_page" value="<?php echo esc_attr($comments_per_page); ?>" />
|
||||
<input type="hidden" name="page" value="<?php echo esc_attr( $table->get_pagination_arg('page') ); ?>" />
|
||||
<input type="hidden" name="per_page" value="1" />
|
||||
<input type="hidden" name="p" value="<?php echo esc_attr( $post_id ); ?>" />
|
||||
<input type="hidden" name="comment_type" value="<?php echo esc_attr( $comment_type ); ?>" />
|
||||
<?php wp_nonce_field( 'add-comment', '_ajax_nonce', false ); ?>
|
||||
|
@ -1941,7 +1941,7 @@ class WP_Comments_Table extends WP_List_Table {
|
||||
}
|
||||
|
||||
function prepare_items() {
|
||||
global $post_id, $comment_status, $mode;
|
||||
global $post_id, $comment_status, $mode, $search;
|
||||
|
||||
$post_id = isset( $_REQUEST['p'] ) ? absint( $_REQUEST['p'] ) : 0;
|
||||
|
||||
@ -1955,8 +1955,8 @@ class WP_Comments_Table extends WP_List_Table {
|
||||
|
||||
$search = ( isset( $_REQUEST['s'] ) ) ? $_REQUEST['s'] : '';
|
||||
|
||||
if ( isset( $_POST['num'] ) )
|
||||
$comments_per_page = $_POST['num'];
|
||||
if ( isset( $_POST['per_page'] ) )
|
||||
$comments_per_page = $_POST['per_page'];
|
||||
else
|
||||
$comments_per_page = (int) get_user_option( 'edit_comments_per_page' );
|
||||
|
||||
|
@ -135,6 +135,22 @@ class WP_List_Table {
|
||||
$this->_pagination_args = $args;
|
||||
}
|
||||
|
||||
/**
|
||||
* Access the pagination args
|
||||
*
|
||||
* @since 3.1.0
|
||||
* @access public
|
||||
*
|
||||
* @param string $key
|
||||
* @return array
|
||||
*/
|
||||
function get_pagination_arg( $key ) {
|
||||
if ( 'page' == $key )
|
||||
return $this->get_pagenum();
|
||||
|
||||
return @$this->_pagination_args[ $key ];
|
||||
}
|
||||
|
||||
/**
|
||||
* Wether the table has items to display or not
|
||||
*
|
||||
|
@ -209,7 +209,7 @@ setCommentsList = function() {
|
||||
}
|
||||
|
||||
theList.get(0).wpList.add( theExtraList.children(':eq(0)').remove().clone() );
|
||||
// $('#get-extra-comments').submit(); See http://core.trac.wordpress.org/ticket/14637
|
||||
$('#get-extra-comments').submit();
|
||||
};
|
||||
|
||||
theExtraList = $('#the-extra-comment-list').wpList( { alt: '', delColor: 'none', addColor: 'none' } );
|
||||
|
Loading…
Reference in New Issue
Block a user