Make WordPress Core

Opened 11 years ago

Closed 11 years ago

#26544 closed defect (bug) (duplicate)

wp_list_authors number arg and exclude admin

Reported by: mikehansenme's profile 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 11 years ago.
checks number and exclude admin before looping through users

Download all attachments as: .zip

Change History (3)

@MikeHansenMe
11 years ago

checks number and exclude admin before looping through users

#1 @MikeHansenMe
11 years ago

Related #26538. Also Unit tests on #26538.

#2 @SergeyBiryukov
11 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.