[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
Mon Feb 18 18:53:36 UTC 2013
#23498: wp_list_authors ignores 'exclude_admin' arg when admin account has a
display_name other then 'admin'
--------------------------+------------------------------
Reporter: raphaabreu | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Users | Version: 3.1
Severity: normal | Resolution:
Keywords: |
--------------------------+------------------------------
Changes (by SergeyBiryukov):
* keywords: has-patch =>
* version: 3.5.1 => 3.1
Old description:
> Line 293 of author-template.php should be changed from:
>
> if ( $exclude_admin && 'admin' == $author->display_name )
>
> to:
>
> if ( $exclude_admin && 'admin' == $author->user_login )
>
> Thanks.
New description:
Line 293 of author-template.php should be changed from:
{{{
if ( $exclude_admin && 'admin' == $author->display_name )
}}}
to:
{{{
if ( $exclude_admin && 'admin' == $author->user_login )
}}}
Thanks.
--
Comment:
Related: #9165, #9902
Introduced in [15620], previously `user_login` field was used for
comparison.
The parameter itself was added in [2632]. We should probably deprecate it
in favor of `exclude` (#9902).
Still, fixing it makes sense to me. The description refers to "the 'admin'
user that is installed by default": [[BR]]
http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/author-
template.php#L246
Codex specifically refers to the login: "Exclude the 'admin' (login is
admin) account from the list": [[BR]]
http://codex.wordpress.org/Function_Reference/wp_list_authors#Parameters
The default username, however, can be manually picked now (#10396).
I guess we have the following options to fix this:
* `'admin' == $author->user_login`.
* `1 <> $author->ID` (from #9165).
* `get_option('admin_email') == $author->user_email` (from comment:1).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/23498#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list