mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-07-01 07:40:07 +00:00
Media: Ensure that post_id variable is initiated ahead of usage.
This prevents warnings when using custom bulk actions in the media library. Props gitlost, achbed, Boniu91, wpgurudev, hellofromTonya. Fixes #39589. git-svn-id: https://develop.svn.wordpress.org/trunk@51111 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -119,6 +119,7 @@ $doaction = $wp_list_table->current_action();
|
||||
|
||||
if ( $doaction ) {
|
||||
check_admin_referer( 'bulk-media' );
|
||||
$post_ids = array();
|
||||
|
||||
if ( 'delete_all' === $doaction ) {
|
||||
$post_ids = $wpdb->get_col( "SELECT ID FROM $wpdb->posts WHERE post_type='attachment' AND post_status = 'trash'" );
|
||||
|
||||
Reference in New Issue
Block a user