Remove unnecessary comments. See #15416
git-svn-id: http://svn.automattic.com/wordpress/trunk@16856 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
a4f15ae9a8
commit
c3b2eb3c14
|
@ -36,11 +36,8 @@ if ( $doaction ) {
|
||||||
}
|
}
|
||||||
|
|
||||||
$approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0;
|
$approved = $unapproved = $spammed = $unspammed = $trashed = $untrashed = $deleted = 0;
|
||||||
$redirect_to = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'spammed', 'unspammed', 'approved', 'unapproved', 'ids' ), wp_get_referer() );
|
|
||||||
|
|
||||||
// Fix the problem with wrong page number. This happens when the user use the javascript
|
$redirect_to = remove_query_arg( array( 'trashed', 'untrashed', 'deleted', 'spammed', 'unspammed', 'approved', 'unapproved', 'ids' ), wp_get_referer() );
|
||||||
// pagination feature to navigate to a certain page, then does some bulk actions there,
|
|
||||||
// he will be redirected back to te original page number instead of the navigated one.
|
|
||||||
$redirect_to = add_query_arg( 'paged', $pagenum, $redirect_to );
|
$redirect_to = add_query_arg( 'paged', $pagenum, $redirect_to );
|
||||||
|
|
||||||
foreach ( $comment_ids as $comment_id ) { // Check the permissions on each
|
foreach ( $comment_ids as $comment_id ) { // Check the permissions on each
|
||||||
|
@ -105,8 +102,6 @@ if ( $doaction ) {
|
||||||
|
|
||||||
$wp_list_table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
// redirect to the last page if the page number is larger than the total number of pages
|
|
||||||
// this can happen when all the items in the last page are deleted, for example
|
|
||||||
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
|
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
|
||||||
if ( $pagenum > $total_pages && $total_pages > 0 ) {
|
if ( $pagenum > $total_pages && $total_pages > 0 ) {
|
||||||
wp_redirect( add_query_arg( 'paged', $total_pages ) );
|
wp_redirect( add_query_arg( 'paged', $total_pages ) );
|
||||||
|
|
|
@ -21,18 +21,13 @@ foreach ( array( 'p', 'attachment_id', 'page_id' ) as $_redirect ) {
|
||||||
}
|
}
|
||||||
unset( $_redirect );
|
unset( $_redirect );
|
||||||
|
|
||||||
// Handle bulk actions
|
|
||||||
$doaction = $wp_list_table->current_action();
|
$doaction = $wp_list_table->current_action();
|
||||||
|
|
||||||
if ( $doaction ) {
|
if ( $doaction ) {
|
||||||
check_admin_referer('bulk-posts');
|
check_admin_referer('bulk-posts');
|
||||||
|
|
||||||
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() );
|
$sendback = remove_query_arg( array('trashed', 'untrashed', 'deleted', 'ids'), wp_get_referer() );
|
||||||
|
|
||||||
// Fix the problem with wrong page number. This happens when the user use the javascript
|
|
||||||
// pagination feature to navigate to a certain page, then does some bulk actions there,
|
|
||||||
// he will be redirected back to te original page number instead of the navigated one.
|
|
||||||
$sendback = add_query_arg( 'paged', $pagenum, $sendback );
|
$sendback = add_query_arg( 'paged', $pagenum, $sendback );
|
||||||
|
|
||||||
if ( strpos($sendback, 'post.php') !== false )
|
if ( strpos($sendback, 'post.php') !== false )
|
||||||
$sendback = admin_url($post_new_file);
|
$sendback = admin_url($post_new_file);
|
||||||
|
|
||||||
|
@ -133,8 +128,6 @@ if ( 'post' != $post_type ) {
|
||||||
|
|
||||||
$wp_list_table->prepare_items();
|
$wp_list_table->prepare_items();
|
||||||
|
|
||||||
// redirect to the last page if the page number is larger than the total number of pages
|
|
||||||
// this can happen when all the items in the last page are deleted, for example
|
|
||||||
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
|
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
|
||||||
if ( $pagenum > $total_pages && $total_pages > 0 ) {
|
if ( $pagenum > $total_pages && $total_pages > 0 ) {
|
||||||
wp_redirect( add_query_arg( 'paged', $total_pages ) );
|
wp_redirect( add_query_arg( 'paged', $total_pages ) );
|
||||||
|
|
Loading…
Reference in New Issue