apply_filters( ‘pre_wp_list_authors_post_counts_query’, int[]|false $post_counts, array $parsed_args )

In this article

Filters whether to short-circuit performing the query for author post counts.

Parameters

$post_countsint[]|false
Array of post counts, keyed by author ID.
$parsed_argsarray
The arguments passed to wp_list_authors() combined with the defaults.
More Arguments from wp_list_authors( … $args )Array or string of default arguments.
  • orderby string
    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'.
  • order string
    Sorting direction for $orderby. Accepts 'ASC', 'DESC'. Default 'ASC'.
  • number int
    Maximum authors to return or display. Default empty (all authors).
  • optioncount bool
    Show the count in parenthesis next to the author’s name. Default false.
  • exclude_admin bool
    Whether to exclude the 'admin' account, if it exists. Default true.
  • show_fullname bool
    Whether to show the author’s full name. Default false.
  • hide_empty bool
    Whether to hide any authors with no posts. Default true.
  • feed string
    If not empty, show a link to the author’s feed and use this text as the alt parameter of the link.
  • feed_image string
    If not empty, show a link to the author’s feed and use this image URL as clickable anchor.
  • feed_type string
    The feed type to link to. Possible values include 'rss2', 'atom'.
    Default is the value of get_default_feed() .
  • echo bool
    Whether to output the result or instead return it. Default true.
  • style string
    If 'list', each author is wrapped in an <li> element, otherwise the authors will be separated by commas.
  • html bool
    Whether to list the items in HTML form or plaintext. Default true.
  • exclude int[]|string
    Array or comma/space-separated list of author IDs to exclude.
  • include int[]|string
    Array or comma/space-separated list of author IDs to include.

Source

$post_counts = apply_filters( 'pre_wp_list_authors_post_counts_query', false, $parsed_args );

Changelog

VersionDescription
6.1.0Introduced.

User Contributed Notes

You must log in before being able to contribute a note or feedback.