Skip to content

Commit

Permalink
Don't process allowedthemes option when editing a site. Props wpmugur…
Browse files Browse the repository at this point in the history
…u. fixes #14120 for 3.0.1

git-svn-id: https://develop.svn.wordpress.org/branches/3.0@15352 602fd350-edb4-49c9-b593-d223f7449a82
  • Loading branch information
ryanboren committed Jun 29, 2010
1 parent e39630b commit 6b43ce9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion wp-admin/ms-edit.php
Expand Up @@ -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 ) );
Expand Down

0 comments on commit 6b43ce9

Please sign in to comment.