site_id != $wpdb->siteid ) wp_die( __( 'You do not have permission to access this page.' ) ); $is_main_site = is_main_site( $id ); if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] && is_array( $_POST['option'] ) ) { check_admin_referer( 'edit-site' ); switch_to_blog( $id ); $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 ) || 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 ) ); else update_option( $key, stripslashes( $val ), false ); // no need to refresh blog details yet $c++; } restore_current_blog(); wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-options.php') ); } if ( isset($_GET['update']) ) { $messages = array(); if ( 'updated' == $_GET['update'] ) $messages[] = __('Site options updated.'); } $title = sprintf( __('Edit Site: %s'), get_blogaddress_by_id($id)); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; require('../admin-header.php'); ?>
' . $msg . '