diff --git a/wp-includes/user.php b/wp-includes/user.php index 481aba1a56..c5f20f7d5f 100644 --- a/wp-includes/user.php +++ b/wp-includes/user.php @@ -699,8 +699,7 @@ function count_many_users_posts( $users, $post_type = 'post', $public_only = fal $count = wp_cache_get_salted( $cache_key, 'post-queries', $cache_salts ); if ( false === $count ) { - $where = get_posts_by_author_sql( $post_type, true, null, $public_only ); - $result = $wpdb->get_results( "SELECT post_author, COUNT(*) FROM $wpdb->posts $where AND post_author IN ($userlist) GROUP BY post_author", ARRAY_N ); + $result = $wpdb->get_results( $query, ARRAY_N ); $count = array_fill_keys( $users, 0 ); foreach ( $result as $row ) { diff --git a/wp-includes/version.php b/wp-includes/version.php index fe05c6c41a..06ef479e43 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -16,7 +16,7 @@ * * @global string $wp_version */ -$wp_version = '6.9-alpha-60980'; +$wp_version = '6.9-alpha-60981'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.