Ticket #42315: 42315.2.diff
File 42315.2.diff, 2.1 KB (added by , 7 years ago) |
---|
-
src/wp-includes/admin-bar.php
222 222 223 223 if ( current_user_can( 'read' ) ) { 224 224 $profile_url = get_edit_profile_url( $user_id ); 225 } elseif ( is_multisite() ) {226 $profile_url = get_dashboard_url( $user_id, 'profile.php' );227 225 } else { 228 226 $profile_url = false; 229 227 } … … 263 261 264 262 if ( current_user_can( 'read' ) ) { 265 263 $profile_url = get_edit_profile_url( $user_id ); 266 } elseif ( is_multisite() ) {267 $profile_url = get_dashboard_url( $user_id, 'profile.php' );268 264 } else { 269 265 $profile_url = false; 270 266 } … … 465 461 $my_sites_url = admin_url( 'my-sites.php' ); 466 462 } 467 463 468 $wp_admin_bar->add_menu( 469 array( 470 'id' => 'my-sites', 471 'title' => __( 'My Sites' ), 472 'href' => $my_sites_url, 473 ) 474 ); 464 if ( current_user_can( 'read' ) ) { 465 $wp_admin_bar->add_menu( 466 array( 467 'id' => 'my-sites', 468 'title' => __( 'My Sites' ), 469 'href' => $my_sites_url, 470 ) 471 ); 472 } 475 473 476 474 if ( current_user_can( 'manage_network' ) ) { 477 475 $wp_admin_bar->add_group( … … 597 595 'href' => admin_url(), 598 596 ) 599 597 ); 600 } else {601 $wp_admin_bar->add_menu(602 array(603 'parent' => 'my-sites-list',604 'id' => $menu_id,605 'title' => $blavatar . $blogname,606 'href' => home_url(),607 )608 );609 598 } 610 599 611 600 if ( current_user_can( get_post_type_object( 'post' )->cap->create_posts ) ) { -
src/wp-login.php
996 996 if ( is_multisite() && ! get_active_blog_for_user( $user->ID ) && ! is_super_admin( $user->ID ) ) { 997 997 $redirect_to = user_admin_url(); 998 998 } elseif ( is_multisite() && ! $user->has_cap( 'read' ) ) { 999 $redirect_to = get_dashboard_url( $user->ID);999 $redirect_to = home_url(); 1000 1000 } elseif ( ! $user->has_cap( 'edit_posts' ) ) { 1001 1001 $redirect_to = $user->has_cap( 'read' ) ? admin_url( 'profile.php' ) : home_url(); 1002 1002 }