[wp-trac] [WordPress Trac] #32322: Custom permalink structure incorrect for Future posts
WordPress Trac
noreply at wordpress.org
Thu Jun 4 23:46:30 UTC 2015
#32322: Custom permalink structure incorrect for Future posts
-------------------------------------------------+-------------------------
Reporter: greencode | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting
Component: Permalinks | Review
Severity: normal | Version: 4.2
Keywords: good-first-bug needs-unit-tests | Resolution:
has-patch | Focuses:
-------------------------------------------------+-------------------------
Comment (by kdoole):
- Added inline filter docs.
- Added the filter to `get_post_permalink`, which i missed at first.
- I also spent a moment creating unit tests; it feels a bit overly verbose
-- is this making sense?
On that note, there's a bit of duplication going on in here, this piece:
{{{
$statuses_which_should_shortlink = apply_filters(
'shortlink_post_statuses', array(
'draft',
'pending',
'auto-draft',
'future'
) );
}}}
It was already duplicated, and now with the filter it's a touch longer.
Does it make any sense pulling this out into a function?
--
Ticket URL: <https://core.trac.wordpress.org/ticket/32322#comment:10>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list