Don't process allowedthemes option when editing a site. Props wpmuguru. fixes #14120

git-svn-id: https://develop.svn.wordpress.org/trunk@15351 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2010-06-29 14:32:49 +00:00
parent 44a502207a
commit 9fe4a697cf
1 changed files with 2 additions and 1 deletions

View File

@ -226,8 +226,9 @@ switch ( $_GET['action'] ) {
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 ) );