mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-18 04:25:07 +00:00
Don't process allowedthemes option when editing a site. Props wpmuguru. fixes #14120 for 3.0.1
git-svn-id: http://svn.automattic.com/wordpress/branches/3.0@15352 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
836a6249f7
commit
6d08804ef0
@ -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 ) );
|
||||
|
Loading…
x
Reference in New Issue
Block a user