Make WordPress Core

Opened 15 years ago

Closed 11 years ago

#9902 closed enhancement (fixed)

Adding an "exclude" parameter to "wp_list_authors()"

Reported by: ramiy's profile ramiy Owned by: ericmann's profile ericmann
Milestone: 3.9 Priority: normal
Severity: normal Version: 2.7.1
Component: Users Keywords: has-patch
Focuses: template Cc:

Description

wp_list_categories() has an "exclude" parameter.

wp_list_pages() has an "exclude" and "exclude_tree" parameters.

wp_list_bookmarks() has an "exclude" and "exclude_category" parameters.

And only wp_list_authors() has no "exclude" parameter. Although it allows template developers to "exclude_admin", but this is a Boolean parameter, so we can't use it to exclude other authors.

This enhancement is not a critical one, but adding this feature will give theme developers more tools to control over the presented content.

Attachments (3)

9902.diff (1.8 KB) - added by ericmann 15 years ago.
Adds "exclude" parameter to wp_list_authors() function. Accepts comma separated list of author IDs for exclusion.
9902.2.diff (1.6 KB) - added by wojtek.szkutnik 14 years ago.
9902.3.diff (880 bytes) - added by patricknami 11 years ago.
Exposes 'include' and 'exclude' parameters of get_users to wp_list_authors()

Download all attachments as: .zip

Change History (10)

#1 @Denis-de-Bernardy
15 years ago

  • Keywords needs-patch added
  • Milestone changed from 2.9 to Future Release

@ericmann
15 years ago

Adds "exclude" parameter to wp_list_authors() function. Accepts comma separated list of author IDs for exclusion.

#2 @ericmann
15 years ago

  • Cc eric@… added
  • Keywords has_patch needs_testing added; needs-patch removed
  • Owner set to ericmann
  • Status changed from new to accepted

#3 @mikeschinkel
15 years ago

  • Cc mikeschinkel@… added

#4 @ramiy
15 years ago

the patch looks good.

#5 @wojtek.szkutnik
14 years ago

  • Cc wojtek.szkutnik@… added
  • Keywords has-patch needs-testing gsoc added; has_patch needs_testing exclude wp_list_authors parameters functions removed

Rewrote the patch due to code changes

@patricknami
11 years ago

Exposes 'include' and 'exclude' parameters of get_users to wp_list_authors()

#6 @nacin
11 years ago

  • Component changed from Template to Users
  • Focuses template added
  • Keywords needs-testing gsoc removed
  • Milestone changed from Future Release to 3.9

Hi patricknami, thanks for the patch! Patches don't trigger notifications so this wasn't seen.

get_users() certainly makes this easy. Let's do it.

#7 @nacin
11 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 27274:

Add exclude and include to wp_list_authors().

props patricknami.
fixes #9902.

Note: See TracTickets for help on using tickets.