#14299 closed defect (bug) (fixed)
get_post_permalink incorrect documentation and variable name
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0.1 | Priority: | normal |
Severity: | normal | Version: | 3.0 |
Component: | Posts, Post Types | Keywords: | has-patch |
Focuses: | Cc: |
Description
Says an argument is an ID when it could be either an ID or an object.
Attachments (2)
Change History (8)
#2
@
11 years ago
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
.
#3
@
11 years ago
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.
Note: See
TracTickets for help on using
tickets.
#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.