Check bulk-themes nonce before bulk delete. fixes #15922
git-svn-id: https://develop.svn.wordpress.org/trunk@17121 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
parent
64e7465e1c
commit
a0b579b5e4
@ -85,7 +85,7 @@ if ( $action ) {
|
||||
|
||||
$main_theme = get_current_theme();
|
||||
$files_to_delete = $theme_info = array();
|
||||
foreach( $themes as $key => $theme ) {
|
||||
foreach ( $themes as $key => $theme ) {
|
||||
$data = get_theme_data( WP_CONTENT_DIR . '/themes/' . $theme . '/style.css' );
|
||||
if ( $data['Name'] == $main_theme ) {
|
||||
unset( $themes[$key] );
|
||||
@ -148,8 +148,9 @@ if ( $action ) {
|
||||
<?php
|
||||
require_once(ABSPATH . 'wp-admin/admin-footer.php');
|
||||
exit;
|
||||
} //Endif verify-delete
|
||||
foreach( $themes as $theme )
|
||||
} // Endif verify-delete
|
||||
check_admin_referer('bulk-themes');
|
||||
foreach ( $themes as $theme )
|
||||
$delete_result = delete_theme( $theme );
|
||||
wp_redirect( network_admin_url( 'themes.php?deleted=true' ) );
|
||||
exit;
|
||||
|
Loading…
Reference in New Issue
Block a user