Changeset 31653 for trunk/src/wp-includes/author-template.php
- Timestamp:
- 03/07/2015 01:14:31 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/author-template.php
r31168 r31653 338 338 339 339 $author_count = array(); 340 foreach ( (array) $wpdb->get_results( "SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_type = 'post' AND" . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author" ) as $row ) {340 foreach ( (array) $wpdb->get_results( "SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE " . get_private_posts_cap_sql( 'post' ) . " GROUP BY post_author" ) as $row ) { 341 341 $author_count[$row->post_author] = $row->count; 342 342 }
Note: See TracChangeset
for help on using the changeset viewer.