wp_list_authors

The timeline below displays how wordpress function wp_list_authors has changed across different WordPress versions. If a version is not listed, refer to the next available version below.

WordPress Version: 6.2

/**
 * Lists all the authors of the site, with several options available.
 *
 * @link https://developer.wordpress.org/reference/functions/wp_list_authors/
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to. Possible values include 'rss2', 'atom'.
 *                                       Default is the value of get_default_feed().
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type int[]|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type int[]|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return void|string Void if 'echo' argument is true, list of authors if 'echo' is false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $parsed_args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($parsed_args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    /**
     * Filters the query arguments for the list of all authors of the site.
     *
     * @since 6.1.0
     *
     * @param array $query_args  The query arguments for get_users().
     * @param array $parsed_args The arguments passed to wp_list_authors() combined with the defaults.
     */
    $query_args = apply_filters('wp_list_authors_args', $query_args, $parsed_args);
    $authors = get_users($query_args);
    $post_counts = array();
    /**
     * Filters whether to short-circuit performing the query for author post counts.
     *
     * @since 6.1.0
     *
     * @param int[]|false $post_counts Array of post counts, keyed by author ID.
     * @param array       $parsed_args The arguments passed to wp_list_authors() combined with the defaults.
     */
    $post_counts = apply_filters('pre_wp_list_authors_post_counts_query', false, $parsed_args);
    if (!is_array($post_counts)) {
        $post_counts = array();
        $post_counts_query = $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count\n\t\t\tFROM {$wpdb->posts}\n\t\t\tWHERE " . get_private_posts_cap_sql('post') . '
			GROUP BY post_author');
        foreach ((array) $post_counts_query as $row) {
            $post_counts[$row->post_author] = $row->count;
        }
    }
    foreach ($authors as $author_id) {
        $posts = isset($post_counts[$author_id]) ? $post_counts[$author_id] : 0;
        if (!$posts && $parsed_args['hide_empty']) {
            continue;
        }
        $author = get_userdata($author_id);
        if ($parsed_args['exclude_admin'] && 'admin' === $author->display_name) {
            continue;
        }
        if ($parsed_args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = sprintf(
                /* translators: 1: User's first name, 2: Last name. */
                _x('%1$s %2$s', 'Display name based on first name and last name'),
                $author->first_name,
                $author->last_name
            );
        } else {
            $name = $author->display_name;
        }
        if (!$parsed_args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' === $parsed_args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            esc_url(get_author_posts_url($author->ID, $author->user_nicename)),
            /* translators: %s: Author's display name. */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($parsed_args['feed_image']) || !empty($parsed_args['feed'])) {
            $link .= ' ';
            if (empty($parsed_args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $parsed_args['feed_type']) . '"';
            $alt = '';
            if (!empty($parsed_args['feed'])) {
                $alt = ' alt="' . esc_attr($parsed_args['feed']) . '"';
                $name = $parsed_args['feed'];
            }
            $link .= '>';
            if (!empty($parsed_args['feed_image'])) {
                $link .= '<img src="' . esc_url($parsed_args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($parsed_args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($parsed_args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' === $parsed_args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if ($parsed_args['echo']) {
        echo $return;
    } else {
        return $return;
    }
}

WordPress Version: 6.1

/**
 * Lists all the authors of the site, with several options available.
 *
 * @link https://developer.wordpress.org/reference/functions/wp_list_authors/
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to. Possible values include 'rss2', 'atom'.
 *                                       Default is the value of get_default_feed().
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type int[]|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type int[]|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return void|string Void if 'echo' argument is true, list of authors if 'echo' is false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $parsed_args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($parsed_args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    /**
     * Filters the query arguments for the list of all authors of the site.
     *
     * @since 6.1.0
     *
     * @param array $query_args  The query arguments for get_users().
     * @param array $parsed_args The arguments passed to wp_list_authors() combined with the defaults.
     */
    $query_args = apply_filters('wp_list_authors_args', $query_args, $parsed_args);
    $authors = get_users($query_args);
    $post_counts = array();
    /**
     * Filters whether to short-circuit performing the query for author post counts.
     *
     * @since 6.1.0
     *
     * @param int[]|false $post_counts Array of post counts, keyed by author ID.
     * @param array       $parsed_args The arguments passed to wp_list_authors() combined with the defaults.
     */
    $post_counts = apply_filters('pre_wp_list_authors_post_counts_query', false, $parsed_args);
    if (!is_array($post_counts)) {
        $post_counts = $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count\n\t\t\tFROM {$wpdb->posts}\n\t\t\tWHERE " . get_private_posts_cap_sql('post') . '
			GROUP BY post_author');
        foreach ((array) $post_counts as $row) {
            $post_counts[$row->post_author] = $row->count;
        }
    }
    foreach ($authors as $author_id) {
        $posts = isset($post_counts[$author_id]) ? $post_counts[$author_id] : 0;
        if (!$posts && $parsed_args['hide_empty']) {
            continue;
        }
        $author = get_userdata($author_id);
        if ($parsed_args['exclude_admin'] && 'admin' === $author->display_name) {
            continue;
        }
        if ($parsed_args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = sprintf(
                /* translators: 1: User's first name, 2: Last name. */
                _x('%1$s %2$s', 'Display name based on first name and last name'),
                $author->first_name,
                $author->last_name
            );
        } else {
            $name = $author->display_name;
        }
        if (!$parsed_args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' === $parsed_args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            esc_url(get_author_posts_url($author->ID, $author->user_nicename)),
            /* translators: %s: Author's display name. */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($parsed_args['feed_image']) || !empty($parsed_args['feed'])) {
            $link .= ' ';
            if (empty($parsed_args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $parsed_args['feed_type']) . '"';
            $alt = '';
            if (!empty($parsed_args['feed'])) {
                $alt = ' alt="' . esc_attr($parsed_args['feed']) . '"';
                $name = $parsed_args['feed'];
            }
            $link .= '>';
            if (!empty($parsed_args['feed_image'])) {
                $link .= '<img src="' . esc_url($parsed_args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($parsed_args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($parsed_args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' === $parsed_args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if ($parsed_args['echo']) {
        echo $return;
    } else {
        return $return;
    }
}

WordPress Version: 5.8

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://developer.wordpress.org/reference/functions/wp_list_authors/
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to. Possible values include 'rss2', 'atom'.
 *                                       Default is the value of get_default_feed().
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type int[]|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type int[]|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return void|string Void if 'echo' argument is true, list of authors if 'echo' is false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . ' GROUP BY post_author') as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $posts = isset($author_count[$author_id]) ? $author_count[$author_id] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' === $author->display_name) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' === $args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            esc_url(get_author_posts_url($author->ID, $author->user_nicename)),
            /* translators: %s: Author's display name. */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' === $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if ($args['echo']) {
        echo $return;
    } else {
        return $return;
    }
}

WordPress Version: 5.7

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://developer.wordpress.org/reference/functions/wp_list_authors/
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to. Possible values include 'rss2', 'atom'.
 *                                       Default is the value of get_default_feed().
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type int[]|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type int[]|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return void|string Void if 'echo' argument is true, list of authors if 'echo' is false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . ' GROUP BY post_author') as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $posts = isset($author_count[$author_id]) ? $author_count[$author_id] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' === $author->display_name) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' === $args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            get_author_posts_url($author->ID, $author->user_nicename),
            /* translators: %s: Author's display name. */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' === $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if ($args['echo']) {
        echo $return;
    } else {
        return $return;
    }
}

WordPress Version: 5.5

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://developer.wordpress.org/reference/functions/wp_list_authors/
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to. Possible values include 'rss2', 'atom'.
 *                                       Default is the value of get_default_feed().
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return void|string Void if 'echo' argument is true, list of authors if 'echo' is false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . ' GROUP BY post_author') as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $posts = isset($author_count[$author_id]) ? $author_count[$author_id] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' === $author->display_name) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' === $args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            get_author_posts_url($author->ID, $author->user_nicename),
            /* translators: %s: Author's display name. */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' === $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if ($args['echo']) {
        echo $return;
    } else {
        return $return;
    }
}

WordPress Version: 5.4

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://developer.wordpress.org/reference/functions/wp_list_authors/
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to. Possible values include 'rss2', 'atom'.
 *                                       Default is the value of get_default_feed().
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return void|string Void if 'echo' argument is true, list of authors if 'echo' is false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . ' GROUP BY post_author') as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $posts = isset($author_count[$author_id]) ? $author_count[$author_id] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' === $author->display_name) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            get_author_posts_url($author->ID, $author->user_nicename),
            /* translators: %s: Author's display name. */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if ($args['echo']) {
        echo $return;
    } else {
        return $return;
    }
}

WordPress Version: 5.3

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://developer.wordpress.org/reference/functions/wp_list_authors/
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to. Possible values include 'rss2', 'atom'.
 *                                       Default is the value of get_default_feed().
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return string|void The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . ' GROUP BY post_author') as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $posts = isset($author_count[$author_id]) ? $author_count[$author_id] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' === $author->display_name) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            get_author_posts_url($author->ID, $author->user_nicename),
            /* translators: %s: Author's display name. */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 5.2

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return string|void The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . ' GROUP BY post_author') as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $posts = isset($author_count[$author_id]) ? $author_count[$author_id] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' === $author->display_name) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            get_author_posts_url($author->ID, $author->user_nicename),
            /* translators: %s: author's display name */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 5.1

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default true.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return string|void The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . ' GROUP BY post_author') as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            get_author_posts_url($author->ID, $author->user_nicename),
            /* translators: %s: author's display name */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 4.7

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return string|void The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = sprintf(
            '<a href="%1$s" title="%2$s">%3$s</a>',
            get_author_posts_url($author->ID, $author->user_nicename),
            /* translators: %s: author's display name */
            esc_attr(sprintf(__('Posts by %s'), $author->display_name)),
            $name
        );
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 4.6

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string       $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                       'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                       'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string       $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int          $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool         $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool         $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
 *     @type bool         $show_fullname Whether to show the author's full name. Default false.
 *     @type bool         $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string       $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                       parameter of the link. Default empty.
 *     @type string       $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                       clickable anchor. Default empty.
 *     @type string       $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool         $echo          Whether to output the result or instead return it. Default true.
 *     @type string       $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                       will be separated by commas.
 *     @type bool         $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type array|string $exclude       Array or comma/space-separated list of author IDs to exclude. Default empty.
 *     @type array|string $include       Array or comma/space-separated list of author IDs to include. Default empty.
 * }
 * @return string|void The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 4.5

/**
 * List all the authors of the site, with several options available.
 *
 * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                 'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int    $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool   $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool   $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
 *     @type bool   $show_fullname Whether to show the author's full name. Default false.
 *     @type bool   $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                 parameter of the link. Default empty.
 *     @type string $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                 clickable anchor. Default empty.
 *     @type string $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool   $echo          Whether to output the result or instead return it. Default true.
 *     @type string $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                 will be separated by commas.
 *     @type bool   $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to exclude. Default empty.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to include. Default empty.
 * }
 * @return string|void The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 4.4

/**
 * List all the authors of the blog, with several options available.
 *
 * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb WordPress database abstraction object.
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                 'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int    $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool   $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool   $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
 *     @type bool   $show_fullname Whether to show the author's full name. Default false.
 *     @type bool   $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                 parameter of the link. Default empty.
 *     @type string $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                 clickable anchor. Default empty.
 *     @type string $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool   $echo          Whether to output the result or instead return it. Default true.
 *     @type string $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                 will be separated by commas.
 *     @type bool   $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to exclude. Default empty.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to include. Default empty.
 * }
 * @return string|void The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 4.3

/**
 * List all the authors of the blog, with several options available.
 *
 * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @global wpdb $wpdb
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                 'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int    $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool   $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool   $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
 *     @type bool   $show_fullname Whether to show the author's full name. Default false.
 *     @type bool   $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                 parameter of the link. Default empty.
 *     @type string $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                 clickable anchor. Default empty.
 *     @type string $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool   $echo          Whether to output the result or instead return it. Default true.
 *     @type string $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                 will be separated by commas.
 *     @type bool   $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to exclude. Default empty.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to include. Default empty.
 * }
 * @return string|void The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 4.2

/**
 * List all the authors of the blog, with several options available.
 *
 * @link https://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                 'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int    $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool   $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool   $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
 *     @type bool   $show_fullname Whether to show the author's full name. Default false.
 *     @type bool   $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                 parameter of the link. Default empty.
 *     @type string $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                 clickable anchor. Default empty.
 *     @type string $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool   $echo          Whether to output the result or instead return it. Default true.
 *     @type string $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                 will be separated by commas.
 *     @type bool   $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to exclude. Default empty.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to include. Default empty.
 * }
 * @return null|string The output, if echo is set to false. Otherwise null.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 4.0

/**
 * List all the authors of the blog, with several options available.
 *
 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors
 *
 * @since 1.2.0
 *
 * @param string|array $args {
 *     Optional. Array or string of default arguments.
 *
 *     @type string $orderby       How to sort the authors. Accepts 'nicename', 'email', 'url', 'registered',
 *                                 'user_nicename', 'user_email', 'user_url', 'user_registered', 'name',
 *                                 'display_name', 'post_count', 'ID', 'meta_value', 'user_login'. Default 'name'.
 *     @type string $order         Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
 *     @type int    $number        Maximum authors to return or display. Default empty (all authors).
 *     @type bool   $optioncount   Show the count in parenthesis next to the author's name. Default false.
 *     @type bool   $exclude_admin Whether to exclude the 'admin' account, if it exists. Default false.
 *     @type bool   $show_fullname Whether to show the author's full name. Default false.
 *     @type bool   $hide_empty    Whether to hide any authors with no posts. Default true.
 *     @type string $feed          If not empty, show a link to the author's feed and use this text as the alt
 *                                 parameter of the link. Default empty.
 *     @type string $feed_image    If not empty, show a link to the author's feed and use this image URL as
 *                                 clickable anchor. Default empty.
 *     @type string $feed_type     The feed type to link to, such as 'rss2'. Defaults to default feed type.
 *     @type bool   $echo          Whether to output the result or instead return it. Default true.
 *     @type string $style         If 'list', each author is wrapped in an `<li>` element, otherwise the authors
 *                                 will be separated by commas.
 *     @type bool   $html          Whether to list the items in HTML form or plaintext. Default true.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to exclude. Default empty.
 *     @type string $exclude       An array, comma-, or space-separated list of author IDs to include. Default empty.
 * }
 * @return null|string The output, if echo is set to false. Otherwise null.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($args['exclude_admin'] && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $args['hide_empty']) {
            continue;
        }
        if ($args['show_fullname'] && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$args['html']) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $args['style']) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($args['feed_image']) || !empty($args['feed'])) {
            $link .= ' ';
            if (empty($args['feed_image'])) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $args['feed_type']) . '"';
            $alt = '';
            if (!empty($args['feed'])) {
                $alt = ' alt="' . esc_attr($args['feed']) . '"';
                $name = $args['feed'];
            }
            $link .= '>';
            if (!empty($args['feed_image'])) {
                $link .= '<img src="' . esc_url($args['feed_image']) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($args['feed_image'])) {
                $link .= ')';
            }
        }
        if ($args['optioncount']) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $args['style']) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$args['echo']) {
        return $return;
    }
    echo $return;
}

WordPress Version: 3.9

/**
 * List all the authors of the blog, with several options available.
 *
 * <ul>
 * <li>optioncount (boolean) (false): Show the count in parenthesis next to the
 * author's name.</li>
 * <li>exclude_admin (boolean) (true): Exclude the 'admin' user that is
 * installed by default.</li>
 * <li>show_fullname (boolean) (false): Show their full names.</li>
 * <li>hide_empty (boolean) (true): Don't show authors without any posts.</li>
 * <li>feed (string) (''): If isn't empty, show links to author's feeds.</li>
 * <li>feed_image (string) (''): If isn't empty, use this image to link to
 * feeds.</li>
 * <li>echo (boolean) (true): Set to false to return the output, instead of
 * echoing.</li>
 * <li>style (string) ('list'): Whether to display list of authors in list form
 * or as a string.</li>
 * <li>html (bool) (true): Whether to list the items in html form or plaintext.
 * </li>
 * <li>exclude (array): Array of user IDs to explicitly exclude.</li>
 * <li>include (array): Array of user IDs to explicitly include.</li>
 * </ul>
 *
 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors
 * @since 1.2.0
 * @param array $args The argument array.
 * @return null|string The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '');
    $args = wp_parse_args($args, $defaults);
    extract($args, EXTR_SKIP);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number', 'exclude', 'include'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($exclude_admin && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $hide_empty) {
            continue;
        }
        $link = '';
        if ($show_fullname && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$html) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $style) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($feed_image) || !empty($feed)) {
            $link .= ' ';
            if (empty($feed_image)) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID, $feed_type) . '"';
            $alt = '';
            if (!empty($feed)) {
                $alt = ' alt="' . esc_attr($feed) . '"';
                $name = $feed;
            }
            $link .= '>';
            if (!empty($feed_image)) {
                $link .= '<img src="' . esc_url($feed_image) . '" style="border: none;"' . $alt . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($feed_image)) {
                $link .= ')';
            }
        }
        if ($optioncount) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $style) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$echo) {
        return $return;
    }
    echo $return;
}

WordPress Version: 3.7

/**
 * List all the authors of the blog, with several options available.
 *
 * <ul>
 * <li>optioncount (boolean) (false): Show the count in parenthesis next to the
 * author's name.</li>
 * <li>exclude_admin (boolean) (true): Exclude the 'admin' user that is
 * installed by default.</li>
 * <li>show_fullname (boolean) (false): Show their full names.</li>
 * <li>hide_empty (boolean) (true): Don't show authors without any posts.</li>
 * <li>feed (string) (''): If isn't empty, show links to author's feeds.</li>
 * <li>feed_image (string) (''): If isn't empty, use this image to link to
 * feeds.</li>
 * <li>echo (boolean) (true): Set to false to return the output, instead of
 * echoing.</li>
 * <li>style (string) ('list'): Whether to display list of authors in list form
 * or as a string.</li>
 * <li>html (bool) (true): Whether to list the items in html form or plaintext.
 * </li>
 * </ul>
 *
 * @link http://codex.wordpress.org/Template_Tags/wp_list_authors
 * @since 1.2.0
 * @param array $args The argument array.
 * @return null|string The output, if echo is set to false.
 */
function wp_list_authors($args = '')
{
    global $wpdb;
    $defaults = array('orderby' => 'name', 'order' => 'ASC', 'number' => '', 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, 'style' => 'list', 'html' => true);
    $args = wp_parse_args($args, $defaults);
    extract($args, EXTR_SKIP);
    $return = '';
    $query_args = wp_array_slice_assoc($args, array('orderby', 'order', 'number'));
    $query_args['fields'] = 'ids';
    $authors = get_users($query_args);
    $author_count = array();
    foreach ((array) $wpdb->get_results("SELECT DISTINCT post_author, COUNT(ID) AS count FROM {$wpdb->posts} WHERE post_type = 'post' AND " . get_private_posts_cap_sql('post') . " GROUP BY post_author") as $row) {
        $author_count[$row->post_author] = $row->count;
    }
    foreach ($authors as $author_id) {
        $author = get_userdata($author_id);
        if ($exclude_admin && 'admin' == $author->display_name) {
            continue;
        }
        $posts = isset($author_count[$author->ID]) ? $author_count[$author->ID] : 0;
        if (!$posts && $hide_empty) {
            continue;
        }
        $link = '';
        if ($show_fullname && $author->first_name && $author->last_name) {
            $name = "{$author->first_name} {$author->last_name}";
        } else {
            $name = $author->display_name;
        }
        if (!$html) {
            $return .= $name . ', ';
            continue;
            // No need to go further to process HTML.
        }
        if ('list' == $style) {
            $return .= '<li>';
        }
        $link = '<a href="' . get_author_posts_url($author->ID, $author->user_nicename) . '" title="' . esc_attr(sprintf(__("Posts by %s"), $author->display_name)) . '">' . $name . '</a>';
        if (!empty($feed_image) || !empty($feed)) {
            $link .= ' ';
            if (empty($feed_image)) {
                $link .= '(';
            }
            $link .= '<a href="' . get_author_feed_link($author->ID) . '"';
            $alt = $title = '';
            if (!empty($feed)) {
                $title = ' title="' . esc_attr($feed) . '"';
                $alt = ' alt="' . esc_attr($feed) . '"';
                $name = $feed;
                $link .= $title;
            }
            $link .= '>';
            if (!empty($feed_image)) {
                $link .= '<img src="' . esc_url($feed_image) . '" style="border: none;"' . $alt . $title . ' />';
            } else {
                $link .= $name;
            }
            $link .= '</a>';
            if (empty($feed_image)) {
                $link .= ')';
            }
        }
        if ($optioncount) {
            $link .= ' (' . $posts . ')';
        }
        $return .= $link;
        $return .= ('list' == $style) ? '</li>' : ', ';
    }
    $return = rtrim($return, ', ');
    if (!$echo) {
        return $return;
    }
    echo $return;
}