rebase code on oct-10-2023
This commit is contained in:
@@ -1071,15 +1071,12 @@ class WP_User_Query {
|
||||
if ( isset( $args['blog_id'] ) ) {
|
||||
$blog_id = absint( $args['blog_id'] );
|
||||
}
|
||||
|
||||
if ( $args['has_published_posts'] || in_array( 'post_count', $ordersby, true ) ) {
|
||||
$switch = $blog_id && get_current_blog_id() !== $blog_id;
|
||||
if ( ( $args['has_published_posts'] && $blog_id ) || in_array( 'post_count', $ordersby, true ) ) {
|
||||
$switch = get_current_blog_id() !== $blog_id;
|
||||
if ( $switch ) {
|
||||
switch_to_blog( $blog_id );
|
||||
}
|
||||
|
||||
$last_changed .= wp_cache_get_last_changed( 'posts' );
|
||||
|
||||
if ( $switch ) {
|
||||
restore_current_blog();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user