diff --git a/wp-admin/network/site-info.php b/wp-admin/network/site-info.php index c05fc9d9d0..24ade8b2aa 100644 --- a/wp-admin/network/site-info.php +++ b/wp-admin/network/site-info.php @@ -47,6 +47,14 @@ if ( isset($_REQUEST['action']) && 'update-site' == $_REQUEST['action'] ) { // update blogs table $blog_data = stripslashes_deep( $_POST['blog'] ); + $existing_details = get_blog_details( $id, false ); + $blog_data_checkboxes = array( 'public', 'archived', 'spam', 'mature', 'deleted' ); + foreach ( $blog_data_checkboxes as $c ) { + if ( ! in_array( $existing_details->$c, array( 0, 1 ) ) ) + $blog_data[ $c ] = $existing_details->$c; + else + $blog_data[ $c ] = isset( $_POST['blog'][ $c ] ) ? 1 : 0; + } update_blog_details( $id, $blog_data ); do_action( 'wpmu_update_blog_options' ); @@ -114,29 +122,27 @@ if ( ! empty( $messages ) ) { - + __( 'Public' ) ); + $attribute_fields = array( 'public' => __( 'Public' ) ); if ( ! $is_main_site ) { - $radio_fields['archived'] = __( 'Archived' ); - $radio_fields['spam'] = _x( 'Spam', 'site' ); - $radio_fields['deleted'] = __( 'Deleted' ); + $attribute_fields['archived'] = __( 'Archived' ); + $attribute_fields['spam'] = _x( 'Spam', 'site' ); + $attribute_fields['deleted'] = __( 'Deleted' ); } - $radio_fields['mature'] = __( 'Mature' ); - foreach ( $radio_fields as $field_key => $field_label ) { + $attribute_fields['mature'] = __( 'Mature' ); ?> - + - $field_key, 1 ); ?> /> - - $field_key, 0 ); ?> /> - + $field_label ) : ?> +
+ -