[wp-trac] [WordPress Trac] #22338: Add filter for the output from `get_sample_permalink`
WordPress Trac
noreply at wordpress.org
Wed Sep 16 23:07:44 UTC 2015
#22338: Add filter for the output from `get_sample_permalink`
-----------------------------------+-----------------------------
Reporter: simonwheatley | Owner: SergeyBiryukov
Type: defect (bug) | Status: reviewing
Priority: normal | Milestone: 4.4
Component: Permalinks | Version: 3.4.2
Severity: normal | Resolution:
Keywords: has-patch 2nd-opinion | Focuses:
-----------------------------------+-----------------------------
Comment (by SergeyBiryukov):
Some cleanup in [attachment:22338.4.diff].
Since we're going to pass the post object to the filter as the last
argument, I think we should explicitly pass `$post->ID` instead of `$id`,
which can be a post ID or post object.
This is not consistent with `'get_sample_permalink_html'` filter, which
receives `$id` and not `$post->ID`, but it's too late to change that.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/22338#comment:13>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list