wp/wp-admin/my-sites.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
    25 if ( 'updateblogsettings' === $action && isset( $_POST['primary_blog'] ) ) {
    25 if ( 'updateblogsettings' === $action && isset( $_POST['primary_blog'] ) ) {
    26 	check_admin_referer( 'update-my-sites' );
    26 	check_admin_referer( 'update-my-sites' );
    27 
    27 
    28 	$blog = get_site( (int) $_POST['primary_blog'] );
    28 	$blog = get_site( (int) $_POST['primary_blog'] );
    29 	if ( $blog && isset( $blog->domain ) ) {
    29 	if ( $blog && isset( $blog->domain ) ) {
    30 		update_user_option( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'], true );
    30 		update_user_meta( $current_user->ID, 'primary_blog', (int) $_POST['primary_blog'] );
    31 		$updated = true;
    31 		$updated = true;
    32 	} else {
    32 	} else {
    33 		wp_die( __( 'The primary site you chose does not exist.' ) );
    33 		wp_die( __( 'The primary site you chose does not exist.' ) );
    34 	}
    34 	}
    35 }
    35 }