WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#26544 closed defect (bug) (duplicate)

wp_list_authors number arg and exclude admin

Reported by: MikeHansenMe Owned by:
Milestone: Priority: normal
Severity: normal Version:
Component: Template Keywords:
Focuses: Cc:

Description

When you use the exclude_admin arg it only excludes the user name 'admin' not administrative accounts. This is on by default. When you have 3 users 'admin', 'user1', and 'user2' then set the arg number to 2. I would assume it would return user1 and user2. However, it returns user1 because the first user was admin and it excluded it. I think we should check both number and exclude admin before looping through and building the return.

Attachments (1)

wp-list-author-number-exclude-admin.diff (968 bytes) - added by MikeHansenMe 7 years ago.
checks number and exclude admin before looping through users

Download all attachments as: .zip

Change History (3)

@MikeHansenMe
7 years ago

checks number and exclude admin before looping through users

#1 @MikeHansenMe
7 years ago

Related #26538. Also Unit tests on #26538.

#2 @SergeyBiryukov
7 years ago

  • Component changed from General to Template
  • Milestone Awaiting Review deleted
  • Resolution set to duplicate
  • Status changed from new to closed

Duplicate of #23498.

Note: See TracTickets for help on using tickets.