Ticket #25958: local_history.patch
File local_history.patch, 1.1 KB (added by , 10 years ago) |
---|
-
src/wp-includes/class-wp-xmlrpc-server.php
478 478 $blogs = (array) get_blogs_of_user( $user->ID ); 479 479 $struct = array(); 480 480 481 $active_blog = get_active_blog_for_user( $user->ID ); 482 if ( is_null( $active_blog ) === false ) { 483 $primary_blog_id = (int) $active_blog->blog_id; 484 } else { 485 $primary_blog_id = false; 486 } 487 481 488 foreach ( $blogs as $blog ) { 482 489 // Don't include blogs that aren't hosted at this site 483 490 if ( $blog->site_id != get_current_site()->id ) … … 488 495 switch_to_blog( $blog_id ); 489 496 490 497 $is_admin = current_user_can( 'manage_options' ); 498 $is_primary = ( $primary_blog_id !== false && $blog_id == $primary_blog_id ) ? true : false; 491 499 492 500 $struct[] = array( 493 501 'isAdmin' => $is_admin, 502 'isPrimary' => $is_primary, 494 503 'url' => home_url( '/' ), 495 504 'blogid' => (string) $blog_id, 496 505 'blogName' => get_option( 'blogname' ),