Opened 9 years ago
Closed 9 years ago
#33481 closed defect (bug) (fixed)
Documented $public_only parameter not passed to the get_usernumposts filter
Reported by: | tmatsuur | Owned by: | swissspidy |
---|---|---|---|
Milestone: | 4.3.1 | Priority: | normal |
Severity: | normal | Version: | 4.3 |
Component: | Users | Keywords: | has-patch fixed-major |
Focuses: | docs | Cc: |
Description
Not additional $public_only
parameter to the get_usernumposts
filter.
user.php
280line:
* @since 4.3.0 Added `$public_only` argument.
285line:
* @param bool $public_only Whether to limit counted posts to public posts.
287line:
return apply_filters( 'get_usernumposts', $count, $userid, $post_type );
Correctly,
287line:
return apply_filters( 'get_usernumposts', $count, $userid, $post_type, $public_only );
280 line of since
also wonder to change?
Attachments (1)
Change History (19)
#1
@
9 years ago
- Keywords needs-patch good-first-bug added
- Milestone changed from Awaiting Review to 4.3.1
- Owner set to swissspidy
- Status changed from new to accepted
@
9 years ago
Correctly add the $public_only
param. Also fixes the $post_type
variable name in the docblock.
#2
@
9 years ago
- Summary changed from Not additional $public_only parameter to the get_usernumposts filter(count_user_posts function) to Documented $public_only parameter not passed to the get_usernumposts filter
#3
@
9 years ago
- Component changed from General to Users
- Focuses docs added
- Keywords has-patch added; needs-patch removed
This ticket was mentioned in Slack in #core by swissspidy. View the logs.
9 years ago
#7
follow-up:
↓ 9
@
9 years ago
- Milestone changed from 4.3.1 to 4.4
Thanks for the report and for the patch! This was my oversight.
As it's not a functional regression, I don't see that this needs to be fixed in 4.3.1. DrewAPicture, do we have a standard for "hotfixing" documentation errors on developer.wordpress.org?
This ticket was mentioned in Slack in #core by drew. View the logs.
9 years ago
#9
in reply to:
↑ 7
@
9 years ago
Replying to boonebgorges:
Thanks for the report and for the patch! This was my oversight.
As it's not a functional regression, I don't see that this needs to be fixed in 4.3.1. DrewAPicture, do we have a standard for "hotfixing" documentation errors on developer.wordpress.org?
@boonebgorges: Not sure I'm following where the documentation error is? Is it that the new parameter was "added" except it wasn't actually added? We can make temporary edits to summaries and descriptions, but adjusting the parameters/changelog isn't really in the cards.
#10
@
9 years ago
After chatting with Boone briefly in Slack (linked above), my best suggestion would be to simply add the parameter and ship the change with 4.3.1.
#13
@
9 years ago
- Keywords fixed-major added; good-first-bug removed
- Resolution fixed deleted
- Status changed from closed to reopened
#14
@
9 years ago
Looking at this change, I see that documentation for $post_type
is not in sync in this and related functions. Should we say 'Single post type or an array of post types...' for better clarity?
Thanks for your report! Looks like that was introduced in [32523] (see #32243).
Will create a patch right away.