#14299 closed defect (bug) (fixed)
get_post_permalink incorrect documentation and variable name
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.0.1 |
| Component: | Post Types | Version: | 3.0 |
| Severity: | normal | Keywords: | has-patch |
| Cc: |
Description
Says an argument is an ID when it could be either an ID or an object.
Attachments (2)
Change History (8)
Should always be a post object, so we can use the same callbacks we have on post_link.
That's how I discovered this issue: I was about to create a new callback to handle filtering a custom object type with post_type_link instead of post_link (as the plugin had prior to 3.0), but then I discovered in fact I could just use the existing callback and attach it to post_type_link.
make_argument_actually_integer_but_keep_filter.14299.diff is probably a better approach: it keeps the stated argument value for get_post_permalink as an integer and consistently uses it as such, but explicitly passes the post object to the filter.
- Resolution set to fixed
- Status changed from new to closed

#14294
Makes sense we should ensure the filter always returns an ID, I think. Or maybe always a post object. Not sure which is more expected.