Skip to content

Commit 8630a51

Browse files
Code Quality: Remove redundant variable assignment in wp_list_authors().
There is no need to initialize `$post_counts` as an empty array, since it will be overwritten directly by the filter value in the next line. Follow-up to [54262]. Props Soean. See #64238. git-svn-id: https://develop.svn.wordpress.org/trunk@62091 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 77850fb commit 8630a51

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

src/wp-includes/author-template.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -489,8 +489,7 @@ function wp_list_authors( $args = '' ) {
489489
*/
490490
$query_args = apply_filters( 'wp_list_authors_args', $query_args, $parsed_args );
491491

492-
$authors = get_users( $query_args );
493-
$post_counts = array();
492+
$authors = get_users( $query_args );
494493

495494
/**
496495
* Filters whether to short-circuit performing the query for author post counts.

0 commit comments

Comments
 (0)