Changeset 5624
- Timestamp:
- 06/01/2007 05:43:24 AM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/author-template.php
r5444 r5624 179 179 'optioncount' => false, 'exclude_admin' => true, 180 180 'show_fullname' => false, 'hide_empty' => true, 181 'feed' => '', 'feed_image' => '' 181 'feed' => '', 'feed_image' => '', 'echo' => true 182 182 ); 183 183 184 184 $r = wp_parse_args( $args, $defaults ); 185 185 extract($r); 186 186 187 $return = ''; 188 187 189 // TODO: Move select to get_authors(). 188 190 $authors = $wpdb->get_results("SELECT ID, user_nicename from $wpdb->users " . ($exclude_admin ? "WHERE user_login <> 'admin' " : '') . "ORDER BY display_name"); 189 191 190 192 $author_count = array(); 191 193 foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM $wpdb->posts WHERE post_status = 'publish' GROUP BY post_author") as $row) { … … 202 204 203 205 if ( !($posts == 0 && $hide_empty) ) 204 echo "<li>";206 $return .= '<li>'; 205 207 if ( $posts == 0 ) { 206 208 if ( !$hide_empty ) … … 241 243 242 244 if ( !($posts == 0 && $hide_empty) ) 243 echo "$link</li>"; 244 } 245 $return .= $link . '</li>'; 246 } 247 if ( !$echo ) 248 return $return; 249 echo $return; 245 250 } 246 251
Note: See TracChangeset
for help on using the changeset viewer.