diff --git a/wp-admin/edit.php b/wp-admin/edit.php index 5c7b194dc..39424ac92 100644 --- a/wp-admin/edit.php +++ b/wp-admin/edit.php @@ -35,6 +35,16 @@ foreach ( array( 'p', 'attachment_id', 'page_id' ) as $_redirect ) { } 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 ( $doaction ) { } if ( !isset( $post_ids ) ) { - wp_redirect( admin_url("edit.php?post_type=$post_type") ); + wp_redirect( $sendback ); exit; } @@ -130,16 +140,6 @@ if ( $doaction ) { 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 @@ $_SERVER['REQUEST_URI'] = remove_query_arg( array('locked', 'skipped', 'updated' + + + display(); ?>