bulk-themes nonce for network/themes.php deletion. props PeteMall, see #15969.
git-svn-id: http://svn.automattic.com/wordpress/trunk@17126 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
7eab7be110
commit
c7677394b7
|
@ -69,17 +69,10 @@ if ( $action ) {
|
||||||
unset( $allowed_themes[ $theme ] );
|
unset( $allowed_themes[ $theme ] );
|
||||||
update_site_option( 'allowedthemes', $allowed_themes );
|
update_site_option( 'allowedthemes', $allowed_themes );
|
||||||
break;
|
break;
|
||||||
case 'delete':
|
|
||||||
check_admin_referer('delete-theme_' . $_GET['template']);
|
|
||||||
if ( !current_user_can('delete_themes') )
|
|
||||||
wp_die( __( 'Cheatin’ uh?' ) );
|
|
||||||
delete_theme($_GET['template']);
|
|
||||||
wp_redirect( network_admin_url('themes.php?deleted=true') );
|
|
||||||
exit;
|
|
||||||
break;
|
|
||||||
case 'delete-selected':
|
case 'delete-selected':
|
||||||
if ( ! current_user_can( 'delete_themes' ) )
|
if ( ! current_user_can( 'delete_themes' ) )
|
||||||
wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
|
wp_die( __('You do not have sufficient permissions to delete themes for this site.') );
|
||||||
|
check_admin_referer( 'bulk-themes' );
|
||||||
|
|
||||||
$themes = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array();
|
$themes = isset( $_REQUEST['checked'] ) ? (array) $_REQUEST['checked'] : array();
|
||||||
if ( empty( $themes ) ) {
|
if ( empty( $themes ) ) {
|
||||||
|
|
Loading…
Reference in New Issue