Fix Bulk Theme Deletion in the Network Admin when using FTP. Props kobenland. Fixes #20671

git-svn-id: https://develop.svn.wordpress.org/trunk@22084 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Dion Hulse 2012-09-29 01:36:14 +00:00
parent 6312ae8e06
commit 7b00e4b156
1 changed files with 14 additions and 3 deletions

View File

@ -176,10 +176,21 @@ if ( $action ) {
exit;
} // Endif verify-delete
foreach ( $themes as $theme )
$delete_result = delete_theme( $theme, esc_url( add_query_arg( array('verify-delete' => 1), $_SERVER['REQUEST_URI'] ) ) );
foreach ( $themes as $theme ) {
$delete_result = delete_theme( $theme, esc_url( add_query_arg( array(
'verify-delete' => 1,
'action' => 'delete-selected',
'checked' => $_REQUEST['checked'],
'_wpnonce' => $_REQUEST['_wpnonce']
), network_admin_url( 'themes.php' ) ) ) );
}
$paged = ( $_REQUEST['paged'] ) ? $_REQUEST['paged'] : 1;
wp_redirect( network_admin_url( "themes.php?deleted=".count( $themes )."&paged=$paged&s=$s" ) );
wp_redirect( add_query_arg( array(
'deleted' => count( $themes ),
'paged' => $paged,
's' => $s
), network_admin_url( 'themes.php' ) ) );
exit;
break;
}