Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fix redirects for trashed post bulk ops. Props nacin, SergeyBiryukov.…

… fixes #16355

git-svn-id: http://svn.automattic.com/wordpress/trunk@17362 1a063a9b-81f0-0310-95a4-ce76da25c4cd
  • Loading branch information...
commit 75641ee14abe9212b0f7f84aa4084060607acc2d 1 parent b345e99
ryan authored
Showing with 14 additions and 11 deletions.
  1. +14 −11 wp-admin/edit.php
View
25 wp-admin/edit.php
@@ -35,6 +35,16 @@
}
unset( $_redirect );
+if ( 'post' != $post_type ) {
+ $parent_file = "edit.php?post_type=$post_type";
+ $submenu_file = "edit.php?post_type=$post_type";
+ $post_new_file = "post-new.php?post_type=$post_type";
+} else {
+ $parent_file = 'edit.php';
+ $submenu_file = 'edit.php';
+ $post_new_file = 'post-new.php';
+}
+
$doaction = $wp_list_table->current_action();
if ( $doaction ) {
@@ -59,7 +69,7 @@
}
if ( !isset( $post_ids ) ) {
- wp_redirect( admin_url("edit.php?post_type=$post_type") );
+ wp_redirect( $sendback );
exit;
}
@@ -130,16 +140,6 @@
exit;
}
-if ( 'post' != $post_type ) {
- $parent_file = "edit.php?post_type=$post_type";
- $submenu_file = "edit.php?post_type=$post_type";
- $post_new_file = "post-new.php?post_type=$post_type";
-} else {
- $parent_file = 'edit.php';
- $submenu_file = 'edit.php';
- $post_new_file = 'post-new.php';
-}
-
$wp_list_table->prepare_items();
$total_pages = $wp_list_table->get_pagination_arg( 'total_pages' );
@@ -246,6 +246,9 @@
<input type="hidden" name="post_status" class="post_status_page" value="<?php echo !empty($_REQUEST['post_status']) ? esc_attr($_REQUEST['post_status']) : 'all'; ?>" />
<input type="hidden" name="post_type" class="post_type_page" value="<?php echo $post_type; ?>" />
+<?php if ( ! empty( $_REQUEST['show_sticky'] ) ) { ?>
+<input type="hidden" name="show_sticky" value="1" />
+<?php } ?>
<?php $wp_list_table->display(); ?>
Please sign in to comment.
Something went wrong with that request. Please try again.