[wp-trac] [WordPress Trac] #11235: Pages whose ancestors are not all "published" cannot be used as parents for other pages.

WordPress Trac noreply at wordpress.org
Sun Oct 2 16:07:51 UTC 2016


#11235: Pages whose ancestors are not all "published" cannot be used as parents for
other pages.
-------------------------------------------------+-------------------------
 Reporter:  caesarsgrunt                         |       Owner:
     Type:  defect (bug)                         |      Status:  new
 Priority:  normal                               |   Milestone:  Future
Component:  Posts, Post Types                    |  Release
 Severity:  normal                               |     Version:  2.9
 Keywords:  has-patch 2nd-opinion needs-         |  Resolution:
  screenshots needs-unit-tests                   |     Focuses:
-------------------------------------------------+-------------------------

Comment (by swissspidy):

 I'm glad someone's working on such an ancient ticket, so thanks for that!

 As for the patch, I can only second what Adam said.

 It might make sense to move this logic into a new function that hooks into
 the `transition_post_status_hook` instead of putting it into
 `_transition_post_status()`. See [attachment:11235.diff] for what I have
 in mind. It replaces the filters with action hooks too.

 @muxahuk1214 Are you familiar with writing unit tests? If not, we could
 look at that together.

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


More information about the wp-trac mailing list