Changeset 10570
- Timestamp:
- 02/15/2009 09:06:24 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/author-template.php
r9590 r10570 443 443 * List all the authors of the blog, with several options available. 444 444 * 445 * optioncount (boolean) (false): Show the count in parenthesis next to the 446 * author's name. 447 * exclude_admin (boolean) (true): Exclude the 'admin' user that is installed by 448 * default. 449 * show_fullname (boolean) (false): Show their full names. 450 * hide_empty (boolean) (true): Don't show authors without any posts. 451 * feed (string) (''): If isn't empty, show links to author's feeds. 452 * feed_image (string) (''): If isn't empty, use this image to link to feeds. 453 * echo (boolean) (true): Set to false to return the output, instead of echoing. 445 * <ul> 446 * <li>optioncount (boolean) (false): Show the count in parenthesis next to the 447 * author's name.</li> 448 * <li>exclude_admin (boolean) (true): Exclude the 'admin' user that is 449 * installed bydefault.</li> 450 * <li>show_fullname (boolean) (false): Show their full names.</li> 451 * <li>hide_empty (boolean) (true): Don't show authors without any posts.</li> 452 * <li>feed (string) (''): If isn't empty, show links to author's feeds.</li> 453 * <li>feed_image (string) (''): If isn't empty, use this image to link to 454 * feeds.</li> 455 * <li>echo (boolean) (true): Set to false to return the output, instead of 456 * echoing.</li> 457 * <li>style (string) ('list'): Whether to display list of authors in list form 458 * or as a string.</li> 459 * <li>html (bool) (true): Whether to list the items in html for or plaintext. 460 * </li> 461 * </ul> 454 462 * 455 463 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors … … 464 472 'optioncount' => false, 'exclude_admin' => true, 465 473 'show_fullname' => false, 'hide_empty' => true, 466 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true 474 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 475 'style' => 'list', 'html' => true 467 476 ); 468 477 469 478 $r = wp_parse_args( $args, $defaults ); 470 479 extract($r, EXTR_SKIP); 471 472 480 $return = ''; 473 481 … … 488 496 $name = "$author->first_name $author->last_name"; 489 497 490 if ( !($posts == 0 && $hide_empty) ) 498 if( !$html ) { 499 if ( $posts == 0 ) { 500 if ( ! $hide_empty ) 501 $return .= $name . ', '; 502 } else 503 $return .= $name . ', '; 504 505 // No need to go further to process HTML. 506 continue; 507 } 508 509 if ( !($posts == 0 && $hide_empty) && 'list' == $style ) 491 510 $return .= '<li>'; 492 511 if ( $posts == 0 ) { 493 if ( ! $hide_empty )512 if ( ! $hide_empty ) 494 513 $link = $name; 495 514 } else { … … 527 546 } 528 547 529 if ( !($posts == 0 && $hide_empty) )548 if ( !($posts == 0 && $hide_empty) && 'list' == $style ) 530 549 $return .= $link . '</li>'; 550 else 551 $return .= $link . ', '; 531 552 } 532 if ( !$echo ) 553 554 $return = trim($return, ', '); 555 556 if ( ! $echo ) 533 557 return $return; 534 558 echo $return;
Note: See TracChangeset
for help on using the changeset viewer.