Changeset 55444 for trunk/src/wp-includes/author-template.php
- Timestamp:
- 03/01/2023 03:37:06 PM (19 months ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/author-template.php
r55398 r55444 482 482 483 483 if ( ! is_array( $post_counts ) ) { 484 $post_counts = $wpdb->get_results( 484 $post_counts = array(); 485 $post_counts_query = $wpdb->get_results( 485 486 "SELECT DISTINCT post_author, COUNT(ID) AS count 486 487 FROM $wpdb->posts … … 489 490 ); 490 491 491 foreach ( (array) $post_counts as $row ) {492 foreach ( (array) $post_counts_query as $row ) { 492 493 $post_counts[ $row->post_author ] = $row->count; 493 494 }
Note: See TracChangeset
for help on using the changeset viewer.