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 ); if ( isset( $_POST['update_home_url'] ) && $_POST['update_home_url'] == 'update' ) { $blog_address = get_blogaddress_by_domain( $_POST['blog']['domain'], $_POST['blog']['path'] ); if ( get_option( 'siteurl' ) != $blog_address ) update_option( 'siteurl', $blog_address ); if ( get_option( 'home' ) != $blog_address ) update_option( 'home', $blog_address ); } // rewrite rules can't be flushed during switch to blog delete_option( 'rewrite_rules' ); // update blogs table $blog_data = stripslashes_deep( $_POST['blog'] ); update_blog_details( $id, $blog_data ); do_action( 'wpmu_update_blog_options' ); restore_current_blog(); wp_redirect( add_query_arg( array( 'update' => 'updated', 'id' => $id ), 'site-info.php') ); } if ( isset($_GET['update']) ) { $messages = array(); if ( 'updated' == $_GET['update'] ) $messages[] = __('Site info updated.'); } $title = sprintf( __('Edit Site: %s'), get_blogaddress_by_id($id)); $parent_file = 'sites.php'; $submenu_file = 'sites.php'; require('../admin-header.php'); ?>
' . $msg . '