diff --git a/wp-includes/author-template.php b/wp-includes/author-template.php index 3f49f93d14..4c4ea32ffb 100644 --- a/wp-includes/author-template.php +++ b/wp-includes/author-template.php @@ -442,15 +442,15 @@ function wp_list_authors( $args = '' ) { $author_count[ $row->post_author ] = $row->count; } foreach ( $authors as $author_id ) { - $author = get_userdata( $author_id ); + $posts = isset( $author_count[ $author_id ] ) ? $author_count[ $author_id ] : 0; - if ( $args['exclude_admin'] && 'admin' == $author->display_name ) { + if ( ! $posts && $args['hide_empty'] ) { continue; } - $posts = isset( $author_count[ $author->ID ] ) ? $author_count[ $author->ID ] : 0; + $author = get_userdata( $author_id ); - if ( ! $posts && $args['hide_empty'] ) { + if ( $args['exclude_admin'] && 'admin' === $author->display_name ) { continue; } diff --git a/wp-includes/version.php b/wp-includes/version.php index 097304dcf5..e281432668 100644 --- a/wp-includes/version.php +++ b/wp-includes/version.php @@ -13,7 +13,7 @@ * * @global string $wp_version */ -$wp_version = '5.2-beta3-45234'; +$wp_version = '5.2-beta3-45235'; /** * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.