From c5206e3d416f78c76374251a9cf5687b0da8882a Mon Sep 17 00:00:00 2001 From: Andrew Nacin Date: Tue, 25 Feb 2014 20:10:34 +0000 Subject: [PATCH] Add exclude and include to wp_list_authors(). props patricknami. fixes #9902. git-svn-id: https://develop.svn.wordpress.org/trunk@27274 602fd350-edb4-49c9-b593-d223f7449a82 --- src/wp-includes/author-template.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/wp-includes/author-template.php b/src/wp-includes/author-template.php index 03b09432fc..ae823a4bf3 100644 --- a/src/wp-includes/author-template.php +++ b/src/wp-includes/author-template.php @@ -316,6 +316,8 @@ function get_author_posts_url($author_id, $author_nicename = '') { * or as a string. *
  • html (bool) (true): Whether to list the items in html form or plaintext. *
  • + *
  • exclude (array): Array of user IDs to explicitly exclude.
  • + *
  • include (array): Array of user IDs to explicitly include.
  • * * * @link http://codex.wordpress.org/Template_Tags/wp_list_authors @@ -331,7 +333,7 @@ function wp_list_authors($args = '') { 'optioncount' => false, 'exclude_admin' => true, 'show_fullname' => false, 'hide_empty' => true, 'feed' => '', 'feed_image' => '', 'feed_type' => '', 'echo' => true, - 'style' => 'list', 'html' => true + 'style' => 'list', 'html' => true, 'exclude' => '', 'include' => '' ); $args = wp_parse_args( $args, $defaults ); @@ -339,7 +341,7 @@ function wp_list_authors($args = '') { $return = ''; - $query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number' ) ); + $query_args = wp_array_slice_assoc( $args, array( 'orderby', 'order', 'number', 'exclude', 'include' ) ); $query_args['fields'] = 'ids'; $authors = get_users( $query_args );