Ticket #10042: 10042.diff
| File 10042.diff, 1.6 KB (added by michaelh, 4 years ago) |
|---|
-
wp-includes/author-template.php
270 270 271 271 $author = get_userdata( $author->ID ); 272 272 $posts = (isset($author_count[$author->ID])) ? $author_count[$author->ID] : 0; 273 $name = $author->display_name;274 273 274 if ( $posts == 0 && $hide_empty ) { 275 // No need to go any further. 276 continue; 277 } 278 279 $name = $author->display_name; 275 280 if ( $show_fullname && ($author->first_name != '' && $author->last_name != '') ) 276 281 $name = "$author->first_name $author->last_name"; 277 282 278 283 if( !$html ) { 279 if ( $posts == 0 ) { 280 if ( ! $hide_empty ) 281 $return .= $name . ', '; 282 } else 283 $return .= $name . ', '; 284 285 // No need to go further to process HTML. 284 $return .= $name . ', '; 285 // No need to go further to process not HTML. 286 286 continue; 287 287 } 288 289 if ( !($posts == 0 && $hide_empty) &&'list' == $style )288 289 if ( 'list' == $style ) 290 290 $return .= '<li>'; 291 291 if ( $posts == 0 ) { 292 if ( ! $hide_empty ) 293 $link = $name; 292 $link = $name; 294 293 } else { 295 294 $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . sprintf(__("Posts by %s"), esc_attr($author->display_name)) . '">' . $name . '</a>'; 296 295 … … 325 324 326 325 } 327 326 328 if ( !($posts == 0 && $hide_empty) &&'list' == $style )327 if ( 'list' == $style ) 329 328 $return .= $link . '</li>'; 330 else if ( ! $hide_empty )329 else 331 330 $return .= $link . ', '; 332 } 331 } 333 332 334 333 $return = trim($return, ', '); 335 334