Make WordPress Core

Ticket #39199: 39199.diff

File 39199.diff, 1.2 KB (added by flixos90, 7 years ago)
  • src/wp-admin/includes/dashboard.php

     
    487487                $post = get_default_post_to_edit( 'post' , true);
    488488                $user_id = get_current_user_id();
    489489                // Don't create an option if this is a super admin who does not belong to this site.
    490                 if ( ! ( is_super_admin( $user_id ) && ! in_array( get_current_blog_id(), array_keys( get_blogs_of_user( $user_id ) ) ) ) )
     490                if ( is_user_member_of_blog( $user_id ) ) {
    491491                        update_user_option( $user_id, 'dashboard_quick_press_last_post_id', (int) $post->ID ); // Save post_ID
     492                }
    492493        }
    493494
    494495        $post_ID = (int) $post->ID;
  • src/wp-includes/option.php

     
    808808                return;
    809809        }
    810810
    811         if ( is_super_admin() && ! is_user_member_of_blog() ) {
     811        if ( ! is_user_member_of_blog() ) {
    812812                return;
    813813        }
    814814
     
    972972                return false;
    973973        }
    974974
    975         if ( is_super_admin() && ! is_user_member_of_blog() ) {
     975        if ( ! is_user_member_of_blog() ) {
    976976                return;
    977977        }
    978978