From 6b43ce92e6f6e0f908417a9b8a86854dc972dee9 Mon Sep 17 00:00:00 2001 From: Ryan Boren Date: Tue, 29 Jun 2010 14:33:34 +0000 Subject: [PATCH] Don't process allowedthemes option when editing a site. Props wpmuguru. fixes #14120 for 3.0.1 git-svn-id: https://develop.svn.wordpress.org/branches/3.0@15352 602fd350-edb4-49c9-b593-d223f7449a82 --- wp-admin/ms-edit.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/wp-admin/ms-edit.php b/wp-admin/ms-edit.php index f307445cc..d826e0df4 100644 --- a/wp-admin/ms-edit.php +++ b/wp-admin/ms-edit.php @@ -226,8 +226,9 @@ if ( is_array( $_POST['option'] ) ) { $c = 1; $count = count( $_POST['option'] ); + $skip_options = array( 'allowedthemes' ); // Don't update these options since they are handled elsewhere in the form. foreach ( (array) $_POST['option'] as $key => $val ) { - if ( $key === 0 || is_array( $val ) ) + if ( $key === 0 || is_array( $val ) || in_array($key, $skip_options) ) continue; // Avoids "0 is a protected WP option and may not be modified" error when edit blog options if ( $c == $count ) update_option( $key, stripslashes( $val ) );