[wp-trac] [WordPress Trac] #23498: wp_list_authors ignores 'exclude_admin' arg when admin account has a display_name other then 'admin'

WordPress Trac noreply at wordpress.org
Fri Aug 16 01:27:07 UTC 2019


#23498: wp_list_authors ignores 'exclude_admin' arg when admin account has a
display_name other then 'admin'
-----------------------------------+-----------------------------
 Reporter:  raphaabreu             |       Owner:  SergeyBiryukov
     Type:  defect (bug)           |      Status:  reviewing
 Priority:  normal                 |   Milestone:  5.3
Component:  Users                  |     Version:  3.1
 Severity:  normal                 |  Resolution:
 Keywords:  has-patch 2nd-opinion  |     Focuses:
-----------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * keywords:  has-patch commit => has-patch 2nd-opinion


Comment:

 Replying to [comment:15 SergeyBiryukov]:
 > Given that `exclude_admin` is true by default, I'm not 100% sure
 excluding all administrators would be the expected behavior for
 `wp_list_authors()`, but I can see it both ways.

 Thought about this some more. Given that:

 * `exclude_admin` parameter was limited to `admin` ''display name'' for
 the last 9 years, since [15620] / #10329.
 * `admin` is no longer a default username on install for the last 6 years,
 since [24998] / #24078.

 the effect of `exclude_admin` was pretty limited. The suggested change
 might result in unexpected behavior, where `wp_list_authors()` would no
 longer include users who are post authors, but also administrators.

 Note: neither core nor bundled themes use the function, so third party
 themes are the main concern here.

 Maybe changing the default value to `false` and adjusting the tests and
 documentation accordingly would make the most sense here?

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/23498#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list