nonce checks for site-themes. Props PeteMall. see

git-svn-id: http://svn.automattic.com/wordpress/trunk@17134 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
ryan 2010-12-24 17:59:58 +00:00
parent a60f2f3e82
commit 9e7327963f

@ -60,6 +60,7 @@ if ( $action ) {
switch ( $action ) { switch ( $action ) {
case 'enable': case 'enable':
check_admin_referer( 'enable-theme_' . $_GET['theme'] );
$theme = $_GET['theme']; $theme = $_GET['theme'];
$update = 'enabled'; $update = 'enabled';
if ( !$allowed_themes ) if ( !$allowed_themes )
@ -68,6 +69,7 @@ if ( $action ) {
$allowed_themes[$theme] = true; $allowed_themes[$theme] = true;
break; break;
case 'disable': case 'disable':
check_admin_referer( 'disable-theme_' . $_GET['theme'] );
$theme = $_GET['theme']; $theme = $_GET['theme'];
$update = 'disabled'; $update = 'disabled';
if ( !$allowed_themes ) if ( !$allowed_themes )
@ -76,6 +78,7 @@ if ( $action ) {
unset( $allowed_themes[$theme] ); unset( $allowed_themes[$theme] );
break; break;
case 'enable-selected': case 'enable-selected':
check_admin_referer( 'bulk-themes' );
if ( isset( $_POST['checked'] ) ) { if ( isset( $_POST['checked'] ) ) {
$update = 'enable'; $update = 'enable';
$themes = (array) $_POST['checked']; $themes = (array) $_POST['checked'];
@ -86,6 +89,7 @@ if ( $action ) {
} }
break; break;
case 'disable-selected': case 'disable-selected':
check_admin_referer( 'bulk-themes' );
if ( isset( $_POST['checked'] ) ) { if ( isset( $_POST['checked'] ) ) {
$update = 'disable'; $update = 'disable';
$themes = (array) $_POST['checked']; $themes = (array) $_POST['checked'];