200 | | |
201 | | if ( $show_fullname && ($author->first_name != '' && $author->last_name != '') ) |
202 | | $name = "$author->first_name $author->last_name"; |
203 | | |
204 | | if ( !($posts == 0 && $hide_empty) ) |
205 | | echo "<li>"; |
206 | | if ( $posts == 0 ) { |
207 | | if ( !$hide_empty ) |
208 | | $link = $name; |
| 214 | |
| 215 | // Show their full name, and make sure first/last aren't blank |
| 216 | if ($show_fullname && (!empty($author->first_name) && !empty($author->last_name))) { |
| 217 | $name = $author->first_name . ' ' . $author->last_name; |
| 218 | } |
| 219 | |
| 220 | // Skip "empty" users when we don't want to show them |
| 221 | if ($hide_empty && $posts == 0) { |
| 222 | continue; |
| 223 | } |
| 224 | |
| 225 | $output .= "\t"; |
| 226 | |
| 227 | // Start out with different formats, depending on $format |
| 228 | switch ($format) { |
| 229 | case 'html': |
| 230 | $output .= '<li>'; |
| 231 | break; |
| 232 | } |
| 233 | |
| 234 | // Put the before stuff on |
| 235 | $output .= $before; |
| 236 | |
| 237 | // By now, we've skipped empty users if !$hide_empty |
| 238 | // so just put in their name in place of a link |
| 239 | if ($posts == 0) { |
| 240 | $output .= $name; |
| 241 | // Got posts, add on link |
210 | | $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), attribute_escape($author->display_name)) . '">' . $name . '</a>'; |
211 | | |
212 | | if ( (! empty($feed_image)) || (! empty($feed)) ) { |
213 | | $link .= ' '; |
214 | | if (empty($feed_image)) |
215 | | $link .= '('; |
216 | | $link .= '<a href="' . get_author_rss_link(0, $author->ID, $author->user_nicename) . '"'; |
217 | | |
218 | | if ( !empty($feed) ) { |
219 | | $title = ' title="' . $feed . '"'; |
220 | | $alt = ' alt="' . $feed . '"'; |
221 | | $name = $feed; |
222 | | $link .= $title; |
| 243 | // Add author's page link |
| 244 | $output .= '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" ' |
| 245 | . sprintf(__('Posts by %s'), attribute_escape($author->display_name)) . '">' . $name . '</a>'; |
| 246 | |
| 247 | // Either got a feed text or feed image |
| 248 | if (!empty($feed) || !empty($feed_image)) { |
| 249 | $output .= ' '; |
| 250 | |
| 251 | // If we're using text feed link |
| 252 | if (empty($feed_image)) { |
| 253 | $output .= '(<a href="' . get_author_rss_link(0, $author->ID, $author->user_nicename) . '" title="' . attribute_escape($feed) . '">' . $feed . '</a>)'; |
| 254 | // Okay, we're using an image link |
| 255 | } else { |
| 256 | $output .= '<a href="' . get_author_rss_link(0, $author->ID, $author->user_nicename) . '" title="' . attribute_escape($feed) . '"><img src="' . $feed_image . '" alt="' . $feed . '" title="' . $feed . '" /></a>'; |