WordPress.org

Make WordPress Core

Ticket #20671: 20671.diff

File 20671.diff, 738 bytes (added by kobenland, 3 years ago)

Not sure if passing of the entire $_POST variable is a good idea, but we need 'action', 'checked' and the nonce (at least)

  • wp-admin/network/themes.php

     
    179179                        } // Endif verify-delete 
    180180 
    181181                        foreach ( $themes as $theme ) 
    182                                 $delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) ); 
     182                                $delete_result = delete_theme( $theme, esc_url( add_query_arg( array_merge( $_POST, array( 'verify-delete' => 1 ) ), $_SERVER['REQUEST_URI'] ) ) ); 
    183183                        $paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1; 
    184184                        wp_redirect( network_admin_url( "themes.php?deleted=".count( $themes )."&paged=$paged&s=$s" ) ); 
    185185                        exit;