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'] ) { check_admin_referer( 'edit-site' ); switch_to_blog( $id ); $allowedthemes = array(); if ( isset($_POST['theme']) && is_array( $_POST['theme'] ) ) { foreach ( $_POST['theme'] as $theme => $val ) { if ( 'on' == $val ) $allowedthemes[$theme] = true; } } update_option( 'allowedthemes', $allowedthemes ); restore_current_blog(); wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-themes.php') ); } if ( isset($_GET['update']) ) { $messages = array(); if ( 'updated' == $_GET['update'] ) $messages[] = __('Site users updated.'); } $title = sprintf( __('Edit Site: %s'), get_blogaddress_by_id($id)); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; require('../admin-header.php'); ?>
' . $msg . '