wp/wp-includes/author-template.php
changeset 18 be944660c56a
parent 16 a86126ab1dd4
child 19 3d72ae0968f4
equal deleted inserted replaced
17:34716fd837a4 18:be944660c56a
   403  *                                       Default is the value of get_default_feed().
   403  *                                       Default is the value of get_default_feed().
   404  *     @type bool         $echo          Whether to output the result or instead return it. Default true.
   404  *     @type bool         $echo          Whether to output the result or instead return it. Default true.
   405  *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
   405  *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
   406  *                                       will be separated by commas.
   406  *                                       will be separated by commas.
   407  *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
   407  *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
   408  *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
   408  *     @type int[]|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
   409  *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
   409  *     @type int[]|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
   410  * }
   410  * }
   411  * @return void|string Void if 'echo' argument is true, list of authors if 'echo' is false.
   411  * @return void|string Void if 'echo' argument is true, list of authors if 'echo' is false.
   412  */
   412  */
   413 function wp_list_authors( $args = '' ) {
   413 function wp_list_authors( $args = '' ) {
   414 	global $wpdb;
   414 	global $wpdb;
   472 			$return .= '<li>';
   472 			$return .= '<li>';
   473 		}
   473 		}
   474 
   474 
   475 		$link = sprintf(
   475 		$link = sprintf(
   476 			'<a href="%1$s" title="%2$s">%3$s</a>',
   476 			'<a href="%1$s" title="%2$s">%3$s</a>',
   477 			get_author_posts_url( $author->ID, $author->user_nicename ),
   477 			esc_url( get_author_posts_url( $author->ID, $author->user_nicename ) ),
   478 			/* translators: %s: Author's display name. */
   478 			/* translators: %s: Author's display name. */
   479 			esc_attr( sprintf( __( 'Posts by %s' ), $author->display_name ) ),
   479 			esc_attr( sprintf( __( 'Posts by %s' ), $author->display_name ) ),
   480 			$name
   480 			$name
   481 		);
   481 		);
   482 
   482