[wp-trac] [WordPress Trac] #35084: check for post status in get_page_uri causes issues with permalinks

WordPress Trac noreply at wordpress.org
Tue Dec 15 08:51:20 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 tharsheblows):

 It would be completely hypocritical for me to judge anyone overthinking
 anything! ;)

 'private'=>true won't work because one of the bbPress post statuses is
 registered with it, used on the front end and needs to be in the uri.
 However, 'internal'=>true should always work. This picks up 'inherit',
 'auto-draft' and 'trash' which I _think_ are safe to exclude.

 I've added in a unit test which iterates over the post statuses. I didn't
 replace the one in [34001] which checks differently, but I am not sure of
 the protocol there.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/35084#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list