mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-01 21:21:24 +01:00
Check bulk-themes nonce before bulk delete. fixes #15922
git-svn-id: http://svn.automattic.com/wordpress/trunk@17121 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
56584f6801
commit
602c7e4762
@ -85,7 +85,7 @@ if ( $action ) {
|
|||||||
|
|
||||||
$main_theme = get_current_theme();
|
$main_theme = get_current_theme();
|
||||||
$files_to_delete = $theme_info = array();
|
$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' );
|
$data = get_theme_data( WP_CONTENT_DIR . '/themes/' . $theme . '/style.css' );
|
||||||
if ( $data['Name'] == $main_theme ) {
|
if ( $data['Name'] == $main_theme ) {
|
||||||
unset( $themes[$key] );
|
unset( $themes[$key] );
|
||||||
@ -148,8 +148,9 @@ if ( $action ) {
|
|||||||
<?php
|
<?php
|
||||||
require_once(ABSPATH . 'wp-admin/admin-footer.php');
|
require_once(ABSPATH . 'wp-admin/admin-footer.php');
|
||||||
exit;
|
exit;
|
||||||
} //Endif verify-delete
|
} // Endif verify-delete
|
||||||
foreach( $themes as $theme )
|
check_admin_referer('bulk-themes');
|
||||||
|
foreach ( $themes as $theme )
|
||||||
$delete_result = delete_theme( $theme );
|
$delete_result = delete_theme( $theme );
|
||||||
wp_redirect( network_admin_url( 'themes.php?deleted=true' ) );
|
wp_redirect( network_admin_url( 'themes.php?deleted=true' ) );
|
||||||
exit;
|
exit;
|
||||||
|
Loading…
Reference in New Issue
Block a user