Skip to content
Snippets Groups Projects
Commit 96054d30 authored by Erick Hitter's avatar Erick Hitter
Browse files

Improve reliability of `post_status` capture

parent e5d2eb4b
No related branches found
No related tags found
No related merge requests found
......@@ -93,8 +93,6 @@ class Main {
if ( isset( $_REQUEST['delete_all'] ) || isset( $_REQUEST['delete_all2'] ) ) {
$vars->action = 'delete_all';
$vars->post_status = $_REQUEST['post_status'];
} elseif ( isset( $_REQUEST['action'] ) && '-1' !== $_REQUEST['action'] ) {
$vars->action = $_REQUEST['action'];
} elseif ( isset( $_REQUEST['action2'] ) && '-1' !== $_REQUEST['action2'] ) {
......@@ -137,6 +135,11 @@ class Main {
$vars->post_format = $_REQUEST['post_format'];
}
// Post status is special.
if ( is_null( $vars->post_status ) && isset( $_REQUEST['post_status'] ) && ! empty( $_REQUEST['post_status'] ) ) {
$vars->post_status = $_REQUEST['post_status'];
}
return $vars;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment