[wp-meta] [Making WordPress.org] #2707: Forums: Incorrect docs in User Badges plugin
Making WordPress.org
noreply at wordpress.org
Sun Apr 9 09:29:36 UTC 2017
#2707: Forums: Incorrect docs in User Badges plugin
------------------------------+------------------
Reporter: SergeyBiryukov | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Support Forums | Resolution:
Keywords: has-patch commit |
------------------------------+------------------
Description changed by SergeyBiryukov:
Old description:
> The `@return` entry for `get_author_badge()` and `get_moderator_badge()`
> says:
> {{{
> Associative array with keys 'type', 'slug', and 'user_login'
> }}}
> However, the actual keys returned are `type`, `label`, and `help`.
>
> Appears to be a copy/paste error in [4269].
New description:
The `@return` entry for `get_author_badge()` says:
{{{
Associative array with keys 'type', 'slug', and 'user_nicename' if author
merits a badge, else null.
}}}
Same for `get_moderator_badge()`:
{{{
Associative array with keys 'type', 'slug', and 'user_login' if author
merits a badge, else false.
}}}
However, the actual keys returned in both cases are `type`, `label`, and
`help`. Additionally, `get_author_badge()` return false on error, not
null.
Appears to be a copy/paste error in [4269].
--
--
Ticket URL: <https://meta.trac.wordpress.org/ticket/2707#comment:1>
Making WordPress.org <https://meta.trac.wordpress.org/>
Making WordPress.org
More information about the wp-meta
mailing list