Opened 8 years ago
Closed 8 years ago
#37002 closed enhancement (fixed)
Documentation: update wp_get_post_categories @return description
Reported by: | jeherve | Owned by: | DrewAPicture |
---|---|---|---|
Milestone: | 4.6 | Priority: | normal |
Severity: | normal | Version: | 4.0 |
Component: | Posts, Post Types | Keywords: | has-patch commit |
Focuses: | docs | Cc: |
Description
The function returns an array of Category IDs. Knowing that is helpful when wanting to do something with the function.
Right now, we only mention that the function returns "an array of categories".
Attachments (3)
Change History (10)
#3
@
8 years ago
@jeherve I agree that the return description should signal the default behavior, but it isn't absolute. If you use array( 'fields' => 'all' )
as the $args
parameter you no longer are returned just an array of IDs.
#4
follow-up:
↓ 5
@
8 years ago
That makes sense, I didn't think of that. Should that be mentioned in the @return value somehow? Something along the lines of
@return array List of categories. Default to category IDs, can return additional data when specifying category arguments.
#5
in reply to:
↑ 4
@
8 years ago
Replying to jeherve:
That makes sense, I didn't think of that. Should that be mentioned in the @return value somehow? Something along the lines of
@return array List of categories. Default to category IDs, can return additional data when specifying category arguments.
@DrewAPicture care to wordsmith something here?
#6
@
8 years ago
- Keywords commit added
- Milestone changed from Awaiting Review to 4.6
@rachelbaker See 37002.3.diff
Documentation: update wp_get_post_categories inline doc.