Make WordPress Core

Ticket #19127: 19127.diff

File 19127.diff, 1.9 KB (added by nacin, 12 years ago)
  • wp-includes/ms-functions.php

     
    991991        add_option( 'WPLANG', get_site_option( 'WPLANG' ) );
    992992        update_option( 'blog_public', (int)$meta['public'] );
    993993
    994         if ( !is_super_admin() && ! get_user_meta( $user_id, 'primary_blog', true ) )
    995                 update_user_meta( $user_id, 'primary_blog', $blog_id );
     994        if ( ! is_super_admin( $user_id ) ) {
     995                if ( ! get_user_meta( $user_id, 'primary_blog', true ) )
     996                        update_user_meta( $user_id, 'primary_blog', $blog_id );
     997                if ( ! metadata_exists( 'user', $user_id, 'show_welcome_panel' ) )
     998                        update_user_meta( $user_id, 'show_welcome_panel', 1 );
     999        }
    9961000
    9971001        restore_current_blog();
    9981002        do_action( 'wpmu_new_blog', $blog_id, $user_id, $domain, $path, $site_id, $meta );
  • wp-admin/admin-ajax.php

     
    10671067        if ( ! current_user_can( 'edit_theme_options' ) )
    10681068                die('-1');
    10691069
    1070         if ( empty( $_POST['visible'] ) )
    1071                 delete_user_option( get_current_user_id(), 'show_welcome_panel' );
    1072         else
    1073                 update_user_option( get_current_user_id(), 'show_welcome_panel', 1 );
     1070        update_user_meta( get_current_user_id(), 'show_welcome_panel', empty( $_POST['visible'] ) ? 0 : 1 );
    10741071
    10751072        die('1');
    10761073        break;
  • wp-admin/includes/upgrade.php

     
    7777                $message =  __('User already exists. Password inherited.');
    7878        }
    7979
     80        if ( $user_id )
     81                update_user_meta( $user_id, 'show_welcome_panel', 1 );
     82
    8083        $user = new WP_User($user_id);
    8184        $user->set_role('administrator');
    8285