mirror of
git://develop.git.wordpress.org/
synced 2025-03-22 21:09:51 +01:00
Quick/Bulk Edit: Ensure that $post_ids
variable is initialized ahead of usage.
This brings some consistency between similar fragments of `wp-admin/edit.php` and `wp-admin/upload.php`. Follow-up to [51111], [51161]. See #39589, #53411. git-svn-id: https://develop.svn.wordpress.org/trunk@51163 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
7abc29aafc
commit
47c9387402
@ -80,6 +80,8 @@ if ( $doaction ) {
|
||||
$sendback = admin_url( $post_new_file );
|
||||
}
|
||||
|
||||
$post_ids = array();
|
||||
|
||||
if ( 'delete_all' === $doaction ) {
|
||||
// Prepare for deletion of all posts with a specified post status (i.e. Empty Trash).
|
||||
$post_status = preg_replace( '/[^a-z0-9_-]+/i', '', $_REQUEST['post_status'] );
|
||||
@ -96,7 +98,7 @@ if ( $doaction ) {
|
||||
$post_ids = array_map( 'intval', $_REQUEST['post'] );
|
||||
}
|
||||
|
||||
if ( ! isset( $post_ids ) ) {
|
||||
if ( empty( $post_ids ) ) {
|
||||
wp_redirect( $sendback );
|
||||
exit;
|
||||
}
|
||||
|
@ -119,6 +119,7 @@ $doaction = $wp_list_table->current_action();
|
||||
|
||||
if ( $doaction ) {
|
||||
check_admin_referer( 'bulk-media' );
|
||||
|
||||
$post_ids = array();
|
||||
|
||||
if ( 'delete_all' === $doaction ) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user