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

git-svn-id: http://core.svn.wordpress.org/trunk@22084 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
Dion Hulse 2012-09-29 01:36:14 +00:00
parent 298b6b269f
commit 434aef8e89
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;
}