[wp-trac] [WordPress Trac] #35084: check for post status in get_page_uri causes issues with permalinks
WordPress Trac
noreply at wordpress.org
Mon Dec 14 23:31:19 UTC 2015
#35084: check for post status in get_page_uri causes issues with permalinks
----------------------------------------+------------------------------
Reporter: tharsheblows | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Permalinks | Version: 4.4
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests | Focuses:
----------------------------------------+------------------------------
Comment (by swissspidy):
Replying to [comment:3 tharsheblows]:
> Do you mean test that all the other post statuses work correctly? I can
do that in the morning, I haven't done many unit tests but would love to
give it a go. :)
>
> Or do you mean change the patch to omit other post statuses when
building the permalink?
>
Both? :-)
I guess we can do something like `! in_array( $parent->post_status,
get_post_stati( array( 'private' => true ) ) )` (if I'm not overthinking
this).
Needs unit tests to ensure this works correctly for all desired post
types.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/35084#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list